Changes in FFMPEG? LiveTV streaming does not work anymore (VDR Plugin)

Hi all,

I haven’t touched my VDR plugin for a long time, as it was working very well for me. Now some of the users in the vdrportal made me aware, that it stopped. After updating my plex server to the 1.0.x series, I can reconfirm that.

The navigation is still working well, but when the stream inside the VideoObject is supposed to be played, the Plex Media Server.log shows the following.:

Jul 28, 2016 14:25:52.657 [0x7fa1a77ff700] DEBUG - MDE: analyzing media item -1 Jul 28, 2016 14:25:52.658 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: Direct Play is disabled Jul 28, 2016 14:25:52.658 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: container is unavailable for analysis Jul 28, 2016 14:25:52.658 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: media must be transcoded in order to use the hls protocol Jul 28, 2016 14:25:52.658 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: no direct play video profile exists for http// Jul 28, 2016 14:25:52.658 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: no direct play video profile exists for http/// Jul 28, 2016 14:25:52.658 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: codec is unavailable for analysis Jul 28, 2016 14:25:52.658 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: codec is unavailable for analysis Jul 28, 2016 14:25:52.659 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: no remuxable profile found, so video stream will be transcoded Jul 28, 2016 14:25:52.659 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: codec is unavailable for analysis Jul 28, 2016 14:25:52.660 [0x7fa1a77ff700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: selected media 0 / -1 Jul 28, 2016 14:25:52.660 [0x7fa1a77ff700] DEBUG - Found session GUID of peth2qcuu5n in session start. Jul 28, 2016 14:25:52.660 [0x7fa1a77ff700] DEBUG - Using session GUID peth2qcuu5n for new transcode session. Jul 28, 2016 14:25:52.660 [0x7fa1a77ff700] DEBUG - Cleaning directory for session peth2qcuu5n () Jul 28, 2016 14:25:52.663 [0x7fa1b57fe700] DEBUG - Completed: [79.253.12.192:55459] 200 GET /video/:/transcode/universal/start.m3u8?hasMDE=1&path=http%3A%2F%2F127.0.0.1%3A32400%2Fvideo%2Fvdr%2FLiveTVMenu%3Finclude_oc%3DTrue%26sender%3DDas%2BErste%2BHD%2B%2528C%2529%26channel%3DC-41985-1051-11100%26thumb%3D%252F%253A%252Fplugins%252Fcom.plexapp.plugins.vdr%252Fresources%252Ficon-default.png%253Ft%253D1469476233&mediaIndex=-1&partIndex=0&protocol=hls&offset=0&fastSeek=1&directPlay=0&directStream=1&subtitleSize=100&audioBoost=100&session=peth2qcuu5n&subtitles=burn&Accept-Language=de (5 live) TLS GZIP 119ms 473 bytes Jul 28, 2016 14:25:52.678 [0x7fa1b39e4700] DEBUG - Request: [79.253.12.192:55459] GET /video/:/transcode/universal/session/peth2qcuu5n/base/index.m3u8 (4 live) TLS GZIP Jul 28, 2016 14:25:52.681 [0x7fa1b39e4700] DEBUG - Found session GUID of peth2qcuu5n in session start. Jul 28, 2016 14:25:52.681 [0x7fa1b39e4700] DEBUG - MDE: analyzing media item -1 Jul 28, 2016 14:25:52.681 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: Direct Play is disabled Jul 28, 2016 14:25:52.681 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: container is unavailable for analysis Jul 28, 2016 14:25:52.681 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: media must be transcoded in order to use the hls protocol Jul 28, 2016 14:25:52.682 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: no direct play video profile exists for http// Jul 28, 2016 14:25:52.682 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: no direct play video profile exists for http/// Jul 28, 2016 14:25:52.682 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: codec is unavailable for analysis Jul 28, 2016 14:25:52.682 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: codec is unavailable for analysis Jul 28, 2016 14:25:52.682 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: no remuxable profile found, so video stream will be transcoded Jul 28, 2016 14:25:52.683 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: codec is unavailable for analysis Jul 28, 2016 14:25:52.683 [0x7fa1b39e4700] DEBUG - MDE: Das+Erste+HD+%28C%29 | Rote Rosen: selected media 0 / -1 Jul 28, 2016 14:25:52.683 [0x7fa1b39e4700] DEBUG - Starting a transcode session peth2qcuu5n at offset -1.0 (state=2) Jul 28, 2016 14:25:52.683 [0x7fa1b39e4700] DEBUG - Streaming Resource: Added session 0x7fa1b6411220:ywjhpgoft7d Jul 28, 2016 14:25:52.695 [0x7fa1b39e4700] DEBUG - Job running: FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/' XDG_CACHE_HOME='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources/' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Resources/Plex Transcoder' '-i' 'http://192.168.242.14:3000/TS/C-41985-1051-11100' '-filter_complex' '[0:V:0]scale=w=iw:h=ih:force_original_aspect_ratio=decrease[0]' '-map' '[0]' '-codec:0' 'libx264' '-crf:0' '16' '-pix_fmt:0' 'yuv420p' '-preset:0' 'veryfast' '-x264opts:0' 'subme=2:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none' '-force_key_frames:0' 'expr:gte(t,0+n_forced*4)' '-map' '0:a:0' '-codec:1' 'aac' '-ar:1' '96000' '-channel_layout:1' 'stereo' '-b:1' '256k' '-segment_format' 'mpegts' '-f' 'segment' '-flags' '-global_header' '-segment_time' '4' '-segment_start_number' '0' '-segment_copyts' '1' '-segment_time_delta' '0.0625' '-max_delay' '5000000' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'media-%05d.ts' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/peth2qcuu5n/progress' Jul 28, 2016 14:25:53.487 [0x7fa1a77ff700] DEBUG - Request: [127.0.0.1:45886] PUT /video/:/transcode/session/peth2qcuu5n/progress?index=3&id=6010&codec=h264&type=video (5 live) Jul 28, 2016 14:25:53.488 [0x7fa1a77ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication. Jul 28, 2016 14:25:53.488 [0x7fa1a77ff700] DEBUG - Auth: Came in with the master token, authorization succeeded. Jul 28, 2016 14:25:53.490 [0x7fa1b5fff700] DEBUG - Completed: [127.0.0.1:45886] 206 PUT /video/:/transcode/session/peth2qcuu5n/progress?index=3&id=6010&codec=h264&type=video (5 live) 3ms 190 bytes Jul 28, 2016 14:25:53.492 [0x7fa1ae3fe700] DEBUG - Request: [127.0.0.1:45887] PUT /video/:/transcode/session/peth2qcuu5n/progress?index=4&id=6020&codec=mp3&type=audio (6 live) Jul 28, 2016 14:25:53.493 [0x7fa1ae3fe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication. Jul 28, 2016 14:25:53.493 [0x7fa1ae3fe700] DEBUG - Auth: Came in with the master token, authorization succeeded. Jul 28, 2016 14:25:53.495 [0x7fa1b57fe700] DEBUG - Completed: [127.0.0.1:45887] 206 PUT /video/:/transcode/session/peth2qcuu5n/progress?index=4&id=6020&codec=mp3&type=audio (5 live) 3ms 190 bytes Jul 28, 2016 14:25:53.496 [0x7fa1a77ff700] DEBUG - Request: [127.0.0.1:45888] PUT /video/:/transcode/session/peth2qcuu5n/progress?index=5&id=6021&codec=mp3&type=audio (5 live) Jul 28, 2016 14:25:53.497 [0x7fa1a77ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication. Jul 28, 2016 14:25:53.497 [0x7fa1a77ff700] DEBUG - Auth: Came in with the master token, authorization succeeded. Jul 28, 2016 14:25:53.499 [0x7fa1b57fe700] DEBUG - Completed: [127.0.0.1:45888] 206 PUT /video/:/transcode/session/peth2qcuu5n/progress?index=5&id=6021&codec=mp3&type=audio (5 live) 2ms 190 bytes Jul 28, 2016 14:25:53.500 [0x7fa1ae3fe700] DEBUG - Request: [127.0.0.1:45889] PUT /video/:/transcode/session/peth2qcuu5n/progress?index=6&id=6022&codec=ac3&type=audio (6 live) Jul 28, 2016 14:25:53.501 [0x7fa1ae3fe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication. Jul 28, 2016 14:25:53.501 [0x7fa1ae3fe700] DEBUG - Auth: Came in with the master token, authorization succeeded. Jul 28, 2016 14:25:53.503 [0x7fa1b57fe700] DEBUG - Completed: [127.0.0.1:45889] 206 PUT /video/:/transcode/session/peth2qcuu5n/progress?index=6&id=6022&codec=ac3&type=audio (5 live) 2ms 190 bytes Jul 28, 2016 14:25:53.518 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.522 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.524 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.527 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:53.530 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.533 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.536 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.538 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:53.541 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.544 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.547 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.550 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:53.553 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.556 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.559 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.562 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:53.565 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.569 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.572 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.574 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:53.577 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.581 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.584 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.586 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:53.589 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.593 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.596 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.598 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:53.602 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.606 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] non-existing PPS 0 referenced Jul 28, 2016 14:25:53.608 [0x7fa1a77ff700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] decode_slice_header error Jul 28, 2016 14:25:53.611 [0x7fa1ae3fe700] ERROR - [Transcoder] [h264 @ 0x1d07fa0] no frame! Jul 28, 2016 14:25:56.172 [0x7fa1b39e4700] DEBUG - [FFMPEG] Duration: -1 Jul 28, 2016 14:25:56.172 [0x7fa1b39e4700] DEBUG - Read line, and done: 1

