Saved audio track is shorter than it should be

Started by tmcdos2, Today at 05:12:32 PM

Previous topic - Next topic

tmcdos2

I have an MP4 video

=====================================================
Video
=====================================================
Codec 4CC:         H264
Image Size:         640 x 360
Aspect Ratio:         1:1 (1:1)
Frame Rate:         16.835 fps
Average Bitrate:      389 kbps
Total Duration:         00:09:20.369
Pixel format:         YUV 4:2:0, 8-bit
Color range:         Limited (MPEG)
Color primaries:      BT.709
Transfer characteristics:   BT.709
Color space:         BT.709

=====================================================
Video Codec Extradata
=====================================================
Size:            44
Extradata:         01 4D 40 16 FF E1 00 1D 67 4D 40 16 E8 80 50 17 FC B8 0B 50 10 10 14 00 00 03 00 04 00 00 03 00 88 3C 58 B4 48 01 00 04 68 EB 8F 20

=====================================================
Audio (1 active track(s))
=====================================================
Codec:            AAC
Channels:         Stereo
Bitrate:         15844 Bps / 126 kbps
Frequency:         44100 Hz
Total Duration:         00:09:20.451

-----------------------------------------------------
If I save the audio from AVIdemux - it is saved as AAC format and the audio length is 00:09:14.956
If I save the audio from VirtualDub - it is saved as WAV format and the audio length is 00:09:20.368
Why does not AVIdemux save the audio with correct length ?
If I simply save the audio and then immediately replace the audio track with the just saved file - audio and video go out of sync.
Is this a bug or a known issue which has a workaround (and what) ?
Observed behavior happens with all versions from 2.7.5 and up (I am using 2.8.2 build 241212_ce994de41a6-fflibs 7.0.2)