News:

--

Main Menu

MP4v2 muxer not available?

Started by avidemuxm, June 02, 2019, 08:24:04 PM

Previous topic - Next topic

avidemuxm

Hello. Just install the last 2.7.3. Was trying to use the MP4v2 muxer but i don't see the option in the "Output Format" select box.

Do i need to install anything else to have that muxer instead of the default MP4 muxer? Or i need to use an old version for that?

Thanks in advance

eumagga0x2a

Please use a recent (ideally the latest) VC++ nightly. The MP4v2 muxer is obsolete as the MP4 muxer has picked up the last missing feature on Windows (optimizing the output file for streaming). The related changesets didn't make it into the 2.7.3 release, however.

avidemuxm

Hello, thanks for the answer.

I'm trying to get a mp42 video instead of a mp41, without reencoding.

Currently with the MP4 muxer, after remuxing without reencoding i get something like this (checked with MediaInfo).
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)

And i'm trying to get something like this instead
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/mp41)

Is that possible with avidemux?

Thanks

eumagga0x2a

No, Avidemux doesn't support tweaking the major brand from isom to mp42 (it were doable, but not implemented as it is usually not needed), you can accomplish it with ffmpeg

ffmpeg -i in.mp4 -c copy -brand mp42 out.mp4

or with any hex editor modifying the bytes 9-12 as "-brand" really just changes the label.

What is the purpose? Do you have a hardware device picky about that?

avidemuxm

#4
Thanks for the quick answer.

Yes i know i can use ffmpeg with the brand flag, but i was told that ffmpeg doesn't support mp42 so i suppose that is just a labeling tweak, not a real mp42. In fact doing so it says


Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/iso2/avc1/mp41)


So it still shows mp41/isom on the Codec ID.

Yes i need to have proper mp42 files, do you know any alternative soft that i can use to get that without reencoding everything, being ffmpeg or avidemux are not able to do that? The old The MP4v2 muxer was able to do that?

Thanks in advance


eumagga0x2a

Quote from: avidemuxm on June 03, 2019, 01:14:17 PM
Yes i know i can use ffmpeg with the brand flag, but i was told that ffmpeg doesn't support mp42 so i suppose that is just a labeling tweak, not a real mp42. In fact doing so it says


Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/iso2/avc1/mp41)


So it still shows mp41/isom on the Codec ID.

These entries are the list of compatible brands (they are hardcoded in libmp4v2 to "mp42/isom" but set dynamically by libavformat). The spec demands (ISO/IEC 14496-14:2003, page 6) only that any of mp41 or mp42 to be present in the list.

The only real difference between the output of libmp4v2 and libavformat I am aware of is that libmp4v2 writes iods (the initial object descriptor box) by default, while libavformat defaults to skipping it. According to the specification (ISO/IEC 14496-14:2003, page 7), iods is not mandatory in mp42.

I don't see any evidence that the output of libavformat is less ISO/IEC 14496-14:2003 than the output of libmp4v2.

QuoteYes i need to have proper mp42 files

I am sorry, but I really would prefer that you enlighten me which purpose this should serve (apart from purely academical interest).

avidemuxm

Thanks again for your answer.

Quote
These entries are the list of compatible brands (they are hardcoded in libmp4v2 to "mp42/isom" but set dynamically by libavformat). The spec demands (ISO/IEC 14496-14:2003, page 6) only that any of mp41 or mp42 to be present in the list.

The only real difference between the output of libmp4v2 and libavformat I am aware of is that libmp4v2 writes iods (the initial object descriptor box) by default, while libavformat defaults to skipping it. According to the specification (ISO/IEC 14496-14:2003, page 7), iods is not mandatory in mp42.

I don't see any evidence that the output of libavformat is less ISO/IEC 14496-14:2003 than the output of libmp4v2.
So you think that fmpeg is writing true mp42 files when using the brand flag?

QuoteYes i need to have proper mp42 files

Quote
I am sorry, but I really would prefer that you enlighten me which purpose this should serve (apart from purely academical interest).
Oh no sorry me, i thought it was not relevant, in fact i don't have much information, i was just requested to convert some videos from mp41 to mp42 (some kind of auditing/archiving reason but not entirely sure).

Those videos were originally mp42 and remuxed (without reencoding) to mp41. I was provided only one of those videos in the original mp42 format to check headers/metadata.

Using that original video and the remuxed version of that video i saw extracting the streams (without reencoding) that both video and audio streams are binary equal on both the mp41 and mp42. I mean the video stream extracted from the mp41 video version is binary equal to the video stream extracted from the mp42 video version, and the same for the audio streams.

