Hello,
Maybe an expert can venture a guess...
After slicing an MP4 video at keyframes using AviDemux, I notice the audio in the sliced video is about 200ms out of sync.
FWIW, here's what ffprobe says about the 1) full input video, and 2) the sliced video:
ffprobe input.mp4
Duration: 00:52:44.56, start: 0.000000, bitrate: 6179 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 5986 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
Metadata:
creation_time : 2020-12-17T18:47:59.000000Z
handler_name : ?Mainconcept Video Media Handler
vendor_id : [0][0][0][0]
encoder : AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
creation_time : 2020-12-17T18:47:59.000000Z
handler_name : #Mainconcept MP4 Sound Media Handler
vendor_id : [0][0][0][0]
Stream #0:2(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
Metadata:
creation_time : 2021-01-26T08:52:08.000000Z
handler_name : GPAC MPEG-4 OD Handler
Stream #0:3(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
Metadata:
creation_time : 2021-01-26T08:52:08.000000Z
handler_name : GPAC MPEG-4 Scene Description Handler
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 0 for input stream 3
ffprobe sliced.input.mp4
Duration: 00:25:07.68, start: 0.000000, bitrate: 6186 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 5993 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
Metadata:
creation_time : 2021-02-07T17:48:58.000000Z
vendor_id : [0][0][0][0]
encoder : JVT/AVC Coding
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
creation_time : 2021-02-07T17:48:59.000000Z
vendor_id : [0][0][0][0]
And here's a screenshot when slicing the video:
(https://i.postimg.cc/htfbK0FK/image.png)
Thank you.
0. Please use the latest nightly, the 2.7.6 release is very old. Of course, if you are on Windows XP (not just a W2K theme), you are out of luck.
1. Please don't use the obsolete MP4v2 muxer, use the MP4 one.
2. If a H.264 stream contains B-frames, Avidemux needs to delay the video track by the number of reference frames. It should not cause any loss of sync, however.
Thanks.
I'm indeed running Win32, so it looks I'm outta luck :-/
http://www.avidemux.org/nightly/win32/
Install Linux (Fedora / Debian 10 / Ubuntu 20.x), make sure you have at least 5 GB free storage, install MXE deps https://mxe.cc/#requirements, follow the howto (https://github.com/mean00/avidemux2/blob/master/cross-compiling.txt), run your own win32 build.
edit: The build will require Windows 7 at least.
I don't mind Windows, but I do mind having to upgrade all the apps to move to a 64-bit Win10 host, hence the procrastinating :-)
Upgrading to the latest Win32 release (2.7.7) and using the "MP4 Muxer" made no difference. I did solve the problem by checking the "Shift" option and adding 200ms.
Thank you.
Was A/V in the source in sync when played in Avidemux?
Was A/V in a cut-out in sync when played in Avidemux?
Else a sample may help.
By the way, unless you experience crashes, you really should select the "DXVA2" (actually DirectX) video display rather than unaccelerated "Qt" / "RGB" one.