Jump to content
darrenkdean

CBS - Direct Play Does Not Work, Transcoding Does

Recommended Posts

darrenkdean

Good Evening,

 

We have Live TV thru Emby's Native Support of the HD Home Run Prime & cable cards from Charter.  For the most part Live TV works great, with the exception of CBS.  CBS works great on the Samsung TV's in the house, but will not work on the LG TV's when Direct Streaming.  If I lower the quality down to where it forces transcoding, CBS plays fine on the LG TV's.  I have attached the transcoding log what what did play on the LG TV in hopes that this might be something that can be fixed.

 

Emby Server is 4.3.0.26 running on top of Ubuntu 18.04.3.  TV is a LG 65UH6030-UC.

Share this post


Link to post
Share on other sites
Luke

Hi there, did you forget to attach the log?

 

What does "not work" mean?

Share this post


Link to post
Share on other sites
darrenkdean

lol...long day; apologies. I'll post the log this afternoon . Does not work in this case, means that when it Direct Plays the channel, I just get a black screen with no audio. When I force transcode it at the lowest quality, it plays fine. It's only CBS that does this.

Share this post


Link to post
Share on other sites
SamES

lol...long day; apologies. I'll post the log this afternoon . Does not work in this case, means that when it Direct Plays the channel, I just get a black screen with no audio. When I force transcode it at the lowest quality, it plays fine. It's only CBS that does this.

 

Can you please attach a transcode log that plays when you drop the quality?  This will help us understand what's going on.

Share this post


Link to post
Share on other sites
darrenkdean

Hi there, did you forget to attach the log?

 

What does "not work" mean?

 

Apologies for that.  Please see the transcode log attached.  When direct streaming CBS, there is only a black picture & no sound.  When I lower the quality & force transcoding, it plays fine.  This is only impacting CBS.

Transcode Log.txt

Share this post


Link to post
Share on other sites
SamES

I'm just curious, if you make a recording of CBS, can you DirectPlay it without any problems?  I'm interested to know if it is just a problem with this video format on LG, or if it is the fact that it is a 'live-stream' that is causing your issues.

Share this post


Link to post
Share on other sites
darrenkdean

I will try this & report back.  I currently have TV Recording disabled.

 

I'm just curious, if you make a recording of CBS, can you DirectPlay it without any problems?  I'm interested to know if it is just a problem with this video format on LG, or if it is the fact that it is a 'live-stream' that is causing your issues.

Share this post


Link to post
Share on other sites
darrenkdean

Update:

 

Recorded a small clip from CBS.  LG TV was able to play the recording fine.  Emby Server showed that the recording was being transcoded vs. Direct Play.  Alternatively, when I try to play CBS live on the LG TV, it always attempts to Direct Play (black screen, no audio) unless I force transcode it at a very low quality.  Recording Transcode Log attached.

 

@@darrenkdean, were you able to try this?

 

Recording Transcode Log.txt

Share this post


Link to post
Share on other sites
SamES

Thanks that helps.  Can you please put the recorded sample on onedrive or dropbox and send me a PM with a link.  I'd like to try a few things with this file to understand what's going on.

Share this post


Link to post
Share on other sites
Luke

The transcoding reason is that the lg video player reported an error with the file, so we automatically switched to transcoding to allow it to play.

Share this post


Link to post
Share on other sites
SamES

The transcoding reason is that the lg video player reported an error with the file, so we automatically switched to transcoding to allow it to play.

Correct, but I wouldn’t mind trying to understand why so that we can transcode from the start, at least for the live stream

Share this post


Link to post
Share on other sites
robrhedrick

Thanks that helps.  Can you please put the recorded sample on onedrive or dropbox and send me a PM with a link.  I'd like to try a few things with this file to understand what's going on.

Just PM'ed you a link to the clip.

Share this post


Link to post
Share on other sites
robrhedrick

The transcoding reason is that the lg video player reported an error with the file, so we automatically switched to transcoding to allow it to play.

 

It appears that all other devices that connect to live tv do transcoding right off the bat... MPEG-2 VAAPI -> H.264 (AVC) VAAPI

 

The LG tv's direct stream the feed. If we set it to record, then play that recorded stream, the LG player is seeing that it needs to MPEG-2 VAAPI -> H.264 (AVC) VAAPI hardware transcode and it plays fine.

 

Is there a way to make the LG player always hardware transcode live MPEG-2 streams?

Share this post


Link to post
Share on other sites
Luke

Well we need to learn why it isn't recovering automatically like the recording is.

Share this post


Link to post
Share on other sites
softworkz

Hi, I got all the answers now.

 

@@SamES - Where did you get this stream from? Did you record it, and if yes, how?

 

 

