UK HD DVR, HDHR5-4DT HDHomeRun - Plex identifies as Progressive and not Interlaced?

I’ve just been working on my BATch scripts to generate the files cleanly. They seem ok, though a little jerky for the first couple of seconds (I thin just because the tuner is only just firing up.).

I can’t do any tuner-transcoded as my tuner doesn’t support that feature sadly! :frowning:

Here’s just a couple of file, just so you can see, but I need to now find a date/time for recoding the files (E.g. an event or something) were we can see the issues. Maybe even a commercial that then leads into show/event starting? I’ll see what I can do :wink:

Forgive the domain name! LOL, it’s a Nextcloud server I run at home LOL

The names are fine. They’re descriptive.

  1. What they show using 3rd party tool mediainfo
[chuck@lizum Downloads.2014]$ mediainfo v101@duration\=10.ts 
General
ID                                       : 16521 (0x4089)
Complete name                            : v101@duration=10.ts
Format                                   : MPEG-TS
File size                                : 5.11 MiB
Duration                                 : 9 s 894 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 4 305 kb/s

Video
ID                                       : 6601 (0x19C9)
Menu ID                                  : 17540 (0x4484)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 27
Duration                                 : 8 s 960 ms
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 6602 (0x19CA)
Menu ID                                  : 17540 (0x4484)
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : LATM
Codec ID                                 : 17-2
Duration                                 : 9 s 728 ms
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -781 ms
Language                                 : English
descriptor_tag_extension                 : 6

Text
ID                                       : 6605 (0x19CD)
Menu ID                                  : 17540 (0x4484)
Format                                   : DVB Subtitle
Codec ID                                 : 6
Duration                                 : 6 s 200 ms
Delay relative to video                  : 3 s 760 ms
Language                                 : English

Menu
ID                                       : 6600 (0x19C8)
Menu ID                                  : 17540 (0x4484)
Duration                                 : 9 s 894 ms
List                                     : 6601 (0x19C9) (AVC) / 6602 (0x19CA) (AAC, English) / 6605 (0x19CD) (DVB Subtitle, English) / 7302 (0x1C86) () / 7319 (0x1C97) () / 7108 (0x1BC4) () / 7110 (0x1BC6) ()
Language                                 :  / English / English


[chuck@lizum Downloads.2015]$ mediainfo v103@duration\=10.ts 
General
ID                                       : 16521 (0x4089)
Complete name                            : v103@duration=10.ts
Format                                   : MPEG-TS
File size                                : 4.20 MiB
Duration                                 : 9 s 970 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 3 530 kb/s

Video
ID                                       : 201 (0xC9)
Menu ID                                  : 17609 (0x44C9)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 27
Duration                                 : 9 s 0 ms
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type, store method                  : Separated fields
Scan order                               : Top Field First
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 202 (0xCA)
Menu ID                                  : 17609 (0x44C9)
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Muxing mode                              : LATM
Codec ID                                 : 17-2
Duration                                 : 9 s 856 ms
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -740 ms
Language                                 : English
descriptor_tag_extension                 : 6

Text
ID                                       : 205 (0xCD)
Menu ID                                  : 17609 (0x44C9)
Format                                   : DVB Subtitle
Codec ID                                 : 6
Duration                                 : 5 s 880 ms
Delay relative to video                  : 2 s 40 ms
Language                                 : English

Menu
ID                                       : 200 (0xC8)
Menu ID                                  : 17609 (0x44C9)
Duration                                 : 9 s 970 ms
List                                     : 201 (0xC9) (AVC) / 202 (0xCA) (AAC, English) / 205 (0xCD) (DVB Subtitle, English) / 8000 (0x1F40) ()
Language                                 :  / English / English


[chuck@lizum Downloads.2016]$

How PMS sees them.

The video streams themselves are valid.

If we’re going to dive deeper into this:

  1. Examine a file as it’s being grabbed (recorded)
  2. Compare with the resultant media info PMS shows after completion.

Process.

  1. Selecting the interlaced channel to record.
  2. Start a manual recording of whatever’s playing
  3. Let it capture for a a minute or two (to put data in the recording buffer)
  4. Open a terminal window
  5. Dig in the TV (or Movie) section, at the top most level of the first directory listed, for a .grab (dot-grab) directory
  6. cd into that directory
  7. In there, you’ll see the pieces of the program being captured.
  8. use the “mediainfo” tool again to inspect a few samples
  9. When the recording finishes and PMS completes ingesting the recording, Look at the media info again.

Now compare PMS “media Info” after recording completes.

Present both here.

1 Like

@ChuckPa Thanks for the info. I actually tried to look at the .grab folder where the destination of the recording is and it’s just a single file. But I did see that if I work my way through the Transcoder temporary directory I can find the individual files :wink:

Just reflecting on the client side of Plex, what are we expecting it to do when it sees interlaced files? Do we know what the process is supposed to be, who does what deinterlace? (client or PMS)

