tellytv / telly

An IPTV proxy
MIT License
750 stars 105 forks source link

Custom ffmpeg command line options for maxrate and bufsize #272

Open ctrlbrk42 opened 4 years ago

ctrlbrk42 commented 4 years ago

I need to pass -maxrate and -bufsize to the ffmpeg command inside the docker, but I cannot find the source files of where Telly is calling ffmpeg.

I tried just making a bash file at /usr/local/bin/ffmpeg to call the real bin, but I'm having trouble manipulating the passed arguments and getting -maxrate and -bufsize to work.

It would be far simpler if Telly had this as a config option, but I am fine doing it the above way if I could just get a little help on the arguments coming fro Telly, or where the source file is that is calling ffmpeg so I can modify it directly.

ctrlbrk42 commented 4 years ago

Got it :)

!/bin/sh

echo "$@" >/dev/stderr

for last; do true; done /usr/local/bin/ffmpeg-real -re -i $3 -b:v 3000k -f mpegts pipe:1

iMiMx commented 3 years ago

Agreed, it would be nice for this to be user editable. However, it is easy enough to rebuild it as an alternative to your example :)

For anyone else...

First, setup go, latest/current version (not an old repo version)
git clone https://github.com/tellytv/telly -b dev
Edit routes.go, line "run := exec.Command("ffmpeg"....." to your liking
make
doughnet commented 3 years ago

this would be nice; because then could pass through commands to utilize GPU if available/wanted.