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: clarityusers on my IgnoreList: 161 names thus far, but featuring DB83 and manono.
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
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.