VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hi all,

    I would like to combine two kind of filters and I do not know how.

    It's about add black bands for those videos who do not fit a full HD resolution (in this case) and adding subtitles from a stream source...

    The filters are as follow ...

    Black bands ...
    Code:
    -filter:v 'scale=1920:-1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2'
    DVB Subtitles coming from a stream ...
    Code:
    -filter_complex '[0:v][0:s:1]overlay[v]' -map [v] -map 0:a
    I hope somebody might help.

    Thank you very much in advance indeed!!

    Kindest regards,
    Mapg
    Last edited by mapg; 25th Jul 2015 at 15:41.
    Quote Quote  
  2. have you tried simply calling one after the other?
    Code:
    -filter:v 'scale=1920:-1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2' -filter_complex '[0:v][0:s:1]overlay[v]'  -map [v] -map 0:a
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. Selur,

    I get the following error ...

    Filtergraph 'scale=1920:-1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph.

    -vf/-af/-filter and -filter_complex cannot be used together for the same stream.

    Best regards,
    Mapg
    Quote Quote  
  4. Then don't use overlay through filter_complex, but also through vf or move everything into a filter_complex call.

    something like:
    Code:
    [0:v]scale=1920:-1[scaled];[scaled]pad=1920:1080:(ow-iw)/2:(oh-ih)/2[video];[video][0:s:1]overlay[v];
    here's my thinking behind it:
    '[0:v]scale=1920:-1[scaled];' should take [0:v] = the first video track from source 1, scale it and provide the output for later filter under the variable 'scaled'
    '[scaled]pad=1920:1080:(ow-iw)/2:(oh-ih)/2[video];' should take the content under 'scaled', evenly add padding to it to reach 1920x1080 and provide the output under for later filters under the variable 'video'

    '[video][0:s:1]overlay[v]', should take 'video' and the subtitle stream number 1, overlay the later over the first and then output the combination under 'v'
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Hi Selur,

    Thank you very much for your help.

    I did as follow and seems that ffmpeg is passing the commands without reporting errors. I couldn't test it in a real scenario yet
    Code:
    -filter_complex '[0:v]scale=1920:-1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2[video];[video][0:s:1]overlay[v]' -map [v] -map 0:a
    What do you think?

    Best,
    Mapg
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!