Audio Sync

17
closed
jksj461
jksj461
Posted 1 year ago

Audio Sync #6

leanfront-v0-207-g11262a3 UK dvb-s2 1080i recordings Audio sync is stable during playback and recovers pretty quickly on starting or resuming playback. However right arrow (skipping forward) causes losses of sync which can be recovered with left arrow. So when skipping adds you generally have to do a back after arriving at the desired point. I remember the front end behaving similarly in version 31 pre but it did get fixed.

bennettpeter
bennettpeter
Created 1 year ago

I have never noticed this problem. Often after skipping forward the sound goes off for a few seconds and then starts up again, but always in sync. Can you please provide a sample recording. Also, what is the device you are using - fire stick, shield, other, etc.?

jksj461
jksj461
Created 1 year ago

Wierd cannot reproduce today although the issue has happened many times before. My main viewing platform is Shield TV. Fire Tv 4K used less often and not on a big TV so less critical. I have shared the worst offending sample with you for debuging. It has just occurred to me that we were watching this while it was being recorded (close to the end stop) which may be relevant to the issue. Will test further. The issue is compounded with the sample as the wrong audio track is automatically read. I note VLC does the same but mythfrontend at least on PC gets it right. Can't currently test the frontend on Android due to other issues. When attempting to play the program on Fire Tv it crashes when attempting to change audio track will get logs if you cannot re-produce. Note does not crash on Shield but audio track reverts to track 1 [NAR] every time the catch up point is reached.

bennettpeter
bennettpeter
Created 1 year ago

I got the sample. mediainfo rells me the first audio track is in English, and the second audio track is language code nar. I looked it up, nar is the code for the Iguta language, which is spoken in Nigeria. When I play the file you sent me it starts up on the English track.

I have had one recording where it started up on the wrong audio track, and it was because there was a small amount of corrupt audio recording right at the beginning so it switched to the other audio track. Could this be the case? Is it a one-time occurrence?

The first audio track is AC3 and the second is mpeg1 level2. Maybe the fire stick does not support that out of date format. You can actually watch it successfully on audio track 2 if you first select ffmpeg in the audio setup of the settings. I will see if I can fix it so that it does not crash if that happens, and preferably should automatically select ffmpeg when you select an unsupported track.

Regarding the sync problem. I have already got code to handle it. The way it works is, at the start of playback or after skip forward near the end of a recording in progress, after 5 seconds you will notice a brief outage (1 tenth of a second) in the sound, after which it will be in sync. Have you tried waiting 5 seconds after forward skip to see if this happens?

bennettpeter
bennettpeter
Created 1 year ago

Further update - If you select Mediacodec in the audio settings, it works a bit differently - it may be better for you. Starting playback of your sample selects the nar audio track by default (not sure why) and that is silent since fire stick does not support MP2 audio. Then switching audio tracks works fine, it plays the english track and switching again gives an error message for the "nar" track, but does not crash playback.

Fire stick page confirms mp2 is not on the list of supported audio formats: https://developer.amazon.com/docs/fire-tv/device-specifications-fire-tv-stick.html?v=ftvstick4k

jksj461
jksj461
Created 1 year ago

Many thanks Please note that this sample is not the normal it must be some sort of edge case within the UK DVB specification. The issue only occurs on a subset of programs within Channel 4 HD programs. Possibly from a single producer. Out of interest Mythfrontend reports 1:Narrative (Audio Description) 2:English AC3 2ch and plays track 2.

leanfront-v0-216-g48b40f7.apk Testing on F4K with ffmpeg audio Works perfectly auto selecting the correct audio track - Audio track 1 enabled It is possible to select Audio track 2 (Nar) as well

On Shield the correct audio track is now played as default with Auto setting for audio. Brilliant

Selecting mediacodec on F4K works as you describe but would lower WAF as it is silent without intervention. Is there a downside to leaving the F4K in ffmpeg. I am only using it on a stereo tv but would it affect surround sound otherwise?

bennettpeter
bennettpeter
Created 1 year ago

Leaving it set in ffmpeg mode is fine. The only downside is that surround sound will not work, but that is moot if you are only using stereo.

jksj461
jksj461
Created 1 year ago

The audio sync issue is still there for some recordings (back arrow required after skipping). The samples you have access to don't exhibit the issue, i will try and narrow it down over the next week to some sort of common factor. Playback is completely acceptable though. The only scenario to be avoided is trying to skip in a program currently being recorded this currently has low WAF.

bennettpeter
bennettpeter
Created 1 year ago

Audio sync issue: It will help if you can let me know:

  • When it is out of sync, is the recording length that is displayed on the right in the OSD shown as an actual value or as --- ?
  • When it is out of sync, does it fix it if you change audio channels until you get to audio disabled and then change to the correct audio channel again?
  • Is it only on programs still being recorded that you have the problem?
jksj461
jksj461
Created 1 year ago

The pattern that is developing is that the issue occurs fairly late on in the evening, after watching about 3 hours of different material. Programs which played perfectly earlier then show the issue. Exiting the program does not resolve. Resetting the Shield does. Apologies did not do the specific tests you mention will try again tomorrow. Seems highly unlikely but it does fit previous experience that the stuff watched late at night shows the issue. I know it sounds ridiculous.

jksj461
jksj461
Created 1 year ago
When it is out of sync, is the recording length that is displayed on the right in the OSD shown as an actual value or as --- ? Actual value
When it is out of sync, does it fix it if you change audio channels until you get to audio disabled and then change to the correct audio channel again? Yes
Is it only on programs still being recorded that you have the problem? No

Ok after a week of use performance has been excellent and very usable many thanks. Most testing on Shield TV only occasional use on FireTV & F4K. Sync problems only occur when skipping forward and are fixed by a single back seek or changing audio track. They occur more often later at night probably due to less structured use ie jumping around skipping parts rather than just watching. It would be useful to be able to suppress the error messages when decoder errors occur. As this reduces WAF more than the visual glitch.
Skipping adds in a program that is still recording is the most likely scenario to cause problems. In the worst case decode errors occur accompanied by the error message and the control bar is then displayed making a minor glitch major. Leaving the recording to complete and then playing is perfectly error message free so it hard to understand the problem. i cannot produce the issue watching live TV which I would have thought would be the same. Tried to get a log of the glitching but cannot make it happen when I want to.

Previous