So the difference seems to be only on headers/metadata/structure, that's why i was trying to remux them back to mp42 without re-encoding. Do you know if there is a proper tool to get a tue mp42 file without reencoding?

Thanks again

eumagga0x2a

Quote from: avidemuxm on June 04, 2019, 01:46:58 AM
So you think that fmpeg is writing true mp42 files when using the brand flag?

I assume that what ffmpeg writes is valid both when parsed as ISO/IEC 14496-1:2001 (mp41) and ISO/IEC 14496-14:2003 (mp42), so slapping a mp42 ftyp at the file is just for looks (for the sake of a yet unknown device or application which cares about it). From this point of view, the output is true (=valid) mp42. Always. Stick a label you want on it.

Quotein fact i don't have much information, i was just requested to convert some videos from mp41 to mp42 (some kind of auditing/archiving reason but not entirely sure).

In other words, the request lacks substance as the real problem to solve remains unknown.

QuoteSo the difference seems to be only on headers/metadata/structure

If the "mp41" brand is just the result of remuxing the video with libavformat, then most likely just the 4 bytes of the ftyp box (bytes 9 to 12 of the file) should be changed to mp42. That's all.

avidemuxm

Yes unfortunately is old the information i got. But i'll ask again if mp4v2 is strictly needed, eventually i would need to use an old avidemux version where the old mp4v2 muxer was available.

Despite that i have one more question, is there a way to add through avidemux some custom metadata fields besides the encoded/tagged date? Cause no matter if i use mp4v1 or mp4v2 I need to add some metadata like one called "TSZ", seems to be some copyright thing.

Thanks

eumagga0x2a

Quote from: avidemuxm on June 04, 2019, 03:41:35 PM
Yes unfortunately is old the information i got. But i'll ask again if mp4v2 is strictly needed, eventually i would need to use an old avidemux version where the old mp4v2 muxer was available.

The MP4v2 muxer is still present in Avidemux MinGW builds ("win64" instead of "vsWin64"). Of couse, it lacks many nice features the MP4 (libavformat) muxer has, especially regarding support for HEVC as libmp4v2 development has mostly ceased years ago.

Quotes there a way to add through avidemux some custom metadata fields besides the encoded/tagged date?

No, you will have to use a different tool (e.g. ffmpeg) then.

avidemuxm

Quote from: eumagga0x2a on June 04, 2019, 04:23:09 PM

The MP4v2 muxer is still present in Avidemux MinGW builds ("win64" instead of "vsWin64"). Of couse, it lacks many nice features the MP4 (libavformat) muxer has, especially regarding support for HEVC as libmp4v2 development has mostly ceased years ago.


Thank for that, i didn't found the win64 version, but the 2.7.2 win32 version available in sourceforge has the Mp4v2 muxer.

eumagga0x2a

Quote from: avidemuxm on June 08, 2019, 06:40:47 PM
i didn't found the win64 version

https://avidemux.org/nightly/win64/

win32 builds are generated from the legacy-compat branch with older ffmpeg in a very old MXE to provide something capable of running on Windows XP.

taylordm

VLC is having a specific problem with the mp4 files produced by the MP4 Muxer, but not the files produced by the MP4v2 Muxer. 

I have a work flow where I use Avidemux to add a vocal track to a karaoke video that already has an instrumental track.  I then can use my media manager to launch VLC in normal mode for Karaoke singing or in practice mode with the VLC "--audio-track=1" switch, that selects the vocals track.  When I use MP4v2 Muxer (in version 2.7.1) this works perfectly.  When I use the MP4 Muxer (in either ver 2.7.1 or 2.7.3) this fails,  The video will play and both audio tracks are present, but audio is set to disabled when the "--audio-track=1" switch is used.  I can manually select either audio track and they will play, but that is cumbersome to do for each track in the playlist since I don't usually hold the keyboard while singing.  If the video is started normally without selecting an audio track or selecting the first (track=0) then it plays correctly.

The codec information (from VLC) for the second audio track looks the same in both the working and non-working files. 
Codec: MPEG Audio layer 1/2 (mpga)
Type: Audio
Channels: Stereo
Sample Rate: 44100 Hz
Bits per sample: 32
Bitrate: 192 kb/s

Can we keep MP4v2 active/available until this problem is figured out.

thanks

eumagga0x2a

I looks strange to me that VLC gives the "Track enabled" flag in the track header (tkhd) atom prevalence over command line options. Neither mpv, mplayer nor ffplay behave like that.

Whatever, should be fixed by [muxerMp4] Set track enabled flag for all audio tracks to appease VLC. If it turns out to be that this change confuses QuickTime & Co., I'll revert it.

eumagga0x2a

Please try the MP4 muxer in the latest nightly (190610) --> https://avidemux.org/nightly/vsWin64/