Same filter for multiple outputs

Questions involving a Windows version of FFmpeg.
Post Reply
chr57
Posts: 5
Joined: Fri Mar 22, 2019 1:20 pm

Same filter for multiple outputs

Post by chr57 » Fri Mar 22, 2019 1:27 pm

I would like to take in one file do yadif on it and then output 2 files with different size. Tryin this code but it gives me this error:

[mxf @ 00000198ea26d000] Invalid stream specifier: '[out1]'.
Last message repeated 17 times
Stream map ''[out1]'' matches no streams.

What am I missing?

ffmpeg.exe -i input.mxf -y -threads 0 -vf 'yadif=1,split=2[out1][out2]' -map '[out1]' -s 1280x720 -strict -2 -pix_fmt yuv420p -c:v libx264 -profile:v main -preset medium -crf 18 -map 0 -c:a aac -b:a 128k out1.mp4 -map '[out2]' -s 768x432 -strict -2 -pix_fmt yuv420p -c:v libx264 -profile:v main -preset medium -crf 18 -map 0 -c:a aac -b:a 128k out2.mp4

pandy
Posts: 184
Joined: Mon Feb 24, 2014 1:46 pm

Re: Same filter for multiple outputs

Post by pandy » Mon Mar 25, 2019 10:19 am


chr57
Posts: 5
Joined: Fri Mar 22, 2019 1:20 pm

Re: Same filter for multiple outputs

Post by chr57 » Fri Apr 05, 2019 7:29 am

Managed to get it working, but the result from the string with multi outputs want work 100%. No thumbnail in Windows and when uploaded to CDN for HLS streaming it fails. It can be played in VLC.

Have examined them in MediaInfo but can't find anything that difference.

Multi bitrate/size with problem:

Code: Select all

ffmpeg -y -hwaccel cuvid -i publik.mxf -threads 0 -filter_complex "[0:v]format=yuv420p, yadif=0, split=4[s0][s1][s2][s3]; [s0]scale=384:216[v0]; [s1]scale=512:288[v1]; [s2]scale=768:432[v2]; [s3]scale=1920:1080[v3]" -map "[v0]" -map "[v1]" -map "[v2]" -map "[v3]" -c:v h264_nvenc -level 4 -preset slow -g 50 -keyint_min 50 -sc_threshold 0 -profile:v main -level 4 -preset slow -g 50 -keyint_min 50 -sc_threshold 0 -map 0:1 -c:a aac -b:a 192K -b:v:0 0.5M -b:v:1 1M -b:v:2 1.5M -b:v:3 4.5M -f tee "[select=\'v:0,a\']348x216_audience.mp4|[select=\'v:1,a\']512x288_audience.mp4|[select=\'v:2,a\']768x432_audience.mp4|[select=\'v:3,a\']1920x1080_audience.mp4"
Singel bitrate/size that works:

Code: Select all

ffmpeg -y -hwaccel cuvid -i publik.mxf -map 0:0 -vf yadif=0 -pix_fmt yuv420p -s 384:216 -c:v h264_nvenc -profile:v main -level 4 -preset slow -g 50 -keyint_min 50 -sc_threshold 0 -rc vbr_hq -b:v 0.5M -map 0:1 -c:a aac -b:a 192k 384x216_audience_single.mp4"
mp4 results
https://www.dropbox.com/sh/59cbzyvdsqdz ... Xfb5a?dl=0

Post Reply