GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need help with ffmpeg (https://gfy.com/showthread.php?t=1348579)

Ollay 09-23-2021 03:36 PM

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 09-23-2021 06:43 PM

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 :)

plsureking 09-24-2021 07:16 AM

mechbunny doesnt have video conversion? :error

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

:thumbsup

#

Ollay 09-24-2021 11:10 AM

Quote:

Originally Posted by plsureking (Post 22917070)
mechbunny doesnt have video conversion? :error

#

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

Thank you for the help guys but i've given up :upsidedow 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


All times are GMT -7. The time now is 12:57 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123