mp4v2 | Fork of mp4v2 : https : //code.google.com/archive/p/mp4v2/
kandi X-RAY | mp4v2 Summary
kandi X-RAY | mp4v2 Summary
This is a fork of mp4v2 from TechSmith has modified this code for its own purposes and openly publishes those changes here in compliance with the Mozilla Public License.
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 mp4v2
mp4v2 Key Features
mp4v2 Examples and Code Snippets
Community Discussions
Trending Discussions on mp4v2
QUESTION
I want to add artwork to my MP4 file. How do I do this successfully / without errors? I've tried these methods with numerous MP4 files, none worked. If you would like to replicate the errors / bugs, here are the sample files I've used for this question.
I've tried the following:
ffmpeg -i sample.mp4 -i sample.png -map 0 -map 1 -c copy -disposition:v:0 attached_pic sample_w_artwork.mp4
as stated by Lukas
with this error:
...ANSWER
Answered 2020-May-06 at 23:03In the Codec Tweak Tool under Miscellaneous > Thumbnails the checkbox for .mp4 was unchecked. After checking it and saving the settings it finally showed the thumbnail.
The Tweak Tool is installed with K-Lite Codec Pack. There are different editions available, I use the Standard edition so I can't talk for the other ones.
Credits for finding the solution: Furty from the same (copied) thread on Super User in a comment
QUESTION
Iam using OpenH264 as encoder and I want to mux its output into a playable mp4 using libmp4v2
The resulting .mp4
only work partially. It is playable in VLC and MPC-HC but not in Windows Media Player nor the Windows 10 "Movie and Tv" App.
My goal is it that the file works with all these players.
Both Windows players are telling my they don't know the codec so they can't play it back:
This is not really true since I can play a manually muxed file using the same h264 bitstream by using FFmpeg from the cli:
ANSWER
Answered 2018-Mar-26 at 09:55You can use MP4Box from GPAC to analyze the MP4 box layouts of both files. As seen here, the bad file is missing the SPS/PPS data in the avcC box. The same NAL units are most likely stored in the NAL units as well, but the specification requires them to be also present in the avcC box (some players handle SPS/PPS inlined in the stream but that is a bad practice since it breaks seeking and what not since you don't know which sample groups reference which parameter sets upfront).
A quick google search for libmp4v2 gave me this example which shows how to actually call MP4AddH264SequenceParameterSet
/MP4AddH264PictureParameterSet
to provide the SPS/PPS, while you only call MP4WriteSample
which could be the issue.
My subjective opinion - I have never used libmp4v2 but if you don't know how to use it too just use ffmpeg instead - more examples and the community will be bigger. Muxing H.264 into mp4 is quite simple, again lots of examples on the internet.
SUMMARY
- MP4 requires the SPS/PPS information to be in the
avcC
box - some players may be able to decode the stream if these units are put inline with the samples, but to conform to the specification, one should always have theavcC
box present, otherwise a player is free to fail to play the stream. - Depending on the library used, there may be different techniques how to signal the SPS/PPS to the muxer, but as seen here with libmp4v2, one must use
P4AddH264SequenceParameterSet/MP4AddH264PictureParameterSet
. To obtain the SPS/PPS data one should parse the bitstream. This varies depending on the bitstream format (if annex b format with start codes or avcc format with interleaved lengths are used - see this for more info). When the SPS/PPS info is extracted it should be passed to the muxing library. - Handle SPS/PPS change with care. The specification actually states that you can have multiple
stsd
stream description boxes and then reference them, but as far as I recall, Windows Media Player handles this poorly, so if possible stick to a single SPS/PPS set. One should be able to configure the encoder not to emit duplicate SPS/PPS entries on each keyframe.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mp4v2
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