To clean-up the audio of a mp4 video, I opened it in Audacity.
However the audio duration in Audacity doesn't match the original duration, which causes unsync when I mux it back with the video after processing.
original audio (m4a): 00:08:04.998
after the file is opened in audacity v2.4.2: 00:07:58.491
What could cause this and is there a way to get around it ?
I tried extracting the m4a with ffmpeg, and also reencoding with ffmpeg before opening in Audacity but it doesn't make any difference.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 5 of 5
Thread
-
Last edited by butterw; 4th Feb 2021 at 11:58.
-
There is no reported audio delay in the mp4.
Audio.m4a
ID : 1
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 8 min 5 s
Bit rate mode : Variable
Bit rate : 126 kb/s
Maximum bit rate : 128 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 7.30 MiB (98%)
Default : Yes
Alternate group : 1
When I reencode to mp3 the duration changes to 07:58
ffmpeg -hide_banner -i "video.mp4" -vn -c:a libmp3lame -b:a 128k "audio.mp3"
Audio.mp3
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Format settings : Joint stereo
Duration : 7 min 58 s
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Frame rate : 38.281 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 7.30 MiB (100%)
Writing library : LAME3.99.5 -
Then 00:07:58.491 is the real duration. You can lengthen the audio track or shorten the video track.
-
Using the Change speed... Effect in Audacity I stretched the audio duration to match the video duration, which gave an acceptable result.
Similar Threads
-
AVS2DVD error audio duration shorter than expected
By SF01 in forum Authoring (DVD)Replies: 18Last Post: 21st Mar 2020, 02:49 -
Best (free) Editor to Adjust Audio Position and Duration
By Lowlander in forum EditingReplies: 3Last Post: 9th Jun 2019, 03:55 -
Multiavchd audio title duration issues
By Dustin7ca in forum Authoring (Blu-ray)Replies: 0Last Post: 28th Feb 2019, 12:15 -
Interlaced Audio Duration Longer than Video Duration (lip-sync issue)
By senlab in forum Video ConversionReplies: 7Last Post: 27th Aug 2018, 15:36 -
FFMPEG: how to encode audio for a target duration?
By marcorocchini in forum Newbie / General discussionsReplies: 2Last Post: 3rd Apr 2016, 00:08