[Edit] I have just ran some tests on a TV show that is/was being aired on channel 103. And it’s interesting what I got back.

  • Mediainfo on individual .grab files - they’re ‘progressive’
  • Mediainfo on final .ts files, after recording had finished, it’s “progressive”
  • Ran my own BAT file to wget the data and used ffprobe, it’s “progressive”
  • PMS identifies the file as progressive :wink:
  • When I play the file back in Plex Windows Client - it plays fine, no real issues
  • When I play back in Chrome Client, there is no interlace issues, but Chrome skips about 0.5 seconds, every ~5 seconds - it’s really annoying to try and watch - if I set Chrome/Client to auto convert, it’s fine? I think it’s worth saying this “issue” I found is out of scope for all of this, but it is an issue no matter what DVR files I play (I’ve only just found this)

This is intriguing as @e10kstarfire is correct, it seems (in general) Freeview UK can switch between stream types. I know that ITV 1 HD was streaming/broadcasting Interlaced for the rugby matches, but my test just now show it (ITV 1 HD) will also stream/broadcast in Progressive!!! @HomeMediaServer2018, it would seem that Freeview UK loves to mess around with stream types! Or at least ITV does! :crazy_face:

“Thinking out aloud”, what happens if a DVR recording is set to start 5mins before the air-time, and in those 5mins, an advert was broadcasted in Progressive? And then the stream changes (to Interlaced) just as the main TV show starts? This means DVR recording will be a mix of both Progressive and Interlaced!?! What the heck do we do with that? Does the .TS keep this information so that the client can see/recognise the change, and adjust accordingly?

For me, I need to look at getting data (mediainfo + copies of files), for a given Interlaced TV show/recording from channel 103:

  • .grab individual files, and take a copy of a file
  • the final .ts once recording is finished
  • grab my own direct stream from HDHomeRun with wget/curl

The really hard part, now knowing channel 103 (ITV 1 HD) can transmit either Interlaced or Progressive, is how the heck do I find an Interlaced show? This may take some time, and trial and error :roll_eyes:

As I understand it (with a Freeview HD stream anyway), you cannot just look at the metadata header information at the start of a file (like mediainfo and Plex) to then determine if the complete file is progressive or interlaced.

It can and does switch between the two during transmission and you need to process the data on a GOP basis to determine if its progressive or interlaced.

I can re-create the issue you see with interlacing artifcats playing back football footage on my Firefox browser and the PMS Linux Client (whether PMS thinks its progressive or interlaced).

The same playback on my LG TV or FireTV is NOT a problem - so why the difference ?

Simply, I suspect the hardware on the FireTV and/or LG TV are deinterlacing the signal as required.

1 Like

I think you’re correct, as I know know the stream can change during transmission… I’d love to say “don’t cross the streams”, but Freeview already did that LOL

Its interesting that your LG TV (and/or FireTV) seem to be deinterlacing. My Sony (Android) TV just isn’t doing this at all. This bring me back to the un-answered question, “what is Plex (both PMS and client) supposed to be doing”? As in, how is Plex supposed to handle this and what is the process for deinterlacing?

I’m still to find and record some streams to post back in here for @ChuckPa. It’s difficult to find (or know) if the ITV stream is Interlaced without just sitting on the computer all day checking each TV show LOL

Ok, so as luck would have it, a current TV show is being broadcast in Interlaced. I think this is going to be a mute point, but I’ll share links to the files I collected. But I did note that PMS is correctly identified this short recording as Interlaced.

I will be attempting to grab more files, that hopefully span the aired show as Interlaced and I’m hoping that the commercials/adverts will be in Progressive… I’ll report back on that.

@ChuckPa here’s some more files, but they all seem to identify correctly as Interlaced.

Plex DVR .grab files (small selection)

Final TS file created by Plex (and saved to main DVR/TV folder)

Manual wget direct from the HDHomeRun

Ok, so after watching faaaaar too much of this cr@ppy TV show, I managed to collect some more data/files.

We all knew this would be the case, but for completeness, here we go… I started to record a TV show that was being aired as Interlaced; watching it through Chrome, I could see it was not deinterlacing (I took a screen grab); I waited for the adverts/commercials, and then used wget to dump out a short clip direct from HDHomeRun; as expected the small section I captured is in Progressive… At this point I stopped the recoding of the show and checked back in PMS and sure enough Plex has identified the show as Interlaced.

For me it’s interesting to see how DVR/TV streams work :man_shrugging: But I’m still stuck with the problem of, now that we know that UK Freeview can switch stream types “at will”, how is Plex handling this, both PMS and client? Only in that, I can see Chrome is not playing it back as deinterlaced and I know my Android TV isn’t deinterlacing (from the sports I watched at the weekend)… I suppose things can/cloud be worse if I start recoding a TV show early, and the adverts (in Progressive) are recorded prior to the main show starting, as PMS is then identify this as Progressive (which is what seems to have happened for the rugby match at the weekend) - does this matter? It depends on how Plex works with all of this :man_shrugging:

