Generic nightly v12 audio stream not playing in sync with video

  • Environment: Dell Optiplex i5-6500, generic v12 nightly 2023-07-29, Panasonic TV

    Video: 125fps

    Problem: The audio stream is so far ahead of the video the audio offset cannot bring it back into sync. Looking at it I saw that for some reason (video recorded from UK Drama using TVHeadend and then Handbrake to convert to mp4) its at 125fps. I resurrected my RPi3 (LE 9.2.8) from storage hooked it up and it plays fine which is probably why I never noticed it before. I can also use ffmpeg to alter the fps down to 25fps and then things are fine on the Dell.

    Is this as it should be working with LE/Kodi unable to cope with an extreme fps or should I hope for a patch in the (hopefully) not to distant future? Would I be better altering all the videos to 25fps? There are 39 at 125fps, the vast majority are at 25fps. If I can figure out how to batch convert them I can set things up and do all the none 25fps ones.

  • Bash
    #!/bin/bash
    for file in `ls /path/to/input/files/*`; do
      ffmpeg -i $file -o /path/to/output/files/$file 
    done

    ^ pseudo code, you need to add paths and the actual ffmpeg command to convert the input file ($file) to the output file

  • Thanks chewitt. I'm guessing from your answer that I'm better off converting them to 25fps. I'm nearly there, only 3 still to go.

    Since the only Linux PC I have is an ultra-portable atom based thing I used Delphi on my main Windows PC. It took longer to find some ffmpeg code to understand that worked than it did to write the Delphi to run it - I do love computers.

    Any idea why the RPi3 handled these videos so well when the much more powerful Dell doesn't?

  • Can you explain why you have 125fps video files?

    You say "video recorded from UK Drama using TVHeadend".

    That won't be 125fps. It will be 25 interlaced frames (50 interlaced fields) per second.

    Possibly you'll be deinterlacing it to 50 progressive frames per second.

    But 125fps makes no sense.

  • Still puzzled why Handbrake for Linux wasn’t used to convert the videos. A simple queuing of all the videos and one key press would have done the trick. All done unattended of course.

  • popcornmix

    I wish I could explain but I can't :(

    My collection consists of:

    TV->VCR->DVD->Kodi

    TV->DVD->Kodi

    Bought VCR->DVD->Kodi

    Bought DVD->Kodi

    TV->TVHeadend->Kodi

    Over the years I've used DVDShrink, MakeMKV & Handbrake. Everything goes through Handbrake and the framerate setting is one I've never touched. I just looked and its set at 30fps Peak Framerate

    petediscrete

    1. SLOW Linux machine

    2. Handbrake doesn't contain any mechanism to identify only those with a framerate of 125fps so I'd need to identify and select manually outside of Handbrake