Playback Error - The live TV session has ended

My setup is PMS (Docker) on unRAID with both an xTeVe & HDHomeRun tuner.

I seem to have an issue whereby Plex for Windows just will not play some Live TV content.

Playback instantly fails with a ‘Playback Error - The live TV session has ended’ error. Other channels are fine.

When attempting the play the same Live TV channel on Plex Web, Android, Samsung or iOS; playback is fine.

I’ve taken a clean PMP log repro’ing the issue:

I’ve deleted out the codecs folder and tried again but no joy.

I’ve added the below to my ffmpeg options in xTevE but no joy:

-hide_banner -loglevel quiet -i [URL] -f lavfi -i anullsrc -c:v copy -c:a ac3 -b:a 640k -ac 6 -c:s copy -shortest -f mpegts pipe:1

Sounds like it will need someone from Plex to investigate, given all other players except for PMP are able to play the channel.

Any help will be much appreciated!

@OttoKerner I have just received a notification that you have amended the tag of this post from plex-media-player to plex-mac.

The issue I have raised is playing Live TV on Plex Media Player for Windows.

I have never used Plex (Server or Player) before on a Mac.

You are not using Plex Media Player,
you are using Plex Player for Mac.
These are different apps.
PMP is deprecated since years.

I certainly am not using Plex Player for Mac.

The first two lines in my log file:

Feb 19, 2023 18:30:57.374 [27320] INFO - Starting Plex version: 1.64.2.3546-5107ec40
Feb 19, 2023 18:30:57.374 [27320] INFO - Running on: Windows 10 Version 2009 [10.0.22621] x86_64

NB: My OS is Windows 11 - not 10.

I’ve amended my original post to reference Plex for Windows.

I’ve made some progress on troubleshooting this…

In Plex for Windows, Debug menu section, I have the below options set:

When I attempt to play a Live TV channel which I know exhibits the problem, I get the below:

image

The Live TV channel plays fine if I change the menu settings to:

image

The issue I now have, is everything I play (4K remux’s etc.) gets transcoded so not a solution.

Let me know if any further information is required and I’ll gladly assist.

I assume it must be something about the TV streams in your region.
Could you post the (content of the) Plex media info XML of a recording made from the same channel?

As requested, XML below:

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="2" librarySectionTitle="TV" librarySectionUUID="f76efb05-e4fa-4e61-9e6e-7287c8d36733" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1676899281">
<Video ratingKey="13855" key="/library/metadata/13855" skipParent="1" parentRatingKey="13854" grandparentRatingKey="13853" guid="plex://episode/63fdf50544720032aed63841" parentGuid="plex://season/5fd78e674df141002efe9b4b" grandparentGuid="plex://show/5fd78e674df141002efe9b4b" type="episode" title="Semi Final, 1st Leg: Real Madrid v Barcelona" grandparentKey="/library/metadata/13853" parentKey="/library/metadata/13854" librarySectionTitle="TV" librarySectionID="2" librarySectionKey="/library/sections/2" grandparentTitle="Live: Copa del Rey" parentTitle="Season 2023" summary="Action from the Copa del Rey semi-final 1st leg as rivals Real Madrid and Barcelona meet at the Santiago Bernabeu Stadium." parentIndex="2023" viewOffset="3911944" lastViewedAt="1677790196" year="2023" thumb="/library/metadata/13855/thumb/1677790563" art="/library/metadata/13855/art/1677790563" parentThumb="/library/metadata/13854/thumb/1677790563" grandparentThumb="/library/metadata/13853/thumb/1677790563" grandparentArt="/library/metadata/13853/art/1677790563" duration="56224" originallyAvailableAt="2023-03-02" addedAt="1677790562" updatedAt="1677790563" oneShot="1">
<Media id="24894" duration="56224" bitrate="6870" width="1920" height="1080" aspectRatio="1.78" audioChannels="2" audioCodec="aac" videoCodec="h264" videoResolution="1080" container="mpegts" audioProfile="he-aac" beginOffset="4293" channelIdentifier="5fc76dc33f000e002d0cb638-5fc705fcc40548002d54596f" endOffset="3899" mediaGrabBeginsAt="1677786300" mediaGrabDevice="device://tv.plex.grabbers.hdhomerun/2022-03-A88T-S1OXYA:4" mediaGrabPartialRecording="1" mediaGrabPartialRecordingReason="The recording was cancelled" mediaGrabStatus="complete" origin="dvr" videoProfile="high">
<Part accessible="1" exists="1" id="25377" key="/library/parts/25377/1677790562/file.ts" duration="56224" file="/data/DVR Recordings/Live Copa del Rey (2011)/Season 2023/Live Copa del Rey (2011) - 2023-03-02 12 00 00 - Semi Final 1st Leg Real Madrid v Barcelona.ts" size="48285356" audioProfile="he-aac" container="mpegts" packetLength="188" videoProfile="high">
<Stream id="94843" streamType="1" codec="h264" index="0" bitrate="6774" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1088" codedWidth="1920" frameRate="50.000" hasScalingMatrix="0" height="1080" level="42" profile="high" refFrames="2" scanType="progressive" streamIdentifier="256" width="1920" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)"> </Stream>
<Stream id="94844" streamType="2" selected="1" codec="aac" index="1" channels="2" bitrate="96" audioChannelLayout="stereo" profile="he-aac" samplingRate="48000" streamIdentifier="257" displayTitle="Unknown (HE-AAC Stereo)" extendedDisplayTitle="Unknown (HE-AAC Stereo)"> </Stream>
</Part>
</Media>
<Genre id="91116" filter="genre=91116" tag="Soccer"/>
<Genre id="91118" filter="genre=91118" tag="Sports event"/>
<Genre id="43984" filter="genre=43984" tag="Sports"/>
<Team id="91119" filter="team=91119" tag="Real Madrid"/>
<Team id="91120" filter="team=91120" tag="Barcelona"/>
<Channel id="91117" filter="channel=91117" tag="870 BTSP1HD (BT Sport 1 HD)"/>
<Field locked="1" name="art"/>
<Extras size="0"> </Extras>
<Related> </Related>
</Video>
</MediaContainer>

