maddox / wallop

📺 A transcoding server for your HDHomeRun Prime
167 stars 41 forks source link

H.265 support? #50

Closed jraynes closed 8 years ago

jraynes commented 8 years ago

Would love to see support for H.265, with an option in settings to select desired codec. I know there aren't many devices that offer native support for it yet but being able to stream 1080p video in the same 3Mbps network footprint that a 720p H.264 stream consumes now would be pretty cool.

maddox commented 8 years ago

Great CPUs have enough trouble encoding 18mbit mpeg2 in h.264 as it is. I can't imagine how it'd be for h.265. And you're right there's not a lot of things that would even take advantage of it.

But with some changes, enabling it to use that instead wouldn't be much. I'd be open to a pull request for it.

jraynes commented 8 years ago

I tried hardcoding ffmpeg to use libx265 in wallop.rb and it works pretty well on my 5 year old rig (i7 Sandy Bridge, 16GB RAM). Plays fine in windows through VLC and Android via the default Chrome browser (Turns out Android has native HEVC support since 5.1). It takes a little bit longer for the stream to load but I was able to knock the bitrate down to 1000k @ 720p and it still looks great.

I don't have much experience when it comes to web design but I'll give it a shot. Thanks.

On Sun, Feb 21, 2016 at 3:08 PM, Jon Maddox notifications@github.com wrote:

Great CPUs have enough trouble encoding 18mbit mpeg2 in h.264 as it is. I can't imagine how it'd be for h.265. And you're right there's not a lot of things that would even take advantage of it.

But with some changes, enabling it to use that instead wouldn't be much. I'd be open to a pull request for it.

— Reply to this email directly or view it on GitHub https://github.com/maddox/wallop/issues/50#issuecomment-186902311.

maddox commented 8 years ago

Wallop is already set up to take arguments for ffmpeg that are adjustable via the config.

You could try to start there.

snowman1979 commented 8 years ago

The Roku 4 now supports HVEC as well. I second this request although I will try modifying wallop.rb manually. If the OP could post their ffmpeg line that would be great though =). If I find a working string I'll post back.

maddox commented 8 years ago

You can see here that Wallop gets a lot of its ffmpeg params from the settings. we could easily just let this support a codec too.

I'd like to see an ffmpeg line as well since it's a lot more complicated than just swapping out the codec, x264 uses a lot of specific options, that'd have to be pulled out as well.

snowman1979 commented 8 years ago

OK here will be the start for me (note it does say last modified 14mo ago) when I have time I'll poke at it https://trac.ffmpeg.org/wiki/Encode/H.265 (and thank you for your reply @maddox . Yes thats a great file to edit but I am also unsure at this time what should be removed or added for hvec vs h264. Thank you for wallop also its simply amazing.

jraynes commented 8 years ago

I was able to change the -vcodec parameter from libx264 to libx265 while keeping everything else the same and it works fine for 720p. I can only get to 1080p if I set the preset to ultrafast which really decreases the quality of the feed. I'm currently experimenting with some other codecs including Nvidia's NVENC hardware encoder which uses my graphics card as an accelerator. It's obviously very fast but doesn't have nearly the same level of processing options that libx264 or libx265 does.

On Mon, Mar 7, 2016 at 4:47 PM, snowman1979 notifications@github.com wrote:

OK here will be the start for me (note it does say last modified 14mo ago) when I have time I'll poke at it https://trac.ffmpeg.org/wiki/Encode/H.265

— Reply to this email directly or view it on GitHub https://github.com/maddox/wallop/issues/50#issuecomment-193468421.

snowman1979 commented 8 years ago

Awesome thanks for the reply. Yeah I read too, in researching libx265, that it will take most of the libx264 arguments although I'd change the bitrate settings too for min and max since libx265 requires much much less bandwidth to create video of equal or greater quality than x264. By chance did you test with a roku 4 at all? Im waiting for mine to arrive.

maddox commented 8 years ago

I'm completely open to any PRs submitted to add this. But for now, I personally won't be working on this.