I have a WMV3 video with WMA audio. The framerate is reported at 29.970 by MediaInfo. When I run the video through ffmpeg however, the audio desyncs unevenly (~1s desync at the beginning, no desync towards the end). I am unsure what could be causing this, especially since ffmpeg does not report any errors.
I've noticed however that the resulting MKV has a framerate of 29.715. I've tried encoding it with -r 29.970 but it results in a variable framerate video instead of a constant 29.970. Could this be the source of my problem?
I'm converting the video using the following script
and command lineCode:FFMpegSource2(".\no700k.wmv", atrack=-1) SetFilterMTMode("QTGMC", 2) QTGMC(preset="Slower", InputType=3, EdiThreads=2) Prefetch(6)
I've also tried using -c:a copy but the issue remainsCode:ffmpeg -i script.avs -c:v libx264 -preset veryslow -tune film -crf 21 -c:a pcm_s32le output.mkv
+ Reply to Thread
Results 1 to 6 of 6
-
-
Poorly-authored or -multiplexed ASF files contain *gaps* or/and *overlaps* in the timestamps of the audio stream.
The best way to deal with this problem is decode (decompress) the WMA stream with wma2wav.exe and recompress to your favorite format (AAC, AC3, DTS, FLAC, whatever). Then you can add the new audio to the reencoded video.Last edited by El Heggunte; 9th Jul 2019 at 12:41. Reason: clarity
"Programmers are human-shaped machines that transform alcohol into bugs." -
Hmm. Tried a bunch of different options (-x, -a, -n, even -r) and muxed the wave file without recompressing just to be sure, but the issue persists.
-
Probably a ffms2 issue if the frame rate is 29.715 .
You can try specifying fpsnum , fpsden in FFVideoSource
eg.
Code:a=FFAudioSource(".\no700k.wmv") v=FFVideoSource(".\no700k.wmv", fpsnum=30000, fpsden=1001) AudioDub(v,a) . . .
-
Using fpsnum/fpsden didn't change anything either =/
EDIT: Scratch that, I wasn't using the right script. It did fix my issue, thank you.
Similar Threads
-
How to determine how much is the desync between video/audio?
By Alice in forum Newbie / General discussionsReplies: 4Last Post: 2nd Apr 2019, 17:39 -
StaxRip and A/V desync
By Krasnal82 in forum Blu-ray RippingReplies: 0Last Post: 21st May 2018, 12:00 -
Converting WMV to MP4 - audio out of sync
By wasser in forum Newbie / General discussionsReplies: 5Last Post: 23rd May 2017, 17:40 -
[SOLVED] Problem with staxrip desync
By ENiGMA59 in forum Video ConversionReplies: 7Last Post: 6th Sep 2016, 11:11 -
Problem with staxrip desync
By ENiGMA59 in forum Newbie / General discussionsReplies: 1Last Post: 5th Sep 2016, 10:19