Is my audio recorded on elastic?

  • Around my house I use 3 Raspberry Pi 4s, each of which has an official DVB hat fitted.

    Two of them are connected to Samsung 4k TVs and the other to a Samsung HD TV. All are patched up to date and run Librelec 9.2.3.

    Generally things are working well - but in order for TV programs recorded with TVHeadend to have sound in sync with the program I have found I am forced to set "Adjust display refresh rate" to Always and "Sync playback to display" to fix it.

    However I have a very odd problem when watching other content because the audio sounds like it recorded on 'elastic' which is currently having its tension altered so the pitch is always changing.

    This seems to happen with 2160P 24 frames per second recordings and 1080P 24 frame per second recordings alike. The video playback is fine.

    Can anyone point me in the right direction as to what is going wrong please?

    Thanks in advance!

    Chris.

    ps - In case its relevant I'm in the UK and TVHeadend records at 50fps.

    Edited once, last by ChrisCwmbran (June 19, 2020 at 8:20 PM).

  • I use a hauppauge wintv, with similar symptoms.

    I've been using different buffering setitngs as the ones reported above.

    I also use:

    Adjust display refresh rate" at start/stop only

    "Sync playback to display" to off.

    Whitelist 23.976, 50 and 60 fps to assure the correct frame rate per content.

    About tvheadend settings, I've noticed better results with a dvr recording profile I've called "matroska", with the following settings in tvheadend:

    configuraiton / recording / digital video recording profiles / matroska /usinng profile matroska

    the maktroska profile is defined in configuration / stream / stream profiles as:

    matroska

    webm off

    reorder dvbsub on

    when watching tvheadend channels or recordings, if some sound is out of sync, usually a stop and start is enough to solve.

    Not the ideal solution ...


    - NOTE:

    I've also tried realtime ffmpeg encoding.

    Solves audio issues, but for he rpi4,I need to lower the bitrate a lot, and the final quality is not acceptable (for me). And ffmpeg will take a lot of cpu, and during transcoding you will not be able to do anything else.

    Just try creating a new SPAWN profile and using the following command line (assuming you have the ffmpeg add-on installed):

    Code
    ffmpeg -loglevel quiet -i pipe:0 -pix_fmt yuv420p  -vcodec mpeg2video -vb 1024k  -bufsize 1024k -g 100 -af "aresample=async=1:first_pts=0" -acodec mp2 -ab 128k -f mpegts pipe:1

    Then create a dvr profile that uses this new stream profile.


    Good luck.

    An report your findings !

  • Having done a bit of fiddling, the suggested whitelisting and the change to using Matroska with TVHeadend have fixed my issues :)

    So, thank you both very much for your suggestions.

    The only thing I need to do now is work out how to calibrate the screen size for those it's using for playback.

    Doing it for the front end is easy, but I don't know how to do it for the video resolution/refresh rates yet!