Mailing List Archive

Fwd: Re: Audio and video wildly out of sync for SD recordings
On 21/04/2020 08:12, UB40D wrote:
> As of recently, a number of existing recordings have become
> essentially unwatchable because their video and audio are out of sync
> by what feels like a minute or more. I haven't actually measured but
> it's definitely closer to a minute than to a second, as in "that's the
> audio for the next scene, or the one after that".
>
> It seems that the HD recordings are still perfectly in sync and it's
> only the SD ones that are affected.
>
> The problem is only with the mythtv built-in player because if I open
> the same files in VLC then the audio and video are still perfectly in
> sync. But of course it's a pain to watch a recorded movie via VLC
> because the cut list is not honoured so I have to skip all the
> commercials all over again (not counting the faff about finding the
> actual file name and invoking VLC from the command line).
>
> Are there known a/v sync issues with the mythtv player? More
> importantly, are there any recommended fixes?
>
> mythfrontend --version
>
> Please attach all output as a file in bug reports.
>
> MythTV Version : v32.0~master.202004182203.c1fb397~ubuntu20.04.1
>
> MythTV Branch : master
>
> Network Protocol : 91
>
> Library API : 32.20200101-1
>
> QT Version : 5.12.8
>
> Options compiled in:
>
>  linux profile use_hidesyms using_alsa using_oss using_pulse
> using_pulseoutput using_backend using_bindings_perl
> using_bindings_python using_bindings_php using_dvb using_firewire
> using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr
> using_ivtv using_joystick_menu using_libcec using_libcrypto
> using_gnutls using_libdns_sd using_libfftw3 using_libxml2 using_lirc
> using_mheg using_opengl using_egl using_qtwebkit using_qtscript
> using_qtdbus using_taglib using_v4l2 using_x11
> using_libbluray_external using_xrandr using_profiletype
> using_systemd_notify using_systemd_journal using_bindings_perl
> using_bindings_python using_bindings_php using_freetype2
> using_mythtranscode using_opengl using_egl using_vaapi using_nvdec
> using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2
> using_libmp3lame
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums:https://forum.mythtv.org

This problem occurred about a month ago in fixes 31 but in my use case
only effects software playback using ffmpeg, all the hardware playback
profiles are unaffected.
Re: Fwd: Re: Audio and video wildly out of sync for SD recordings [ In reply to ]
On Tue, 21 Apr 2020 at 08:46, John <jksjdevelop@gmail.com> wrote:

> This problem occurred about a month ago in fixes 31 but in my
> use case only effects software playback using ffmpeg, all the
> hardware playback profiles are unaffected.
>
> Thanks! Glad to hear someone else has witnessed this.

If that's the fix, how would I switch to a hardware playback profile? A
quick search gave me
https://www.mythtv.org/wiki/Playback_profiles
where all decoders for all profiles for all qualities seem to be using
ffmpeg.
Re: Fwd: Re: Audio and video wildly out of sync for SD recordings [ In reply to ]
On 21/04/2020 08:45, John wrote:
>
>
> On 21/04/2020 08:12, UB40D wrote:
>> As of recently, a number of existing recordings have become
>> essentially unwatchable because their video and audio are out of sync
>> by what feels like a minute or more. I haven't actually measured but
>> it's definitely closer to a minute than to a second, as in "that's the
>> audio for the next scene, or the one after that".
>>
>> It seems that the HD recordings are still perfectly in sync and it's
>> only the SD ones that are affected.
>>
>> The problem is only with the mythtv built-in player because if I open
>> the same files in VLC then the audio and video are still perfectly in
>> sync. But of course it's a pain to watch a recorded movie via VLC
>> because the cut list is not honoured so I have to skip all the
>> commercials all over again (not counting the faff about finding the
>> actual file name and invoking VLC from the command line).
>>
>> Are there known a/v sync issues with the mythtv player? More
>> importantly, are there any recommended fixes?

There have been sync problems, but mostly a slow drift rather than what
you describe. Perhaps your ad-skipping technique is different.

Try selecting different deinterlacers. I think the 2x High Quality ones
may be to blame.