The recording does Direct Play without issue but the exact same program throws the Playback Error when attempting to play under Live TV.

1 Like

In order to diagnose this further, the developers need log files.
Please enable “debug” logging (NOT “verbose” loggin on your server).
Then stop and restart the server.

Then activate “debug” logging also in Plex for Windows. (again, NOT “verbose”)
Then recreate the failure.

After you’ve experienced the error, go immediately fetch both server logs and client app logs.
Zip them both and drag them into the message composer window of this forum (or send them to me per PM)

As requested, clean logs repro’ing the issue:

Plex for Windows:

PMS:
Plex Media Server Logs_2023-03-03_14-41-03.zip (94.2 KB)

Let me know if you need anything else.

Thank you for progressing this @OttoKerner, it’s appreciated!

Thanks for the logs! I’ve added them to the bug report.

You might wanna look at Playback Error This Live TV Session has Ended - #14 by sixxnet for a workaround.

Further to response from @OttoKerner linking to way to circumvent the AAC Extra Data issue - I would like to actually get diagnostics for the problem so we can establish why the transcoder is crashing when processing the AAC Extra Data

If you would not mind , would love to get the sessions directories for a test with the extra diagnostic settings outlined here - together with the server debug logs

This to be done before circumventing the problem

Thanks

No problem.

I’ll follow the steps to enabling the additional flags and provide you with the requested diagnostic information when I’m back home tomorrow.

Thank you - The sessions directories would not get purged until restart of the server with these settings and they could be many gigabytes - so best to have a controlled test with a fresh launch of PMS and capturing all the diagnostics soon after - to minimize the size of the diagnostics needed - and then after that removing the 4 extra settings and restarting the server

A presence of a trace-0.bin file within the transcoder sessions sub-directories would confirm that the settings were correctly working

So logs zip (with debug logging not disabled) + zip of the transcoder Sessions directories and time of error

Thanks

As requested, I’ve set the flags and repro’d the issue:

Plex for Windows:

PMS:
Plex Media Server Logs_2023-03-07_09-59-53.zip (119.5 KB)

Transcode/Sessions directory:
Sessions.zip (721.2 KB)

Let me know if you need anything else.

Perfect. I will refer it to the server development team

Thank You

@J_Strong Did you mention before that this also happens when not using xteve and when directly tuning a channel on HD Homerun ? Are you able to get me diagnostics for that ?

Nope. I’ve personally only noticed it on Live TV channels being served up from xTeVe.

I only ever use HDHomeRun tuned channels to DVR content.

When I’m back home (no Windows device on me!) I’ll try playing some Live TV channels served up from the HD HomeRun to see if the issue affects those channels too.

Thank You. I have just mentioned xteve on the issue I raised with the server development team to look into the transcoder failure
Error parsing AAC extradata, unable to determine samplerate.

If we find it also happens when using the HD Homerun directly, I will add that information together with any diagnostics you capture

Thank you for your help

Just received a notification that my Plex for Windows logs have been removed, due to potentially exposing a user token.

Do you have the required logs internally or do you require me to repro the issue and provide updated logs?