According to my analysis:

  • The stream is originating from an ATSC broadcast
    .
  • It's not an original broadcast stream, though
    Everything but the video and audio alongside the mandatory PAT/PMT has been stripped
    .
  • Originally, the video stream was broadcast as an encrypted stream (DigiCipher II encryption)
    .
  • Somehow, the video stream has been decrypted, but whoever did the decryption, forgot to change the stream type id to the right value ("right" meaning non-encrypted mpeg2 video)

5df2e2098cef4_digicipher2_b.jpg

 

 

The stream type is still indicated as 128 (0x80), which means encrypted.

 

The  consequence is that ffmpeg says "Invalid decoder type 'mpeg2video'" because stream type 128 is an unknown type of stream.

Edited by softworkz

Share this post


Link to post
Share on other sites
SamES

Hi, I got all the answers now.

 

@@SamES - Where did you get this stream from? Did you record it, and if yes, how?

 

 

According to my analysis:

  • The stream is originating from an ATSC broadcast

    .

  • It's not an original broadcast stream, though

    Everything but the video and audio alongside the mandatory PAT/PMT has been stripped

    .

  • Originally, the video stream was broadcast as an encrypted stream (DigiCipher II encryption)

    .

  • Somehow, the video stream has been decrypted, but whoever did the decryption, forgot to change the stream type id to the right value ("right" meaning non-encrypted mpeg2 video)

 

The stream type is still indicated as 128 (0x80), which means encrypted.

 

The  consequence is that ffmpeg says "Invalid decoder type 'mpeg2video'" because stream type 128 is an unknown type of stream.

 

From post 1 above, this is a recording made in Emby from HD Home Run Prime & cable cards from Charter

 

 

We have Live TV thru Emby's Native Support of the HD Home Run Prime & cable cards from Charter.  For the most part Live TV works great, with the exception of CBS.  CBS works great on the Samsung TV's in the house, but will not work on the LG TV's when Direct Streaming.  If I lower the quality down to where it forces transcoding, CBS plays fine on the LG TV's.

 

The original problem is no video when the live stream direct plays, unless transcoding is forced.  This recording was made as a test to verify whether the recording will direct play.

 

Where in this chain should the change in stream type be being made?

Share this post


Link to post
Share on other sites
softworkz

What ffmpeg does is this:

  • At first, it uses the stream information to determine the stream codec
  • 0x80 is unknown, so it considers the stream type as 'none'
  • This leads to rejection of the specified decoder ("mpeg2video")
    => and ends with error
  • But otherwise it continues and tries to detect the stream type from the content data 
    => finally detects that it's mpeg2video
  • And writes that to the output, even when the stream is just copied

What we can work around is the server's error when transcoding (invalid decoder type).

 

But enabling direct play on the tv - that's a different story. It will require changing the stream type id.

 

Where in this chain should the change in stream type be being made?

 

That would be the HDHR firmware.

 

It does the decryption, meaning that it modifies the stream content, so it it also responsible to adjust the stream type accordingly.

Edited by softworkz

Share this post


Link to post
Share on other sites
SamES

Cool, so assuming we can't get SiliconDust to fix their firmware, we need to be able to at least handle this server error as you suggested. 

 

For the DirectPlay issue (assuming it is just the stream ID causing the issue), I presume there is no way we can detect this issue at playback time so that we can force a transcode. 

 

As it also appears not to fail during playback (there is only a black picture & no sound), so I don't see how we can catch the failure and transcode.

 

I'm out of ideas now.

 

As a quick test, are you able to modify just the stream ID without changing the stream itself?  I'm interested to see if just changing the stream ID will allow this recording to DirectPlay.

Share this post


Link to post
Share on other sites
softworkz

A surgical adjustment of just that single value leaving everything else precisely intact, is something that ffmpeg cannot do.

(we are currently able to fix timestamps in such a surgical way and we will be able to do that for other values in the future - but not right now)

 

But ffmpeg has demuxers and decoders on one side and muxers and encoders on the other side, so you will always get "something new" out of it.

 

I think the closest thing that can be done using ffmpeg is this:

ffmpeg -y -copyts -f mpegts -i cbs.ts -map 0 -c copy out.ts

It will leave the streams itself unchanged but recreate the stream container.

 

I tried this and as expected, it corrects the stream type:

 

5df2fe210dc9b_digicipher_stream_compare.

 

Some timing values are changed as well.

 

You could try this with your TV. When it works, it's not a 100% proof, but a strong indication that the problem is caused by the incorrect stream type.

Share this post


Link to post
Share on other sites
softworkz

Do you get this error with the stable release?

 

Not the ffmpeg error, but the LG TV error, right?

Share this post


Link to post
Share on other sites
Luke

In this case I'm curious about the ffmpeg error when the server tries to transcode it.

Share this post


Link to post
Share on other sites
SamES

Do you get this error with the stable release?

 

I'll test with the stable release tonight  (No compatible streams error, correct?).

Edited by SamES

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...