Post Thu Dec 23, 2021 10:00 pm

Onlinetranscoding seems to not start actual transcode job

My issue is with getting a transcoding ffmpeg job to run using the OnlineTranscoding block in either profiles.xml or user-profiles.xml The debug log shows ffmpeg getting invoked with the right encoding parameters from the profile but part of the command line seems to be missing (details below).

ffmpeg appears in task manager but transcoding files never appear in the directory set in the Serviio console.

And, on the DLNA client (a Vizio TV that does a poor job of supporting DLNA) I can get audio if the source stream is compatible without transcoding (ac3) but I never get video no matter what codec is in the source video. Caveat: I'm using handbrake to create what "should" be mpeg2video but MediaInfo seems to report this as a MPEG-4 container with mpegv2 (level high) video codec and I think the TV only supports mpeg-ts for a container, maybe mpeg-ps but I'm not sure). I don't have a video sitting around that I'm sure is mpeg-ts-or-ps/mpeg2/ac3 to test with.

By contrast, when transcoding is invoked for a local file, transcoding files appear in that directory and the ffmpeg command line looks complete. My regular Transcoding block works fine. The target format is container mpeg, video codec mpeg2video and audio codec ac3.

Streaming source is VLC streaming a local file with no transcoding to keep it simple, just push to port 8081 with mux set to 'ts'. I can open a second instance of VLC and open the network stream at http://gamer:8081 and it shows the video fine and Serviio says the stream is valid and available, so the stream itself is good as far as I can tell.

The debug log showed the below lines when starting ffmpeg but again no transcode files get created and no cleanup message in the log which i would normally see after stopping a local file video. Cust Vizio is just a copy of the stock Vizio profile but set to match on container = * to make sure I try to transcode everything since the Vizio DLNA sucks. Same thing happens with stock Vizio TV profile. The Vizio is 10.x.X.25, gamer is my PC where everything is running):

2021-12-23T14:03:25,312 DEBUG [VideoDeliveryEngine] Delivering item '1000000030001784' for client 'Identifier=10.x.x.25, Profile=Cust Vizio TV, Name=Vizio E60 wired'
2021-12-23T14:03:25,314 DEBUG [AbstractAVTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'Identifier=10.x.x.25, Profile=Cust Vizio TV, Name=Vizio E60 wired'
2021-12-23T14:03:25,315 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: http://gamer:8081
2021-12-23T14:03:25,316 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib\ffmpeg.exe -threads 2 -analyzeduration 10000000 -i http://gamer:8081 -y -threads 2 -c:v mpeg2video -pix_fmt yuv420p -qscale:v 1 -r 60000/1001 -g 15 -c:a:0 ac3 -b:a:0 128k -ac:a:0 2 -map 0:0 -map 0:1 -sn -f vob pipe:
2021-12-23T14:03:25,815 DEBUG [StreamBasedTranscodingDeliveryStrategy] Adding client to stream multiplexer: Identifier=10.x.x.25, Profile=Cust Vizio TV, Name=Vizio E60 wired
...
Am I misunderstanding this? I'm not an ffmpeg expert but is it really not 'transcoding' this stream but just trying to pas it along or something? But if not transcoding, why not and how do I force it to transcode?

When I use MediaBrowser and ffmpeg gets invoked to transcode, the line is this which includes the E:\temp directory where I put transcode files:

2021-12-23T13:57:23,747 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib\ffmpeg.exe -fflags +genpts -threads 2 -analyzeduration 10000000 -i http://gamer:8081 -y -c:v copy -c:a:0 copy -map 0:0 -map 0:1 -sn -f hls -hls_time 10 -hls_allow_cache 0 -hls_segment_filename E:\temp\Serviio\transcoding-temp-407ef34a4fd7be04fe5df88d04383a41.stf\segment%05d.ts -hls_list_size 10 -hls_flags delete_segments E:\temp\Serviio\transcoding-temp-407ef34a4fd7be04fe5df88d04383a41.stf\playlist.m3u8

When I transcode a local file to the Vizio, it creates transcode files and the ffmpeg line is this:

2021-12-23T14:43:55,420 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib\ffmpeg.exe -threads 2 -i D:\sample_file.mkv -y -threads 2 -c:v mpeg2video -pix_fmt yuv420p -qscale:v 1 -filter_complex [0:v]pad=1920:1080:0:21:black[v1],[v1]setdar=16:9[v] -r 24000/1001 -g 15 -c:a:0 ac3 -b:a:0 192k -ac:a:0 6 -map [v] -map 0:1 -sn -f vob E:\temp\Serviio\transcoding-temp-8835d9781b80751318f12ba67ce57b65.stf

So, it looks like online transcoding isn't correctly invoking ffmpeg.