VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. 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

    Code:
    FFMpegSource2(".\no700k.wmv", atrack=-1)
    SetFilterMTMode("QTGMC", 2)
    QTGMC(preset="Slower", InputType=3, EdiThreads=2)
    Prefetch(6)
    and command line

    Code:
    ffmpeg -i script.avs -c:v libx264 -preset veryslow -tune film -crf 21 -c:a pcm_s32le output.mkv
    I've also tried using -c:a copy but the issue remains
    Quote Quote  
  2. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    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
    users on my IgnoreList: 160 names thus far, but featuring DB83, manono, usually_quiet && Aludin.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Post the mediainfo report (text view) of your source file
    Quote Quote  
  5. 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)
    .
    .
    .
    If the WMV has issues with gaps , variable sample rate, or variable framerate - then this is one case where DirectShowSource is better in my experience, but directshow can sometimes have other issues with prefetch and QTGMC (safer to run single threaded)
    Quote Quote  
  6. 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.
    Quote Quote  



Similar Threads