Recording 4K HDR via curl/FFMPEG

Help and support with third-party TV software.
Windows Media Center, J River Media Center, Next PVR, MythTV, InstaTV, etc.
Post Reply
helloworld321
Posts: 3
Joined: Thu Nov 19, 2020 7:36 pm

Recording 4K HDR via curl/FFMPEG

Post by helloworld321 »

I'm using a I7-4770 + SSD + 16GB RAM + HD Homerun Prime, nothing special. This setup can record MPEG-2 content just fine, but using the HD Homerun software, it can't quite record 4K HDR (HLG). From what I gather, the 4K HDR stream uses HEVC; my experience is that the HD Homerun software won't work with these streams, at least with my hardware. I'm not sure if the HD Homerun software is attempting to decode/transcode on the fly before recording (I'm by no means a video expert, but logically I think it makes sense that you would need to decode/transcode a stream before it can be recorded?).

In reference to this post - viewtopic.php?f=125&t=13625)

This looks like another possible method of recording. Will I need to buy a video card that supports HEVC decode so it can perform the HEVC decode/transcode when recording?

Thanks,
Last edited by helloworld321 on Fri Nov 20, 2020 4:54 am, edited 2 times in total.

NedS
Silicondust
Posts: 1683
Joined: Mon Dec 10, 2018 12:38 pm
x 74

Re: Recording 4K HDR via curl/FFMPEG

Post by NedS »

No transcoding is done on the 4K unit. The only model we had that did transcoding was the EXTEND. All other HDHomeRun models just shift the raw data form place to place, as the broadcaster transmits it. In theory, broadcasters could even adopt other video codecs and, as long as the rest of the broadcast standards were follow, the HDHomeRun hardware would just automatically work with it. Support for different formats will only matter when you go to play back the content in an app or appliance/box/whatever.

Right now the 4K should work just like all of the other models in regards to the HTTP API. There are still adjustments being made for the 4K model for some broadcasters, but broadly speaking, if you can watch the channel in the HDHomeRun app, then you should also be able to download it using the HTTP API.

Interactive ATSC 3.0 content might be a little different, but so far we haven't really seen that demonstrated beyond some basic tech demos. So for the moment we're just talking about "traditional" channels that are just video/audio (more or less..). ATSC 3.0 can also include DRM-restricted channels as well, but again, not something we've seen in the wild beyond basic demos, so it remains to be seen if those options will even take off.

At this point you should be able to record data. You won't need a capture card, as the HDHomeRun by design already makes the broadcast accessible as data. Right now ffmpeg should support HEVC, but I don't believe it supports the audio codec used for ATSC 3.0 (AC-4), so anything involving ffmpeg will lack sound for the time being.

Online
signcarver
Expert
Posts: 9319
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 21

Re: Recording 4K HDR via curl/FFMPEG

Post by signcarver »

What 4k content are you referring to (source/channel/provider) as there is very little available in 4k that the tuners will be able to pick up (most 4k content would be encrypted). The tuner typically just passes the bits to whatever is recording and depending on what software you use it may try to do something else with such but most will just keep the bits and it is up for the client to decode what is being played, your bitrate would be less than mpeg2 even for 4k in most cases so if it has not trouble recording mpeg2 as far as the tuner goes and most recording software wouldn't have any trouble recording it even on a much less capable machine, playing back such recordings is usually where the problem lies. You posted in 3rd party so I assume you aren't using SD's software but your statement seemed like you were.

Intel core processors need to be at least 6th gen (preferably 7th) to decode HEVC... other video cards added might but most of the stuff from that era probably won't. On top of that you mention HLG which often has additional requirements.

helloworld321
Posts: 3
Joined: Thu Nov 19, 2020 7:36 pm

Re: Recording 4K HDR via curl/FFMPEG

Post by helloworld321 »

signcarver wrote: Thu Nov 19, 2020 8:39 pm What 4k content are you referring to (source/channel/provider) as there is very little available in 4k that the tuners will be able to pick up (most 4k content would be encrypted). The tuner typically just passes the bits to whatever is recording and depending on what software you use it may try to do something else with such but most will just keep the bits and it is up for the client to decode what is being played, your bitrate would be less than mpeg2 even for 4k in most cases so if it has not trouble recording mpeg2 as far as the tuner goes and most recording software wouldn't have any trouble recording it even on a much less capable machine, playing back such recordings is usually where the problem lies. You posted in 3rd party so I assume you aren't using SD's software but your statement seemed like you were.

Intel core processors need to be at least 6th gen (preferably 7th) to decode HEVC... other video cards added might but most of the stuff from that era probably won't. On top of that you mention HLG which often has additional requirements.
Verizon Fios with a HD Homerun Prime. Based on the response above, it seems that recording is possible even if the underlying computer can't play back HEVC content. When I attempt to tune in the channel, it pixelates/doesn't want to play it back (as I expect). Recording it via the software doesn't seem to work, but I'll give the http recording mechanism a shot. I'm not so experienced with using command line stuff, but for this, I'm very much interested in learning.

jasonl
Expert
Posts: 15369
Joined: Sun Oct 28, 2007 9:23 pm
x 12

Re: Recording 4K HDR via curl/FFMPEG

Post by jasonl »

Even a bottom-end ARM-based NAS can record the 4K channels from Verizon. They're encoded at a somewhat higher data rate than the highest rate HD channels so it might struggle on wifi or other slow networks, but if your setup can record 2 regular HD channels then it is more than fast enough to do a single 4K channel. Playback is definitely going to be an issue because that CPU is way too slow to software decode 4K video, but if you toss a decent GPU with hardware HEVC decoding in there it will be fine. My desktop is running an even older i7, but I put a GTX 1050 in there a year ago to give me something that can drive a 4K display at 60Hz and it has no issues with the Verizon 4K channels.

helloworld321
Posts: 3
Joined: Thu Nov 19, 2020 7:36 pm

Re: Recording 4K HDR via curl/FFMPEG

Post by helloworld321 »

Great news - it worked :)

Ffmpeg isn't needed at all, just a single command line entry, as referenced above, works perfectly. The computer performing the recording doesn't need to have HEVC decode capabilities either, as the poster above confirmed as well. Very pleased with this setup - great work SiliconDust!

Post Reply