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!
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
Forgive the domain name! LOL, it’s a Nextcloud server I run at home LOL
[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]$
@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
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
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!
“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
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.
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)
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 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
So…
(a) Now what?
(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!
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??
@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?
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.
@ChuckPa no rush at all! … 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
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
@ChuckPa I know VLC can be a swear word 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
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 ) I’m less than a noobie when it comes to ffmpeg, so it’s just a big fact finding and testing mission
And thanks for the kind words We’re both full of pizza, watching Plex I saw on another thread that your were off ill/sick recently? I hope you’re ok? Recovering ok?
I hear ya I had a day-off-cake-day the other week… The numbers keep getting bigger Happy birthday
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
ROFL - next week, oooohhhhhh 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