Bento4 | Full-featured MP4 format , MPEG DASH , HLS , CMAF SDK and tools
kandi X-RAY | Bento4 Summary
kandi X-RAY | Bento4 Summary
[Total Alerts] Bento4 is a C++ class library and tools designed to read and write ISO-MP4 files. This format is defined in international specifications ISO/IEC 14496-12, 14496-14 and 14496-15. The format is a derivative of the Apple Quicktime file format, so Bento4 can be used to read and write most Quicktime files as well. Visit [www.bento4.com] for details.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Bento4
Bento4 Key Features
Bento4 Examples and Code Snippets
Community Discussions
Trending Discussions on Bento4
QUESTION
I have been researching about DRM video encryption. All the example in internet I find it needs a lincense link, and a "X-AxDRM-Message" encrypted message as header request. But when I generate widevine encrypted video files with bento4, it don't provide me any sourse to generate the lincese link, it provides me KID and Key. What should I do with these two things? can I create the license link with php or python or js? or how can I get the link for free?
...ANSWER
Answered 2022-Mar-01 at 10:55You need to either host the DRM service yourself or else use a DRM, or more likely, multi DRM, online service.
This will provide you with the keys, IV etc you need to encrypt and also with the license server URL that your clients need to call to request the license playback key.
Note that for some DRM schemes, PlayReady and FairPlay, the license server URL can be included in the video stream, but for Widevine it usually needs to be configured on the client separately.
Its useful to test online first if possible - there are multiple player sites that will allow you test DRM protected streams, including the open source Shaka Player demo:
QUESTION
The AVQueuePlayer does not seek to the given time. Video always starts playing at the beginning. Using the default controls, I can seek manually to a desired point. I am using a m3u8 HLS stream.
...ANSWER
Answered 2022-Feb-12 at 17:17Found out the problem.
I need to seek on the currentItem, not on the AVQueuePlayer. Did not found a clue on why in the documentation.
QUESTION
When I build the Bento4 library from Android Studio, I get an undefined reference to 'AP4_Ac4SampleDescription::_class_AP4_Ac4SampleDescription' error.
Overall there are like 5 cmake commands for Bento4 for different platforms. Here are the 2 for Linux and Android:
Basic Linux:
cmake -DCMAKE_BUILT_TYPE=Release ..
Android NDK: cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$MINSDKVERSION ..
It builds fine with the basic Linux version.
What might be the cause for the Android version not working? Please note: I tried a few different version of the Android NDK. I get the one error for versions 16 and 17, and another error for versions 18 through 21.
...ANSWER
Answered 2021-Oct-20 at 03:16It is a bug on Bento4 side. You need to add missed stuff into Bento4/Source/C++/Core/Ap4SampleDescription.cpp
:
QUESTION
I need to create a Fragment-MP4 with "sidx" box to create a streamable and seekable video to use it by MediaSource API It is very easy to do it with Bento4 by using "--index" option, but I want to do it with ffmpeg because it has good other options like codec and bitrate and keyframes, It will be hard if I used both (ffmpeg, bento4) to create fmp4 by PHP exec
...ANSWER
Answered 2021-Jul-07 at 03:59You have to set -movflags +dash
at a minimum. For a sidx per moof box, that's it. For a global sidx, in addition you have to set global_sidx
as well, so -movflags +dash+global_sidx
.
QUESTION
I need some help to understand the avcC
atom structure of a particular mp4 sample I am trying to analyze.
Hex dump:
00 00 00 38 61 76 63 43 01 64 00 1F FF E1 00 1C 67 64 00 1F AC D9 80 50 05 BB 01 6A 02 02 02 80 00 00 03 00 80 00 00 1E 07 8C 18 CD 01 00 05 68 E9 7B 2C 8B FD F8 F8 00 00 00 00 13 63 6F 6C 72
This is what I understand from the above:
00 00 00 38
Size of avcC atom
61 76 63 43
avcC signature
01
configurationVersion
64
AVCProfileIndication
00
profile_compatibility
1F
AVCLevelIndication
FF
111111b + lengthSizeMinusOne
E1
111b + numOfSequenceParameterSets (in this case, 1 SPS)
00 1C
SPS length (in this case, 28 bytes)
67 64 00 1F AC D9 80 50 05 BB 01 6A 02 02 02 80 00 00 03 00 80 00 00 1E 07 8C 18 CD
SPS data (28 bytes as per above)
01
numOfPictureParameterSets (in this case, 1 PPS)
00 05
PPS length
This is where the problem begins. Based on the PPS length given by the previous bytes, the next 5 bytes should be the PPS data: 68 E9 7B 2C 8B
However according to the avcC header, the total length of the atom is 56 bytes (0x38
), which means that the following 4 bytes should be included: FD F8 F8 00
But the problem is that the PPS length is given as 5 bytes (0x05
). So what exactly are these final 4 bytes?
Then follows the header of the colr
atom:
00 00 00 13
size of colr atom
63 6F 6C 72
colr signature
Which I have checked and is indeed 19 bytes in length (0x13
).
The problem is with the avcC atom and with that particular mp4 sample I am analyzing (I've checked other samples too and they didn't have this peculiarity).
You can find the sample here.
EDIT
mp4info
tool from the bento4 suite reports the following as the avcC atom's size: 8+48
And mp4dump
reports:
ANSWER
Answered 2021-Mar-22 at 17:50I dind't get any answer but fortunately a bit more careful reading of ISO 14496-15
solved this issue:
QUESTION
I am trying to convert an MP3 file to a fragmented MP4 like this:
...ANSWER
Answered 2020-Oct-25 at 05:00Audio streams have no keyframes which is what MP4 muxer relies on by default to demarcate fragment boundaries. You will have to set a fragment duration.
ffmpeg -i input.mp3 -c:a aac -b:a 256k -f mp4 -movflags +empty_moov+separate_moof -frag_duration 10M output.mp4
faststart
is applicable for regular, non-fragmented outputfrag_keyframe
tells ffmpeg to start fragments at video keyframes but you don't have a video stream.-strict experimental
hasn't been required for the native AAC encoder since 2016.frag_duration
expects a value in microseconds.10M
= 10 million = 10 seconds.
QUESTION
How to merge a video and an image (or a black overlay) to get the video on top?
Input video is already prepared for this (its maximum width/height is 1920x1080) and needs to stay at original size.
This is how it should look like:
orange is an overlay/image (1920x1080px), pink is a video on top of it (and centered)
The best shot so far I've got:
...ANSWER
Answered 2020-Jul-23 at 09:32I believe it had something to do with the aspect ratio. I managed to get it working using:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Bento4
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page