>>
>> mythfrontend --version
>>
>> Please attach all output as a file in bug reports.
>>
>> MythTV Version : v32.0~master.202004182203.c1fb397~ubuntu20.04.1
>>
>> MythTV Branch : master
>>
>> Network Protocol : 91
>>
>> Library API : 32.20200101-1
>>
>> QT Version : 5.12.8
>>
>> Options compiled in:
>>
>>  linux profile use_hidesyms using_alsa using_oss using_pulse
>> using_pulseoutput using_backend using_bindings_perl
>> using_bindings_python using_bindings_php using_dvb using_firewire
>> using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr
>> using_ivtv using_joystick_menu using_libcec using_libcrypto
>> using_gnutls using_libdns_sd using_libfftw3 using_libxml2 using_lirc
>> using_mheg using_opengl using_egl using_qtwebkit using_qtscript
>> using_qtdbus using_taglib using_v4l2 using_x11
>> using_libbluray_external using_xrandr using_profiletype
>> using_systemd_notify using_systemd_journal using_bindings_perl
>> using_bindings_python using_bindings_php using_freetype2
>> using_mythtranscode using_opengl using_egl using_vaapi using_nvdec
>> using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2
>> using_libmp3lame
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums:https://forum.mythtv.org
>
> This problem occurred about a month ago in fixes 31 but in my use case
> only effects software playback using ffmpeg, all the hardware playback
> profiles are unaffected.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fwd: Re: Audio and video wildly out of sync for SD recordings [ In reply to ]
On 21/04/2020 09:05, UB40D wrote:
>
>
> On Tue, 21 Apr 2020 at 08:46, John <jksjdevelop@gmail.com
> <mailto:jksjdevelop@gmail.com>> wrote:
>
>> This problem occurred about a month ago in fixes 31 but in my use
>> case only effects software playback using ffmpeg, all the
>> hardware playback profiles are unaffected.
>
> Thanks! Glad to hear someone else has witnessed this.
>
> If that's the fix, how would I switch to a hardware playback profile?
> A quick search gave me
> https://www.mythtv.org/wiki/Playback_profiles
> where all decoders for all profiles for all qualities seem to be using
> ffmpeg.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
See:-https://www.mythtv.org/wiki/Release_Notes_-_31_Video_decoding_and_playback#Video_decoders


What video hardware do you have?

If it is Intel built into the motherboard use VAAPI

AMD built in use VAAPI

Nvidia card use VDPAU

With subtitles displayed, sync is wrong even with hardware decode.
Re: Fwd: Re: Audio and video wildly out of sync for SD recordings [ In reply to ]
On Tue, 21 Apr 2020 at 09:21, John Pilkington <johnpilk222@gmail.com> wrote:

> Try selecting different deinterlacers. I think the 2x High Quality ones
> may be to blame.
>

And once again you are my hero!

mythfrontend -> setup -> video -> playback -> current video playback profile

I was on "High Quality". I tried "OpenGL High Quality" and, testing with an
SD movie, it was still substantially out of sync (though not as much); I
tried VDPAU High Quality and the problem went away, at least for the few SD
videos I tested. And I confirm that the HD recordings are unaffected (i.e.
they continue not to have any sync issues, fortunately).

Thank you very much indeed!
Re: Fwd: Re: Audio and video wildly out of sync for SD recordings [ In reply to ]
For some reason I only received this reply after posting my own.

On Tue, 21 Apr 2020 at 10:46, John <jksjdevelop@gmail.com> wrote:

> See:-https://www.mythtv.org/wiki/Release_Notes_-_31_Video_decoding_and_playback#Video_decoders
>
> What video hardware do you have?
>
> If it is Intel built into the motherboard use VAAPI
>
> AMD built in use VAAPI
>
> Nvidia card use VDPAU
>
> With subtitles displayed, sync is wrong even with hardware decode.
>
I have intel integrated graphics (feeding an HD projector from the
DisplayPort motherboard socket through a displayport-to-hdmi cable) and hwinfo
--gfxcard tells me I have an i915 driver.

In the mythfrontend / setup / video / playback / current video playback
profile menu, VAAPI is only offered as "normal", whereas VDPAU is also
offered as "High Quality". I am not sure what difference this would make.
VDPAU High Quality appears to have fixed the problem I was experiencing.

I tried turning on the subtitles (teletext subtitles, that is) and with
this VDPAU High Quality playback profile the audio and video continued to
be in sync with and without subtitles, for both SD and HD.

Thanks!
Re: Fwd: Re: Audio and video wildly out of sync for SD recordings [ In reply to ]
With hindsight, the likely reason why HD was not affected by the problem
(bug? performance issue?) in the software renderer is because HD =
1920x1080 = the resolution at which I run the box, so no rescaling was
involved; whereas with SD = 1280x720 a rescaling was required to bring it
to HD, which was clearly more work even if the input data rate was much
lower.

>
Re: Fwd: Re: Audio and video wildly out of sync for SD recordings [ In reply to ]
On 22/04/2020 00:00, UB40D wrote:
> With hindsight, the likely reason why HD was not affected by the
> problem (bug? performance issue?) in the software renderer is because
> HD = 1920x1080 = the resolution at which I run the box, so no
> rescaling was involved; whereas with SD = 1280x720 a rescaling was
> required to bring it to HD, which was clearly more work even if the
> input data rate was much lower.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Glad you got it working. With intel graphics I would have expected VAAPI
to work best rather than VDPAU but if it works great.

Also maybe of note, I get some judder on some HD channels unless I stop
the processor power saving and fix the processor clock rate.