Open 66cobra opened 10 months ago
Since I was unable to figure out how to control fftranscoder plugin parameters besides bitrate settings in miniclient, I decided to implement a simple parser to accomplish what I wanted. Parser is binary, written in C and gcc compiled under x64 Ubuntu 22.04. It reads ffmpeg command line, manipulates parameters, and executes nvenc-capable plugin ffmpeg renamed to ffmpeg_nvenc.
.zip with executable is attached.
This concoction works for both streaming a video and offline xcoding. Examples of Sage.profile entry for offline transcoding: transcoder/formats/MKV-nv265-720p\ MKV=f\=matroska;MCompressionDetails\=-deinterlace -s 1280x720 -c\:v hevc_nvenc -b\:v 1100K -maxrate\:v 1400K -bufsize\:v 1100K -c\:a aac -b\:a 160K -maxrate\:a 192K;] ffmpeg_parser.zip transcoder/formats/MKV-nv265-orig\ MKV=f\=matroska;MCompressionDetails\=-c\:v hevc_nvenc -b\:v 6M -maxrate\:v 10M -bufsize\:v 6M -deinterlace -c\:a copy;]
I appologize in advance for my stupid question, and I suspect that there is greater than zero chance that this exact question has been asked before, but I've been searching both old sagetv forums and new ones here on github, and not able to find the answer.
In my understanding SageTVTranscoder plugin pulls transcoding profiles from Sage.properties from "transcoder/formats/" entries, but these are only used for transcodings initiated by "convert" action with matching format entries. But where is/are the entry/erntries for the on-the-fly transcoding for miniclient with fixed transcoding setting? i.e. looking at this entry from SageTVTranscoder.log:
################################ SageTVTranscoder (FFmpeg) starting ################################ Arguments: /opt/sagetv/server/ffmpeg -ss 201 -v 3 -y -threads 2 -sn -vsync 0 -async 1 -stdinctrl -i /var/media/tv/ComicsUnleashedWithByronAllen-39476-0.mpg -threads 6 -f matroska -vcodec mpeg4 -b 10000000 -r 29.97 -s 1920x1080 -g 300 -bf 0 -acodec ac3 -ab 192000 -ar 48000 -ac 2 -packetsize 1024 -aspect 16:9 -deinterlace -muxrate 2000000 -rc_init_cplx 326 -maxrate 10000000 -minrate 0 -bufsize 10000000 -mbd 2 -map 0:0 -map 0:1 - Exiting for some other reason ################################ Exiting ################################
The bitrates and container are pulled from miniclient settings, resolution is from "use souce" setting, but where are other parms specified? I am mainly interested in codec setting, as I would like to try changing mpeg4 to either hevc_nvenc or h264_nvenc, but would also be interested in playing with other parameters.
I assume that same code is executed for miniclient "dynamic" setting when either bitrate or network conditions are not met, is my assumption correct?
Thank you