So…
(a) Now what? :man_shrugging:
(b) (In general) How is Plex handling deinterlacing? (PMS and Client)
(c) How does Plex handle switching between progressive and interlaced, during a single playback of a file?
(d) Does Plex monitor the content of the media file, so it can switch between deinterlace and progressive?
(e) Out of interest, why does Plex running TV shows at a lower FPS/Hz? I’m watching the same TV channel via both HDHomeRun and Plex and there is a distinct FPS difference! I’d never noticed this before! :face_holding_back_tears:

Here’s a link to the files I collected:

I found this really interesting… While streaming live TV to Chrome, I noted that PMS stated it was transcoding from 1080i to 1080p… I took a couple of screenshots, which isn’t great since it’s a dull tv show that does not have much camera movement, but you can see distinct horizontal lines as if it’s not deinterlaced properly?? :man_shrugging:

PMS Stats

This one is more obvious?

This is less obvious, but you can see lines over the persons face (eyes + teeth)

Another image

@Minxster I don’t usually use Chrome for the DVR and live TV, but tried it today and noticed it was transcoding the same as per your screenshot, so I went back to using the Windows client app and it was direct playing instead. Could this be an issue with Chrome?

Can I have a 2 minute chunk of that interlaced please ?
(raw capture)

I’ve been on a “get Plex/Web healthy” kick :innocent:

It could be TBH… I did not (in a previous post) that Chrome would “skip” bits, so I enabled the Experimental web client and the skipping stopped. But the strange looking image, like it wasn’t deinterlacing properly, was still there.

TBH, I didn’t try the desktop client apps, mainly because it’s more about the Android TV just not deinterlacing properly. I did, while watching the rugby match, tell it to transcode rather than direct play. This helped a little but not a great deal. :man_shrugging:

@ChuckPa

I’ve been on a “get Plex/Web healthy” kick :innocent:

:joy: I think I’ve been on a “find stuff that’s wrong”… Not really a great help to you though LOL. There’s few links to my Nextcloud server above :wink:

I’ll be back after I setup my Stream-crossing experiment and have a chat with Gozer :slight_smile:

1 Like

@ChuckPa no rush at all! :+1:… I’ve turned my PC off for the night and down to the TV for the night… Telling my better half what I’ve been testing and showing her “here look at those lines on the picture”, she just rolled her eye at me :joy_cat:

I’m planning on looking at ffmpeg + handbrake to try and work out some useful setting to manually convert some DVR recordings. Yadif x2 seems to produce a better image, when I use VLC, so that’s where I’m going to start :man_shrugging::grin:

I won’t humor VLC in the discussion other than acknowledge that’s your reference point and what you want.

There’s no way a server-player architecture can compete in real time with “Thick, direct-render, player”. It’s not apples-apples.

Go spend time with your Best Half :slight_smile:

1 Like

@ChuckPa I know VLC can be a swear word :rofl: I didn’t want to mention Jellyfin, as I watched the same cr@ppy TV show (as the one I referenced and grabbed files for) and it actually streamed to Chrome deinterlaced @50Hz :scream_cat::exploding_head:

Anywho, my adventures with VLC are to just understand MPEG-TS more and allow me to fiddle with deinterlace techniques. I’ll going to look at ffmpeg to do an overnight conversation of 1080i DVR files. That way, at the least, anything we don’t watch on a night will just get auto-converted. I did spot you can tell ffmpeg to only convert frames that are interlaced, so hopefully the Progressive frames, will be skipped or just transferred (my tests will figure it out :joy_cat:) I’m less than a noobie when it comes to ffmpeg, so it’s just a big fact finding and testing mission :+1::grin:

And thanks for the kind words :heart: We’re both full of pizza, watching Plex :joy_cat::+1::wink::rofl: I saw on another thread that your were off ill/sick recently? I hope you’re ok? Recovering ok?

Now that’s noteworthy :astonished:

I will see what’s going on . I smell another ‘1st class lurk’ coming on. :rofl:

(personal note: I’m tired of getting older and the impact it has. Therefore, I’ve decided to stop having birthdays.)

1 Like

I hear ya :rofl::wink: I had a day-off-cake-day the other week… The numbers keep getting bigger :stuck_out_tongue_winking_eye: Happy birthday :birthday::grin:

Yeh I was intrigued with what Jellyfin did, I’ve not looked at properly yet. I spent all day messing with other docker stuff. So didn’t even get back to look at ffmpeg… It amazing how busy I can keep myself :scream_cat::man_shrugging::joy_cat:

Don’t rush me!!! It’t not until next week! :stuck_out_tongue:

geez… pushing me into the grave already, huh?

:roll_eyes:

The thing to capture from JellyFin is the FFMPEG invocation command line from the logs. Everyone uses FFMPEG so there’s no hiding the magic

1 Like

ROFL - next week, oooohhhhhh :rofl::+1: I’m sure these deep dives into getting plex healthy isn’t great for hair-loss​:older_man:

I’m going to try and flick through the Jellyfin open source stuff to see what I can find. I suspect it’s a layer or two above my capabilities, but you never know :wink: