Project

General

Profile

How can I pipe to ffmpeg in a docker container

Added by Leigh Hadlum over 3 years ago

Hi, I hope this is a simple syntax issue. Apologies I am not very familiar with linux.

I have a Synology DS918+ which has the ability to transcode using vaapi. The ffmpeg which comes with tvheadend (from synocommunity) does not appear to have the vaapi option.
I have installed jrottenberg/ffmpeg:vaapi and as far as I know, it is all configured correctly. From the command line, I can run the following and it works fine - I know it may not have the correct switches yet, I'm just trying to get it to run:

docker run jrottenberg/ffmpeg:vaapi -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -loglevel fatal -i pipe:0 -acodec copy -preset ultrafast -vcodec libx264 -mbd rd -copyinkf -flags +ilme+ildct -fflags +genpts -f mpegts -tune zerolatency pipe:1

I have created an MPEG/TS Spawn profile in TvHeadend with the above command, but when I run I get this error:

2021-02-23 08:55:49.900 pass: Unable to start pipe 'docker run jrottenberg/ffmpeg:vaapi -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -loglevel fatal -i pipe:0 -acodec copy -preset ultrafast -vcodec libx264 -mbd rd -copyinkf -flags +ilme+ildct -fflags +genpts -f mpegts -tune zerolatency pipe:1' (wrong executable?)

I'm not sure how I should be spawning ffmpeg from TvHeadend. Does anyone have any ideas?

My end goal here is to restream IPTV in a lower resolution, on the fly, so I can view on my phone etc. when away from home.

Thanks!