[Finished] Improvements to Live TV playback rate matching - for testing (1 Viewer)

Status
Not open for further replies.

Vasilich

Portal Pro
August 30, 2009
3,394
1,170
Germany, Mayence
Home Country
Russian Federation Russian Federation
little bit of sound being cut off
do you use external amplifier that automatically recognizes input signal format? or TV with same settings? Can it be that the hardware need some time to recognize changed incoming sound format and for that time mutes speaker out?
 

HTPCSourcer

Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    do you use external amplifier that automatically recognizes input signal format?
    Yes, I do and I understand that signal processing is taking some time. Again, it's really short, way shorter than the second mentined by Palm_Maniac, and not disturbing in any way.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    It never disturbed me, really very short.:).Merely taking up Palm_Maniac's comment to show that it is not related to his issues.
    Understood. :)

    it is about audio streams, not video.
    Sorry, I should have said video/audio/subtitles/teletext... anything. Any PMT change.

    Do these streams really being added? or is it possible to change audio stream format on the fly for broadcasters? (don't have MPEG manual by hand...)
    Yes. Added, removed or changed is all similar. The key is that a PMT change is required to notify about the new stream_type, descriptors etc.. The PMT change will lead to buffers flushed in TsWriter, TsReader codecs, renderers => interruption.
     

    Palm_Maniac

    MP Donator
  • Premium Supporter
  • June 1, 2005
    1,238
    215
    Gießen, Hessen
    Home Country
    Germany Germany
    Ok, then the sound skips has nothing to do with the problems. I do not mind even overly, I just thought .... On my HTPC with AV receiver this effect is less pronounced than in the client in the living room. There we use the soundcard with a 5.1 system. So the AV receiver via HDMI reacts faster than the sound card.

    The client in the living room reacts a little violent for such audio changes. It almost always comes to 2, 3 sound interruptions until it runs normally. Almost always after each audio exchange. Even that does not exist at the client with the AV receiver. As it continues to run clean. Depends it all together with one another?
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Looking at the logs again, in fact this 'glitch':

    Code:
    [2015-07-11 00:20:15,926] [2b3b22d8] [ 54c] - Buffers : A/V = 4/87, RTSP = -1, A last: 3815.855, V Last: 3817.025, Comp: 0.682 s, AudMean: 1.077 s, AudDelta: -0.005 s, SPPM: 0
    [2015-07-11 00:20:16,778] [2b3b22d8] [1050] - demux: AC3 channels = 6 -> 2
    [2015-07-11 00:20:17,378] [2b3b22d8] [ 2a4] - audPin: Add pmt, fTime:0.944 SampCnt:3739, Ch:2, Sr:48000
    [2015-07-11 00:20:17,379] [2b3b22d8] [ 2a4] - demux:GetVideoStreamType(), FPS from DTS/PTS = 25.000000, DTSdiff/PTSdiff/MPEG2 = 0.020000/0.020000/0.000000, DTS/PTS count = 22489/29985
    [2015-07-11 00:20:17,480] [2b3b22d8] [ 2a4] - Aud/Ref : 3816.975, Compensated = 598.710 ( -0.036 A/V buffers=04/95), Clk : 598.614000, SampCnt 3740, Sleep 1 ms, stallPt 1.500
    [2015-07-11 00:20:17,485] [2b3b22d8] [11fc] - vidPin : Video to render late= -0.136
    [2015-07-11 00:20:17,485] [2b3b22d8] [11fc] - Vid/Ref : 3816.745, ?-frame(00), Compensated = 598.480 ( -0.136 A/V buffers=03/105), Clk : 598.616000, SampCnt 29893, stallPt 2.500
    [2015-07-11 00:20:17,486] [2b3b22d8] [11fc] - Vid/Ref : 3816.805, ?-frame(00), Compensated = 598.540 ( -0.077 A/V buffers=03/104), Clk : 598.617000, SampCnt 29894, stallPt 2.500

    ...happened when playing a recording - this one:

    Code:
    [2015-07-10 23:42:41,017] [2b3b22d8] [126c] - open \\SERVER\Rekorder\Homeland - kabel eins HD - 2015-07-10_2.ts, isTimeshift:0, isUNC:1

    ....so the issue does happen with recordings (as I would expect), but it might be less noticeable than with Live TV, since TsReader can read more data quickly to refill the audio decoder, renderer etc. if the audio channel change has caused the old audio data to be flushed away (there is probably at least a second of audio data buffered in the audio renderer when the change happens, so if this gets discarded you lose that amount of audio).

    Best solution to this is probably to use LAV Audio Decoder to decode the audio, enable the 'Mixing' option in it's settings and set the speaker config to 5.1 (so that the audio renderer always gets 5.1 channels). Then when audio channel format changes happen, LAV Audio will deal with it cleanly (I use this method for the LATM AAC 5.1/2.0 audio I get on UK Freeview HD - works perfectly).

    Note that because the audio renderer supplies the filter graph presentation clock, audio issues *can* affect the video playback as well.

    (The 'demux:ReadFromFile() syncErrors:' messages in TsReader log for Live TV are a different, unrelated problem with UNC paths/SMB which I'm still thinking about....)
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    @Palm_Maniac - can you try the attached TsWriter please ? (v3.1.31.3)

    I'm trying various ideas to try and fix the 'syncErrors' which then cause video and audio corruption on Live TV - this version does not pre-allocate the timeshift files.
     

    Attachments

    • TsWriter_noPreAllocation_v3.1.31.3_for_MP_1.11.zip
      130.7 KB

    Palm_Maniac

    MP Donator
  • Premium Supporter
  • June 1, 2005
    1,238
    215
    Gießen, Hessen
    Home Country
    Germany Germany
    Hi Owlsroost,

    Thanks, I will test today, and then possibly tomorrow announce first results. I am extremely excited. :)
     

    Palm_Maniac

    MP Donator
  • Premium Supporter
  • June 1, 2005
    1,238
    215
    Gießen, Hessen
    Home Country
    Germany Germany
    Hi Owlsroost,

    my first report for a movie night with the new TSWriter. Absolutely great. :) They're gone. No pixelation and no short stills more. Even the transitions between programs and commercial breaks are perfectly clean. It has given me almost brought tears to the eyes. :)

    Well, and then, after about five and a half hours, it has happened. The image and sound put out. Still image. I've been waiting for some time, but nothing happened. Live TV Stop and Start have reactivated it again and it ran on again wonderful. Approximately forty-five minutes later the same.

    According to the log file from the server there was massive Continuity Errors with the words "Bad signal?". The signal, however, was properly and no storms in the vicinity. There sosofrt went back to the Stop / Start of live TV, I'm also assuming that there were no storms in the vicinity of the TV channel.

    Since it was previously stundenlagn properly, I watch it today on the day again before I post log files. I want to rule out any interference from outside.

    In summary, I can say, it is the best I've ever had in TSWriter operation. The latest change has been one of the biggest steps in the right direction. I would say we are at 99% with an option on the 100. :) The light at the end of the tunnel appears at last all extreme. :)

    I will write tomorrow witer and possibly upload the logs. Maybe you already falls, yes, but something to hand my description, then I test immediately. :)

    You are the best. : D
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom