jrudess / streamdvr

DVR for streaming entertainment
GNU General Public License v3.0
68 stars 16 forks source link

Add HEVC support. #101

Closed purrsevere closed 5 years ago

purrsevere commented 5 years ago

Converts to HEVC for smaller file size at the cost of CPU resource.

kuchenstrudel commented 5 years ago

Great suggestion.

jrudess commented 5 years ago

Thanks, this was on my list to do, but I was thinking of a slightly different implementation, but I haven't put the full infrastructure in place yet.

Rather than making the current post-process script take a new argument, I wanted to make the choice of post-process scripts configurable per site. So instead of adding a new switch for hevc, I'd like a new postprocess_ffmpeg_x265.sh script.

e.g. in the site.yml there will be:

postprocess: scripts/postprocess_ffmpeg.sh

or

postprocess: scripts/postprocess_ffmpeg_x265.sh

I'll put all the code in for this, and then could you resubmit this PR as just the implementation of postprocess_ffmpeg_x265.sh?

purrsevere commented 5 years ago

Sure thing!

jrudess commented 5 years ago

Sorry about the long delay. I finally pushed the change, and the postprocess script is now in config.yml:

recording:
  postprocess: "scripts/postprocess_fmpeg.sh"
purrsevere commented 5 years ago

Just started working on this again and noticed a small problem. Since converting to x265 takes a lot longer than stream copying x264 video, the notice recording appears to be stuck (counter=undefined), file size is not increasing: 81MB seems to appear quite frequently. Can this notice be silenced in the postprocess script?

jrudess commented 5 years ago

What commit version do you have? I believe I have already fixed this in master-branch, and the file size checking is supposed to shut off during post-processing. However, after making that fix I did see "counter=undefined" print once which should never be able to happen. But I haven't been able to reproduce it.