Here is how I contstruct the object(s):

` video = VideoClipObject(

            key = Callback(LiveTVMenu, sender=sender, channel=channel, thumb=currentEpgImage, include_oc=True),
            title = ("%s | %s" % (sender, currentTitle)),
            summary = ("%s | %s" % (currentStartTime, currentDescription)),
            duration = currentDuration,
            rating_key = currentTitle,
            thumb = thumb,
            items=[
                    MediaObject(
                    optimized_for_streaming=True,
                    container='mpegts',
                    parts = [PartObject(key = stream, duration = currentDuration)]
                            )
                    ]
            )

    if include_oc:
            return ObjectContainer(objects=[video])

    return video

`

It doesn’t matter if I set the container type or not.

Now, is there any working TV streaming channel that successfully delivers mpegts/pes ? If yes, any help/link is appreciated. Maybe some of the gurus could point me into the right direction.

Kind regards,
Alex

Additional info - it works in the iOS client, but not in the browser (safari).

The Plex Media Server log will not show anything helpful because it is just showing you that it tried to transcode and failed because Plex cannot transcode live feeds.

Make sure you have it as a separate function to build the media object and that you add the protocol=hls (I am assuming this is an HLS live feed since are trying to play it on iOS and Safari). And you need to also include the container to make sure it does not try to transcode.

Here is an example used for the live feeds from RTUSA channel - github.com/plexinc-plugins/RTUSA.bundle/blob/master/Contents/Code/init.py#L115

Hi Shopgirl,

Thanks a lot. That solved it somehow. Unfortunately the source (www.tvdr.de) is a linux based video recorder system, and it really only produces a mpegts stream for live TV. So no HLS (yet).

in fact it doesn’t work in the browser, which is funny because I remember it did once a while ago … But hey, doesn’t matter.

The Link you provided is very good example. I have to refactor my whole code to get it that clearly readable and structured.

Thanks again,
Alex