View Full Version : MP4 muxers
tebasuna51
28th February 2024, 14:10
What would be a good alternative tool for mp4 files?
Maybe GPAC-MP4Box, there are a link to v2.2-rev0 here (https://forum.doom9.org/showthread.php?p=1981982#post1981982) 2022-12-21
And MeGUI update load a v2.3 (rev 349) 2023-07-30
For latest stable release 2.2.1 27/04/2023 and Nightly builds https://gpac.io/downloads/gpac-nightly-builds/
qyot27
28th February 2024, 21:05
I had a feeling that ffmpeg mp4 was kinda broken. But didn't expect it to be this bad...
What would be a good alternative tool for mp4 files?
L-SMASH? Last I knew, it was still attempting to be spec-compliant.
FranceBB
28th February 2024, 23:34
Maybe GPAC-MP4Box
+1 for MP4Box, I've been using for years and it has been reliably muxing all my files in mp4.
It's nice, easy to use and cross platform.
tormento
29th February 2024, 10:13
Is there any reliable GUI for it?
ChaosKing
29th February 2024, 11:14
L-SMASH? Last I knew, it was still attempting to be spec-compliant.
l-smash can create mp4 files?
StainlessS
29th February 2024, 12:25
I still use Yamb on occasion, but it can be a bit temperamental.
tormento
29th February 2024, 15:38
I still use Yamb on occasion, but it can be a bit temperamental.
I used Yamb but got broken with latest builds.
FranceBB
29th February 2024, 15:46
Is there any reliable GUI for it?
MP4Box GUI 0.6.0.6, but it runs on an older version.
It will be totally fine for H.264 + AAC in MP4, though. ;)
Here: https://www.videohelp.com/software/My-MP4Box-GUI
I prefer to do this, though:
mp4box.exe -add "raw_video.h264" -add "audio.aac" "final_output.mp4"
pause
StainlessS
29th February 2024, 18:43
My ver$ Yamb about box shows v2.0,
but Changelog shows,
Changes for the 2.1.0.0 beta 2 release (2009/06/29)
[Addons]
- TS/M2TS Extraction is now managed by EAC3to.
- QuickTime compatibility for AVC streams containing B-Frames.
- appleTV compliancy (not tested on such device though...).
- Windows Seven support.
[Improvements]
- Better Internal Files detection.
- Better AC3-in-MP4 files creation.
- Better MKVExtract detection.
- Few tunings in the NSIS script.
[Updates]
- MediaInfo library (0.7.17)
- MP4Box (0.4.6-dev_20090629)
- MKVExtract (2.9.5)
- EAC3to (3.16)
[Regression]
- Disable temporarily the ASS/SSA Converter. Need to find a better algorithm...
[Fixes]
- Fix splitting command lines errors.
- Fix Matroska tasks convertion.
- Fix mkvtoolnix libs missing from the installer.
- Several other fixes.
It also has in the folder,
MediaInfo.dll
libgpac.dll
ea3to
mkvextract
Mp4Box
Although probably older versions.
I think I usually do one thing at once, then re-run Yamb again for any further operations. [avoids most problems]
I could put the ver$ I have up if needed.
LigH
29th February 2024, 20:46
l-smash can create mp4 file?
Yes, it is actually a whole software suite (https://github.com/l-smash/l-smash). You may only know L-SMASH Works which only uses the MP4 (or more generally, its ISO Base Media File) demultiplexer out of it in an Avisynth/VapourSynth source filter.
Unfortunately it is quite hard to find a standalone binary of the L-SMASH multiplexer today. I found an old one from 2014 (https://www.nmm-hd.org/newbbs/viewtopic.php?t=361) by 06_taro who used to be a member here too... (and that link is dead now)
jones1913
29th February 2024, 21:43
Is there any reliable GUI for it?
maybe there is something suitable in my signature...
StvG
29th February 2024, 22:23
Unfortunately it is quite hard to find a standalone binary of the L-SMASH multiplexer today. I found an old one from 2014 (https://www.nmm-hd.org/newbbs/viewtopic.php?t=361) by 06_taro who used to be a member here too... (and that link is dead now)
Here (https://files.catbox.moe/487sjg.7z) the binaries from the latest commit of the vimeo fork (https://github.com/vimeo/l-smash).
Use xxx --help to see the available commands.
tebasuna51
1st March 2024, 13:40
Make a GUI to use MP4Box is really easy, but add other tools to extract and check if streams (video, audio, subs) are mp4 compliants, and convert them if not, is more complicated and require maintain updated all the tools used.
Talking about MP4Box GUI's I recommend MeGUI with updated tools to extract and encode video and audio.
Tool MeGUI Yamb MP4.tool My MP4Box GUI
------------ ----- ---- -------- --------------
MP4Box 2023 2009 2013 2013 installer
MediaInfo 2018 2009 2014 ? not installed
eac3to 2022 2009 - ?
MkvExtract 2023 - 2014 ?
tsMuxer 2023 - 2013 ?
AviSynth 2020+ - - -
ffmpeg 2022 - - -
x264/x265 2023 - - -
ChaosKing
1st March 2024, 16:21
Megui has auto updates so I'll take that, thx.
This seems also interesting https://www.bento4.com/
SeeMoreDigital
1st March 2024, 18:26
It would be great if someone could develop a new .mp4 muxer and GUI :D
LigH
1st March 2024, 22:14
New uploads (MSYS2, MinGW32 / MinGW64, GCC 13.2):
MP4Box 2.3-DEV-rev937-g69b32cebf-ab-suite (https://www.mediafire.com/file/hi6fwml5oncymrd/MP4Box_2.3-DEV-rev937-g69b32cebf-ab-suite.7z/file)
GPAC 2.3-DEV-rev937-g69b32cebf-ab-suite (https://www.mediafire.com/file/5a6o1rqcih9b99e/gpac_2.3-DEV-rev937-g69b32cebf-ab-suite.7z/file)
Another interactive MP4/MKV remux GUI tool: BOX4 (https://www.videohelp.com/software/BOX4) (not sure which multiplexers it uses internally)
SeeMoreDigital
1st March 2024, 23:06
Was there an MP4 muxer that allowed you to alter and amend certain parameters of an h.264 elementary stream prior to muxing?
LigH
1st March 2024, 23:09
H264 Patcher and BDTools (https://www.videohelp.com/software/H264-Patcher-and-BD-Tools) maybe?
SeeMoreDigital
1st March 2024, 23:19
I think it had a GUI... It's a long time ago!
How mature is FFmpeg at .mp4 muxing?
AVIL
2nd March 2024, 00:04
I use avidemux from Mulder. I don't need do special treatement (demux, remux,...) but they are options to optimize for streaming and changing the time scale (I even don't know the utility of this). I can change the number of tracks in audio, even add from file. The mp4 muxed-remuxed is 100% compliant with my devices. I also use "LosslessCut", even the resulting video where equal to original, but I can do any elemental changes (rotate, change number of audio tracks,...). Is ffmpeg based, so compart their weakeness. And finally, I use tsmuxer, for quick demuxing (with the help of TsMuxerGui)
Brazil2
2nd March 2024, 00:29
MP4Box GUI 0.6.0.6, but it runs on an older version.
MP4-Mux-Tool uses recent versions of MP4Box ;)
https://github.com/jlw4049/MP4-Mux-Tool
kedautinh12
2nd March 2024, 02:12
New uploads (MSYS2, MinGW32 / MinGW64, GCC 13.2):
MP4Box 2.3-DEV-rev937-g69b32cebf-ab-suite (https://www.mediafire.com/file/hi6fwml5oncymrd/MP4Box_2.3-DEV-rev937-g69b32cebf-ab-suite.7z/file)
GPAC 2.3-DEV-rev937-g69b32cebf-ab-suite (https://www.mediafire.com/file/5a6o1rqcih9b99e/gpac_2.3-DEV-rev937-g69b32cebf-ab-suite.7z/file)
Another interactive MP4/MKV remux GUI tool: BOX4 (https://www.videohelp.com/software/BOX4) (not sure which multiplexers it uses internally)
What's different between of gpac and non-gpac?
LigH
2nd March 2024, 03:12
Please read:
https://gpac.io/
https://github.com/gpac/gpac/wiki/
In most cases related to (de-)multiplexing MP4 files, MP4Box is all you need, it is already complex enough; GPAC supports even more kinds of media manipulation by building "filter" chains and even trees. Do you remember GraphEdit for DirectShow filter graphs? GPAC is like that ... on steroids, but with a command line interface, and all in one binary.
SeeMoreDigital
2nd March 2024, 06:15
I've just remembered...
Many years ago I used DVBPortal's MP4Multiplexer/Demultiplexer as well. It used something called mp4creator.exe.
https://www.videohelp.com/software/MP4Muxer
EDIT: Needless to say mp4creator.exe is years out of date and not suitable for todays needs!
qyot27
2nd March 2024, 12:45
I've just remembered...
Many years ago I used DVBPortal's MP4Multiplexer/Demultiplexer as well. It used something called mp4creator.exe.
https://www.videohelp.com/software/MP4Muxer
GStreamer has a particularly nasty bug with AAC streams muxed into MP4 by mp4creator that causes it to stop playing about halfway through the track, as if the file is truncated. libavcodec-based players and even faad can play/decode the entire length without issue, any players using GStreamer can't.
The same file (re)muxed with ffmpeg is totally fine in GStreamer, though. So it specifically has to do with how mp4creator arranges the atoms or something.
manolito
11th March 2024, 17:38
https://forum.doom9.org/showthread.php?p=1998336#post1998336
I cannot reproduce this issue, probably because my work flow is different. :scared:
Short Explanation:
My sources are mostly from YouTube or similar sites downloaded in the MP4 format (avc video in HD and aac audio). I leave the video untouched and manipulate the audio slightly. Then I save the result in the MKV format (simply because my old Xtreamer box likes the MKV format better than MP4).
These files are perfect for my needs, but sometimes a friend asks me for a certain video file. And most of my friends are Apple fan boys and want the files in the MP4 format instead of my MKV files. In these cases I repack the files to the MP4 format using FFMpeg (just change the container, no other changes), and so far I never got any complaints about seeking issues.
After reading Myrsloik's post I got curious and tested some of my MP4 files created from MKV files. And I could not find any seeking issues. MediaInfo reports 2 separate audio streams for the MP4, so the file size is marginally higher, but I could not see any of the problems which Myrsloik points out.
So is this really an FFmpeg issue with MP4 files? Maybe I should mention that my FFmpeg version is from January 2022 (last version which supports the Fraunhofer FDK AAC codec). And I need to use this AAC codec because my Xtreamer box tends to choke on AAC audio files created with FFmpeg.
Can someone enlighten me please? Maybe even uploat an MKV source file which shows this behavior after converting it to MP4 using FFmpeg?
Cheers
manolito
SeeMoreDigital
21st March 2024, 11:35
Out of interest...
Are there any MP4 muxers that are able to support .m2ts files that contain 'Dolby TrueHD with an AC3 core', or is the AC3 core always removed?
Cheers
RBO
21st March 2024, 14:07
As a GPAC implementor I don't think I have access to any such stream. Don't hesitate to share one if you want us to have a look.
SeeMoreDigital
21st March 2024, 17:05
As a GPAC implementor I don't think I have access to any such stream. Don't hesitate to share one if you want us to have a look.Any Blu-ray disc which has been encoded with Dolby TrueHD will offer this provided the Dolby TrueHD audio stream is kept within the .m2ts container and not re-muxed into the .mkv container.
Failing the above... It's possible to add a lossy AC3 stream into any lossless Dolby TrueHD stream using UsEac3To v1.3.3
Failing that failing... I shall also look for a short sample :)
EDIT: With any luck this link to my Microsoft OneDrive should work: https://1drv.ms/v/s!Aj3f3LPxO1ZSiBGDCb8Icet083qE?e=SjePZf. Click on the download icon at the top left corner.
Video Dude
6th April 2024, 02:12
After reading Myrsloik's post I got curious and tested some of my MP4 files created from MKV files. And I could not find any seeking issues. MediaInfo reports 2 separate audio streams for the MP4, so the file size is marginally higher, but I could not see any of the problems which Myrsloik points out.
I also never had any problems with ffmpeg produced mp4 files, which are thousands of files over the years. However, I don't remux mkv, my sources are mp4 and ts. I never had a seek or playback problem in any software or hardware player. I do a lot of editing with VideoReDo with the ffmpeg mp4s and I'm able to scrub and framestep the video (both forward and back) without issue.
Can someone enlighten me please? Maybe even uploat an MKV source file which shows this behavior after converting it to MP4 using FFmpeg?
I think the test files can be found here
https://forum.doom9.org/showthread.php?p=1992736#post1992736
manolito
7th April 2024, 09:32
Thanks Video Dude for confirming my findings... ;)
I did try the test files from your link, but they were not too helpful. Mostly the source mkv files were already broken, so it was no surprise that the resulting MP4 files were broken as well. The scenario which Myrsloik describes is different:
His mkv cource file has no search issues, but the MP4 file he gets after converting the source to MP4 using FFmpeg does have thouse search issues. And I cannot reproduce this problem, at least not for my source files (AVC video and AAC audio).
Maybe this is different for other source formats, so it would be nice if Myrsloyk or someone else could provide a link to a short MKV clip which has no problems, but which after converting it to MP4 using FFmpeg does show these issues.
Thanks again and cheers
manolito
qyot27
26th April 2024, 20:03
GStreamer has a particularly nasty bug with AAC streams muxed into MP4 by mp4creator that causes it to stop playing about halfway through the track, as if the file is truncated. libavcodec-based players and even faad can play/decode the entire length without issue, any players using GStreamer can't.
The same file (re)muxed with ffmpeg is totally fine in GStreamer, though. So it specifically has to do with how mp4creator arranges the atoms or something.
...And not even two months later, FFmpeg started hitting the exact same issue as GStreamer on a fresh install of Ubuntu 24.04 with FFmpeg and mpv from git. mp4creator-muxed files are truncated halfway through, but the same file played back on an older (2022) build of mpv on Windows has the entire length. 24.04 repository versions of faad and mediainfo also both report the correct length.
But considering I am far more comfortable bisecting FFmpeg than I would be trying to do that with the relevant plugin for GStreamer, I was able to find the commit that causes the issue (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=836b8001c924deb9263b0f5b7c74ccfaab1f4fdc). The thing that doesn't make any sense is that that commit would have been present in the version of FFmpeg and mpv I was using on 23.10 just a couple days ago...where the issue wasn't happening. So I have to investigate further - my fear(?) is that while that commit may be the source of the issue for FFmpeg, it may have only been exposed and triggered because of a change in some other low-level part of the OS or even in GCC (which I suspect because trying to bisect the issue on 24.04 exhibited the same problem even with old versions between that commit and HEAD, which again, makes no sense when it didn't do this a couple months ago on 23.10).
EDIT: It seems to be a *bit* more nuanced than that. mpv had a couple of workarounds for FFmpeg's support of MP4 advanced editlists that was removed back in January. My build of mpv must have predated that, because reverting the removal commit only from mpv and not from FFmpeg allowed the file to work the way it was intended. So yeah, some of these commits in FFmpeg do affect the default behavior when consuming mp4creator-muxed files, but FFmpeg does have an -ignore_editlists option that controls that behavior which breaks these files, and setting that option to 'true' allows FFmpeg to see the correct length and decode the file as intended. On mpv's side, that same option can be passed through --demuxer-lavf-o to achieve the same thing (although I don't know what setting that unconditionally would do as far as video playback is concerned), so no commit reverting is necessary. I hope this is the last time I have to say anything about this.
LigH
19th July 2024, 20:26
New uploads (MSYS2, MinGW32 / MinGW64, GCC 14.1):
MP4Box 2.5-DEV-rev461-ge2250d68-ab-suite (https://www.mediafire.com/file/td7byyj40s0atrf/MP4Box_2.5-DEV-rev461-ge2250d68-ab-suite.7z/file)
GPAC 2.5-DEV-rev461-ge2250d68-ab-suite (https://www.mediafire.com/file/jh4c3r160sv8e9d/gpac_2.5-DEV-rev461-ge2250d68-ab-suite.7z/file)
FranceBB
22nd July 2024, 07:53
New uploads (MSYS2, MinGW32 / MinGW64, GCC 14.1):
MP4Box 2.5-DEV-rev461-ge2250d68-ab-suite (https://www.mediafire.com/file/td7byyj40s0atrf/MP4Box_2.5-DEV-rev461-ge2250d68-ab-suite.7z/file)
GPAC 2.5-DEV-rev461-ge2250d68-ab-suite (https://www.mediafire.com/file/jh4c3r160sv8e9d/gpac_2.5-DEV-rev461-ge2250d68-ab-suite.7z/file)
Uh, I completely missed the fact that you were releasing standalone MP4Box builds. Up until now I've had to "extract" them from GPAC. I don't particularly care about GPAC, but I'll take a new build of MP4Box any day. Thank you! :)
LigH
22nd July 2024, 07:57
forwards the :thanks: to the MABS maintainers
filler56789
22nd July 2024, 17:01
New uploads (MSYS2, MinGW32 / MinGW64, GCC 14.1):
MP4Box 2.5-DEV-rev461-ge2250d68-ab-suite (https://www.mediafire.com/file/td7byyj40s0atrf/MP4Box_2.5-DEV-rev461-ge2250d68-ab-suite.7z/file)
GPAC 2.5-DEV-rev461-ge2250d68-ab-suite (https://www.mediafire.com/file/jh4c3r160sv8e9d/gpac_2.5-DEV-rev461-ge2250d68-ab-suite.7z/file)
:thanks: for the fresh binaries.
Within some days, I will check whether the newest MP4Box finally started supporting VC-1 video and DTS audio :rolleyes:
Very-unlikely, I know, but anyway, it's always good to bash the GPAC devilopers :sly: :p :D
LigH
14th September 2024, 10:08
New uploads (MSYS2, MinGW32 / MinGW64, GCC 14.2.0):
MP4Box 2.5-DEV-rev503-g25797108-ab-suite (https://www.mediafire.com/file/x2v56tvk079dotd/MP4Box_2.5-DEV-rev503-g25797108-ab-suite.7z/file)
GPAC 2.5-DEV-rev503-g25797108-ab-suite (https://www.mediafire.com/file/gnujwfjcuyiob1x/gpac_2.5-DEV-rev503-g25797108-ab-suite.7z/file)
FranceBB
14th September 2024, 11:22
Thanks for the new MP4Box build, as usual. :)
LigH
8th November 2024, 14:30
New uploads (MSYS2, MinGW32 / MinGW64, GCC 14.2):
MP4Box 2.5-DEV-rev816-g1bc97198-ab-suite (https://www.mediafire.com/file/6pk7cmxlbithy8i/MP4Box_2.5-DEV-rev816-g1bc97198-ab-suite.7z/file)
GPAC 2.5-DEV-rev816-g1bc97198-ab-suite (https://www.mediafire.com/file/97ufh0ckj59km0l/gpac_2.5-DEV-rev816-g1bc97198-ab-suite.7z/file)
FranceBB
9th November 2024, 00:12
Oh, a new version of MP4Box, nice.
Time to update everything. :)
Thank you as always.
GeoffreyA
17th November 2024, 08:08
I have been using FFmpeg to create MP4s for years and never had much of an issue, except perhaps during 2020, when I found the MP4s temperamentally working, or not, on our Samsung TV. (Though that could have been due to the USB drives. I don't quite know, except that the problem went away; I took it as there being some change in the muxer.) I prefer FFmpeg, being familiar with its syntax and metadata switches; and changing means changing scripts and more headache.
Objectively, how well does MP4Box mux compared to FFmpeg? Or, put differently, is there any tool that is the MKVToolNix of MP4s?
tebasuna51
17th November 2024, 10:17
... is there any tool that is the MKVToolNix of MP4s?
Read this thread (it is still short) about GUI's for mp4 mux.
GeoffreyA
17th November 2024, 10:47
Read this thread (it is still short) about GUI's for mp4 mux.
Thanks, tebasuna. I actually dont want a GUI. I meant, what is the reference-quality muxer? I noticed that, in this thread, many are recommending MP4Box. If it is better than FFmpeg, I'm willing to switch. Having said that, I don't have any issues with FFmpeg's MP4 muxing at present. (In fact, I found issues with its MKV muxer.)
LigH
17th November 2024, 15:06
Objectively, the GPAC suite is the de-facto standard of MP4 tools; and MP4Box is part of it (a more user friendly CLI and less generic toolbox than GPAC).
If your hardware has issues, then it might support only a part of the MP4 standard and expect default values or extra flags MP4Box is able to provide but maybe only when you add them to the command line parameters explicitly.
GeoffreyA
17th November 2024, 16:52
Thank you, LigH. Well, I think I'm inclining to give MP4Box a go for the final muxing of permanent encodings.
FranceBB
18th November 2024, 00:36
I've been using MP4Box for years and I've never had a problem.
is there any tool that is the MKVToolNix of MP4s?
Yes, you can consider MP4Box as the "MKVToolnix" of mp4, a bit like TSMuxer is the "MKVToolnix" of .ts files.
I generally encode the raw_video.h264 with x264, then audio.aac with NeroAAC and lastly mux them both together with mp4box.
The simplest possible syntax would look something like this:
x264.exe "AVS Script.avs" --preset medium --ref 4 --level 4.1 --profile High --crf 22 --vbv-maxrate 25000 --vbv-bufsize 25000 --deblock -1:-1 --overscan show --colormatrix bt709 --range tv --log-level info --thread-input --opencl --transfer bt709 --colorprim bt709 --videoformat component --nal-hrd vbr --output "I:\raw_video.h264"
Bepipe.exe --script "Import(^AVS Script.avs^)" | neroAacEnc.exe -lc -br 320000 -if - -of "I:\audio.aac"
mp4box.exe -add "I:\raw_video.h264" -add "I:\audio.aac" "I:\final_output.mp4"
pause
so... no need to use FFMpeg, not even for audio. ;)
GeoffreyA
18th November 2024, 15:05
Appreciate your help, FranceBB. Generally, what I do is first process the audio with FFmpeg, piping to qaac, and then encode the final video, pulling in the encoded audio by direct-stream copy, and it works well. Using MP4Box will necessitate only a small change in the script at the end. Indeed, I'll still encode with FFmpeg: I consider it a crime not to do so! :)
This is my audio script:
set out_i=-23
set out_tp=-2
set out_lra=8.5
set in_i=-13.4
set in_tp=8.4
set in_lra=24.1
set in_thresh=-26.4
set tg_offset=1
::ffmpeg -i %1 -map 0:a:0 -af aresample=ochl=stereo,loudnorm=i=%out_i%:tp=%out_tp%:lra=%out_lra%:print_format=summary -f null -
ffmpeg -i %1 -map 0:a:0 -af aresample=ochl=stereo:osr=192000:resampler=soxr:precision=33,
loudnorm=i=%out_i%:tp=%out_tp%:lra=%out_lra%:measured_i=%in_i%:measured_tp=%in_tp%:measured_lra=%in_lra%:measured_thresh=%in_thresh%:offset=%tg_offset%:linear=true:print_format=summary,
aresample=48000:resampler=soxr:precision=33 -c:a pcm_f32le -f wav - | "%qaac%" --tvbr 91 --ignorelength --no-delay --verbose - -o "audio.m4a"
And the final video one (edited for clarity):
set src=FILM_NAME.mkv
set out=FILM_NAME.mp4
set name=FILM_NAME
set crop=1920:816:0:132
set param_colour=-colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv
ffmpeg %param_colour% -i "%src%" -i "audio.m4a" -map 0:0 -map 1:a -map_metadata -1 -map_chapters -1 -metadata title="%name%"
-metadata:s:v language=und -disposition:v:0 default -metadata:s:a:0 language=eng -disposition:a:0 default
-vf crop=%crop% -c:v libx264 -profile:v high -level 4.1 -preset veryslow -tune film -aq-mode 3 -crf 23 -c:a copy "%out%"
filler56789
19th November 2024, 15:59
:thanks: for the fresh binaries.
Within some days, I will check whether the newest MP4Box finally started supporting VC-1 video and DTS audio :rolleyes:
Very-unlikely, I know, but anyway, it's always good to bash the GPAC devilopers :sly: :p :D
Well, "some days" became "some months" :-/ ,
but anyway:
Just confirming, after all these years, MP4Box still does not want to support VC-1 video nor DTS audio.
There is no "lack of time", there is just lack of interest. :mad:
https://sourceforge.net/p/gpac/discussion/287546/thread/43881fa9/
As one of the GPAC devilopers told me in their GitHub page,
he already had all the code written. But what he didn't dare to say is this, they (GPAC) will not implement the improvements, unless they receive some big fat money in return. *THUMBS DOWN*
https://github.com/gpac/gpac/issues/536
Kurt.noise
20th November 2024, 05:56
muxing dts streams within mp4box works in fact...
General
Complete name : E:\Backup\Input.av1-muxed.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom)
File size : 107 MiB
Duration : 2 min 15 s
Overall bit rate mode : Variable
Overall bit rate : 6 592 kb/s
Frame rate : 24.000 FPS
Encoded date : 2024-11-20 04:50:36 UTC
Tagged date : 2024-11-20 04:50:36 UTC
Writing application : GPAC-2.5-DEV-rev707-g9c261926-master
Video
ID : 1
Format : AV1
Format/Info : AOMedia Video 1
Format profile : Main@L4.0
Codec ID : av01
Duration : 2 min 15 s
Bit rate : 305 kb/s
Maximum bit rate : 987 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.006
Stream size : 4.95 MiB (5%)
Encoded date : 2024-10-26 16:39:29 UTC
Tagged date : 2024-11-20 04:50:37 UTC
Color range : Limited
Codec configuration box : av1C
Audio
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : dtsc
Duration : 2 min 15 s
Bit rate mode : Variable
Bit rate : 6 283 kb/s
Maximum bit rate : 9 423 kb/s
Sampling rate : 48.0 kHz
Stream size : 102 MiB (95%)
Language : English
Default : Yes
Alternate group : 1
Encoded date : 2024-11-20 04:50:36 UTC
Tagged date : 2024-11-20 04:50:37 UTC
tebasuna51
20th November 2024, 12:04
muxing dts streams within mp4box works in fact...
How do you make that mux?
With mp4box from GPAC-2.5-DEV-rev707-g9c261926-master (like your MediaInfo) and with the last (2024-11-07) mp4box from GPAC-2.5-DEV-rev816-g1bc97198-ab-suite I always get a error:
[Importer] Error probing TestMA.dts
Failure while importing import: Filter not found for the desired type
Tested for dtsMA and dts standard (core)
BTW I can understand the lack of interest for this old, obsolete and not-free codec when can use AAC for lossy compression or ALAC and FLAC for lossless audio with better compression ratio and free use.
Kurt.noise
20th November 2024, 13:45
How do you make that mux?
1/ I took a win64 installer from there : https://gpac.io/downloads/gpac-nightly-builds/ & extract it into a folder.
2/ Then, apply this command :
mp4box.exe -add input.mkv#trackID=1:fps=24000/1001 -add audio.dts#trackID=1:lang=eng -new output.mp4
Info from audio.dts :
General
Complete name : audio.dts
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
File size : 51.4 MiB
Overall bit rate mode : Variable
Audio
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Bit rate mode : Variable
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Info from output.mp4 :
General
Complete name : output.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/avc1)
File size : 170 MiB
Duration : 3 min 25 s
Overall bit rate mode : Variable
Overall bit rate : 6 935 kb/s
Frame rate : 23.976 FPS
Encoded date : 2024-11-20 12:35:15 UTC
Tagged date : 2024-11-20 12:35:15 UTC
Writing application : GPAC-2.5-DEV-rev707-g9c261926-master
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference fra : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3 min 25 s
Bit rate : 4 829 kb/s
Maximum bit rate : 19.2 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 (24000/1001) FPS
Minimum frame rate : 23.810 FPS
Maximum frame rate : 24.390 FPS
Color space : RGB
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.097
Stream size : 118 MiB (70%)
Title : Piste Vidéo
Writing library : x264 core 146 r2538 121396c
Encoding settings : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=15.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=30000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language : English
Encoded date : 2024-11-20 12:35:15 UTC
Tagged date : 2024-11-20 12:35:16 UTC
Color range : Limited
Matrix coefficients : Identity
mdhd_Duration : 205202
ColorSpace_Original : YUV
Codec configuration box : avcC
Audio
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : dtsc
Duration : 3 min 25 s
Bit rate mode : Variable
Bit rate : 2 100 kb/s
Maximum bit rate : 2 746 kb/s
Sampling rate : 48.0 kHz
Stream size : 51.4 MiB (30%)
Title : Piste Audio
Language : English
Default : Yes
Alternate group : 1
Encoded date : 2024-11-20 12:35:15 UTC
Tagged date : 2024-11-20 12:35:16 UTC
Info from input.mkv :
General
Unique ID : 194964996866116433750323166388027802333 (0x92ACE47EA0A15008964FF4FED95642DD)
Complete name : input.mkv
Format : Matroska
Format version : Version 4
File size : 170 MiB
Duration : 3 min 25 s
Overall bit rate mode : Variable
Overall bit rate : 6 931 kb/s
Frame rate : 23.976 FPS
Encoded date : 2015-04-06 09:49:53 UTC
Writing application : mkvmerge v6.9.1 ('Blue Panther') 64bit built on Apr 18 2014 18:23:38
Writing library : libebml v1.3.0 + libmatroska v1.4.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference fra : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 3 min 25 s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 146 r2538 121396c
Encoding settings : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=15.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=30000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Codec ID : A_DTS
Duration : 3 min 25 s
Bit rate mode : Variable
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Language : English
Default : Yes
Forced : No
All ffmpeg libraries from the installer are required in this case.
tebasuna51
20th November 2024, 14:17
1/ I took a win64 installer from there : https://gpac.io/downloads/gpac-nightly-builds/ & extract it into a folder.
Maybe we need the full gpac package instead the standalone MP4Box.exe
EDIT: like you say in the edited post
LigH
20th November 2024, 17:12
If MP4Box built by M-AB-S is unable to multiplex dts, I wonder if that requires a specific configuration parameter or an additional patch to enable it.
In my MP4Box.exe I can find "DTS", "DTS-HD", "Coherent Acoustics" etc. being mentioned.
PS: It seems that MP4Box.exe is not able to print out a list of supported codecs; instead, gpac.exe from the same build does report some list. In my case:
dstc [O]: DTS Coherent Acoustics and Digital Surround Audio (audio/dts)
dtsh [O]: DTS-HD High Resolution Audio and DTS-Master Audio (audio/dts)
dstl [O]: DTS-HD Substream containing only XLLAudio (audio/dts)
dtse [O]: DTS Express low bit rate Audio (audio/dts)
dtsx [O]: DTS-X UHD Audio Profile 2 (audio/dts)
dtsy [O]: DTS-X UHD Audio Profile 3 (audio/dts)
Apparently, all the DTS formats are only supported for output, means demultiplexing, but not multiplexing...
PPS: Did you notice the typos in the FourCC's? gpac issue 3044 (https://github.com/gpac/gpac/issues/3044) reported
And ... it's gone. At least the typos. Quick response.
RBO
20th November 2024, 20:04
Discovering this discussion thanks to @LigH bug report :thanks:
I think VC-1 is supported now. Let us know (https://github.com/gpac/gpac/issues) politely if you see any issue.
By the way we've also been working on a GUI (https://gui.gpac.io) to help people visualize the processing pipeline. It includes the capability to add "templates". I had planned to post about it specifically, but let me know about your needs (in a specific topic if it makes more sense).
LigH
20th November 2024, 20:10
Hello there :)
The typos got fixed quickly. Still open: The question why DTS is only supported as output in a self-compiled MP4Box, while it works in your distributed version as input too.
SeeMoreDigital
20th November 2024, 20:34
By the way we've also been working on a GUI (https://gui.gpac.io) to help people visualize the processing pipeline. It includes the capability to add "templates". I had planned to post about it specifically, but let me know about your needs (in a specific topic if it makes more sense).Oh wow... That should help people like me ;)
filler56789
20th November 2024, 21:05
BTW I can understand the lack of interest for this old, obsolete and not-free codec when can use AAC for lossy compression or ALAC and FLAC for lossless audio with better compression ratio and free use.
DTS's D.C.A. is not more obsolete or less useful than the ultra-low-bitrate audio codecs from the 3GP era. GPAC's lack of interest is purely a matter of (bad) taste, there is no "technicality" involved.
I think VC-1 is supported now. Let us know (https://github.com/gpac/gpac/issues) politely if you see any issue.
Well, do not expect any "politeness" from me while you all don't buy and swallow some deciliters of HONESTY.
It's fine to say you will not do this or that because you don't want to do this or that.
But it's very bad to pretend that your non-activity is caused by "lack of time" or because "oh the real world issues (*) keep me busy 24x7" :rolleyes:
(*) Hello Archie ;)
RBO
21st November 2024, 00:17
Still open: The question why DTS is only supported as output in a self-compiled MP4Box, while it works in your distributed version as input too.
Maybe a difference in FFmpeg support? What does "ffmpeg -codecs | grep -i dts" (or equivalent) give?
GeoffreyA
21st November 2024, 06:32
New to MP4Box but noticed that there is no way to set a global title field or omit tagged date. Is that correct?
LigH
21st November 2024, 10:52
Maybe a difference in FFmpeg support? What does "ffmpeg -codecs | grep -i dts" (or equivalent) give?
Does MP4Box (as part of GPAC) depend on ffmpeg? That would surprise me. Anyway:
ffmpeg -codecs
DEAILS dts DCA (DTS Coherent Acoustics) (decoders: dca) (encoders: dca)
ffmpeg -formats
DE dts raw DTS
D dtshd raw DTS-HD
ffmpeg -muxers
E dts raw DTS
ffmpeg -demuxers
D dts raw DTS
D dtshd raw DTS-HD
RBO
21st November 2024, 11:40
set a global title field
Usually people use -tags title="..."
omit tagged date
If you set a tag to null then it is removed, see https://wiki.gpac.io/MP4Box/mp4box-other-opts/.
Does MP4Box (as part of GPAC) depend on ffmpeg?
It does (optionally) since GPAC 1.0 in 2020. We rewrote the core of GPAC to reuse the same framework ("filters") that you see in the new 'gpac' app. Add -graph to your command-line to see the MP4Box processing graph.
Now MP4Box can leverage other libraries. FFmpeg is a kind of last-resort fallback.
To come back to your case, I would expect to see:
dtsc [ODE]: DTS Coherent Acoustics and Digital Surround Audio (audio/dts)
dtsh [O]: DTS-HD High Resolution Audio and DTS-Master Audio (audio/dts)
dtsl [O]: DTS-HD Substream containing only XLLAudio (audio/dts)
dtse [O]: DTS Express low bit rate Audio (audio/dts)
dtsx [O]: DTS-X UHD Audio Profile 2 (audio/dts)
dtsy [O]: DTS-X UHD Audio Profile 3 (audio/dts)
This is on Windows, correct?
LigH
21st November 2024, 11:53
Yes, Windows. Building from sources in an MSYS2/MinGW environment with GCC 14.2.
Does it require to configure with a special parameter to include ffmpeg support?
RBO
21st November 2024, 13:36
No. It really seems GPAC doesn't see the DTS codec in FFmpeg. I propose to reproduce your media-autobuild_suite build, let me know if you use specific options.
LigH
21st November 2024, 13:48
This archive (https://github.com/user-attachments/files/17603157/build.zip) contains a few relevant files, mainly media-autobuild_suite.ini (configured for many codecs with additional separate executables besides ffmpeg which gets built as static EXE with a custom set of libraries) and ffmpeg_options.txt; may be way too much for your needs, you can probably safely disable many codecs to run your test, the dca codec is part of libavcodec (the ffmpeg core) anyway, does not depend on additional libraries.
I would recommend to configure M-AB-S from scratch, select only static build, GPL, minimal set for ffmpeg; disable most codecs except GPAC/MP4Box, and enable building of separate codecs besides ffmpeg.
The resulting binaries are not installed in the Windows\System and not in the MSYS2 base environment but in local directories.
GeoffreyA
22nd November 2024, 09:10
Usually people use -tags title="..."
Thanks. It worked.
RBO
22nd November 2024, 14:21
M-AB-S builds GPAC before FFmpeg. So obviously GPAC can't rely on FFmpeg in these builds.
Second remark: M-AB-S seems to rely on libgpac_static only (code (https://github.com/m-ab-s/media-autobuild_suite/blob/7e35fbd5eecc22cb706c6a1e9ee39b806edd67ed/build/media-suite_compile.sh#L1574)). Does this script aims at building static binaries whenever possible?
FYI the build failed for me because ccache said there are too many files in the FFmpeg build. Retrying the build from a root folder. It takes a lot of time because I have continuous network issues and the system continuous updates dozens of git repos when relaunched.
LigH
22nd November 2024, 14:29
M-AB-S builds GPAC before FFmpeg. So obviously GPAC can't rely on FFmpeg in these builds.
Good to know, will tell the maintainers about it, so they can possibly rearrange.
Second remark: M-AB-S seems to rely on libgpac_static only (code (https://github.com/m-ab-s/media-autobuild_suite/blob/7e35fbd5eecc22cb706c6a1e9ee39b806edd67ed/build/media-suite_compile.sh#L1574)). Does this script aims at building static binaries whenever possible?
Not always. You can try to build ffmpeg with shared DLLs as well. Some other separate tools may prefer static building "always" if there used to be linking issues when trying to run a dynamic-link build in the past. Needs to be answered by the maintainers.
FYI the build failed for me because ccache said there are too many files in the FFmpeg build. Retrying the build from a root folder. It takes a lot of time because I have continuous network issues and the system continuous updates dozens of git repos when relaunched.
Very useful information. I know there is an issue with a "too long command line" when building ffmpeg with dynamic linking and a lot of enabled optional modules (that was the reason why I recommended to you to configure from scratch with a minimal ffmpeg with GPL license), and knowing that ccache may be the bottleneck here should help greatly solving it.
PS: See M-AB-S issue 2801 (https://github.com/m-ab-s/media-autobuild_suite/issues/2801).
filler56789
22nd November 2024, 16:27
F.W.I.W., I downloaded the latest GPAC-installer available at videohelp dot com,
and saw that it uses the (lib)av libraries...
BUT it cannot do everything that the (lib)av DLLs are capable of doing...
which raises the question:
¿what is the point, then? :rolleyes:
In comparison, the L-Smash muxer.exe rev1477 18a9ed2 filesize is only 569 kB. :cool:
And obviously, it does not depend on the FFmpeg stuff.
Bottom line is, something very-wrong cannot be right.
RBO
22nd November 2024, 18:59
BUT it cannot do everything that the (lib)av DLLs are capable of doing...
Ah. What can't it do?
the L-Smash muxer.exe rev1477 18a9ed2 filesize is only 569 kB
MP4Box built with with "--isomedia-only --static-bin --strip" is the closest comparable I think. It weighs around 1MB and handles network, multithreading, configurable cache, etc. Do you need something smaller? What's your need?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.