Log in

View Full Version : MeGUI and MP4 Muxer. Do not work with negative delay.


rhaz
10th May 2013, 21:09
Actually its not just MeGUI, I searched entire net, mp4box, megui, yamb and etc. I even tracked down a thread in these forums from 2006 with same question: How in the world to mux audio with negative delay and get a proper results?

I encode .mkv (run File indexer and make .avs first) into lower quality .mp4 videos (using x264) and I also convert audio into AAC in .mp4 format too. So what I do is mux mp4 video and mp4 audio together into one mp4. And it works all fine with included MP4 muxer into MeGUI. It also works fine with positive delay, but when I want to add negative delay i.e. -200 miliseconds, all the fun begins.

I already posted that problem in one of the MeGUI threads, but no response, so I am creating this thread. There's a link to a log of muxing with negative delay: https://pastee.org/5y78n

Now what I get after muxing with negative delay:
I get .mp4 with double length of the movie, which means, somehow it muxes in the same movie twice and doubles its length and it also reduces its quality to fit into same exact size which you would get by using no delay or positive delay to get a fine working valid mp4. In overall its just some crazy shit. And I tried doing same with different movies, same defect.

Why in the world there is no such a simple tool which is able to mux negative delay audio? With mkv its a piece of cake, but mp4 makes it special for some reason.

Kurtnoise
11th May 2013, 11:18
Your video and Audio input files have the same name...Maybe, that's why you have the length doubled. Did you run the one click encoder or something else ?

About negative delay...most of the mp4 current tools are not aware of A/V delays.

sneaker_ger
11th May 2013, 12:35
l-smash should be able to do it:
http://sada5.sakura.ne.jp/files/index.php?folder=TC1TTUFTSA== (there should be newer versions, but I don't have the url on this pc)

muxer.exe -i input.h264 -i input.aac?encoder-delay=xxxx -o output.mp4

The delay is in samples and not in milliseconds and it's only for negative delays so a minus "-" is not allowed/necessary. Not sure if it already supports aac in mp4 or only the adts variant as input.

A better option for movies, IMHO: do not rely on any muxer/demuxer delay support and already encode the audio with the delay in mind.

rhaz
11th May 2013, 16:06
A better option for movies, IMHO: do not rely on any muxer/demuxer delay support and already encode the audio with the delay in mind.

Holy crap sneaker! That's an amazing idea, how didn't I came up with this myself?

Thanks for this great idea. It's easy to do that in MeGUI.