Need help with ffmpeg

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ollay
    Confirmed User
    • Jul 2016
    • 74

    #1

    Need help with ffmpeg

    Hi everyone,

    I'm trying to add a 16:9 intro to videos for my mechbunny site using ffmpeg. So far i have the following filter which i found online:

    Code:
    ffmpeg -i intro.mp4 -i input.mp4 -filter_complex "[0][1]scale2ref=iw:ih[intro][main];[intro]drawbox=t=fill[intro-bg];[0][intro-bg]scale2ref=iw:ih:force_original_aspect_ratio=decrease:flags=spline[intro][intro-bg];[intro-bg][intro]overlay=x='(W-w)/2':y='(H-h)/2'[intro-resized]; [intro-resized][0:a][main][1:a]concat=n=2:v=1:a=1:unsafe=1[v][a]" -map '[v]' -map '[a]' -movflags +faststart -acodec aac -vcodec h264_nvenc -cbr true -b:v 1000k -bt 1000k -y -2pass true -threads 32 -profile:v high -r 30 -preset medium output.mp4
    It works great unless the main video isn't 16:9. If it's a portrait video it will just be stretched out to fill the screen.

    Does anyone know how i can adjust the filter to add black bars down the side of the video to keep it the correct aspect ratio? I'm struggling to get my head around the filters.

    Thanks in advance
  • Publisher Bucks
    Confirmed User
    • Oct 2018
    • 1339

    #2
    See if this might be of use to answer your issue:

    https://stackoverflow.com/questions/...h-aspect-ratio

    Looks like they have a few lines of smaller code snippets posted that might do what you want
    Extreme Link List - v1.0

    Comment

    • plsureking
      bored
      • Aug 2003
      • 4913

      #3
      mechbunny doesnt have video conversion?

      you are looking for letterboxing..
      https://www.google.com/search?q=lett...tterbox+ffmpeg



      #
      PornCMS / low cost paysite management with hosting

      Comment

      • Ollay
        Confirmed User
        • Jul 2016
        • 74

        #4
        Originally posted by plsureking
        mechbunny doesnt have video conversion?

        #
        It does, it has the option to enter your own ffmpeg command.

        Thank you for the help guys but i've given up the problem is i can google and find each thing i want to do individually, but putting them all together in one command is the confusing part. I think i'm just going to pay someone to sort it for me

        Comment

        Working...