FFMPEG from Zero to Hero
21–30 of 140 posts
Re: FFMPEG from Zero to Hero
#22Might have come in handy while I was struggling to type out ffmpeg -i part0.mp4 -i part1.mp4 -filter_complex "[1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2[v1]; [0:v] [0:a] [v1] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" out.mp4 to concatenate two videos with different sizes today. My relation with it is almost identical to my relation with any bash scripting m…
Re: FFMPEG from Zero to Hero
#23Re: FFMPEG from Zero to Hero
#24Handbrake worked too, sometimes easier for things like 4:3 deletterbox or ad removal or b&w restoration on colourised screening.
I still use mpeg_streamclip for some things. I used to use an Italian PhD students Java tool to fix TS flags without explicitly reencoding. ffmpeg can probably do all the things I am doing, if I look harder.
I have no idea what most of the options mean beyond bullshitting, and I rely on the wisdom of others "try adding this option"
It's digital alchemy. Do not offend Yagoth, incanting for Morgoth. The candles are optional but the goat skull is not: i tried removing the -a: option but something broke.
Re: FFMPEG from Zero to Hero
#25ffmpeg is the most intimidating piece of software ever crafted, and it’s not even close
Re: FFMPEG from Zero to Hero
#26Sometimes a streamer wants to overlay his stream with a tournament channel, but because of copyright they can't. It'd be nice to have an easy way to set that up, if twitch won't do it on their end the user can do it themselves
Re: FFMPEG from Zero to Hero
#27Might have come in handy while I was struggling to type out ffmpeg -i part0.mp4 -i part1.mp4 -filter_complex "[1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2[v1]; [0:v] [0:a] [v1] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" out.mp4 to concatenate two videos with different sizes today. My relation with it is almost identical to my relation with any bash scripting m…
I just grep through my bash history ;)
Re: FFMPEG from Zero to Hero
#28Re: FFMPEG from Zero to Hero
#29Might have come in handy while I was struggling to type out ffmpeg -i part0.mp4 -i part1.mp4 -filter_complex "[1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2[v1]; [0:v] [0:a] [v1] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" out.mp4 to concatenate two videos with different sizes today. My relation with it is almost identical to my relation with any bash scripting m…
Their man page even had a like three line long example for basic stuff. ffmpeg is at least a bit more consistent with syntax though only barely!
Re: FFMPEG from Zero to Hero
#30Might have come in handy while I was struggling to type out ffmpeg -i part0.mp4 -i part1.mp4 -filter_complex "[1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2[v1]; [0:v] [0:a] [v1] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" out.mp4 to concatenate two videos with different sizes today. My relation with it is almost identical to my relation with any bash scripting m…
Their example from the readme:
ffmpeg -i input.mp4 -i overlay.png -filter_complex "[0]trim=start_frame=10:end_frame=20[v0];\
[0]trim=start_frame=30:end_frame=40[v1];[v0][v1]concat=n=2[v2];[1]hflip[v3];\
[v2][v3]overlay=eof_action=repeat[v4];[v4]drawbox=50:50:120:120:red:t=5[v5]"\
-map [v5] output.mp4
Which turns into import ffmpeg
in_file = ffmpeg.input('input.mp4')
overlay_file = ffmpeg.input('overlay.png')
(
ffmpeg
.concat(
in_file.trim(start_frame=10, end_frame=20),
in_file.trim(start_frame=30, end_frame=40),
)
.overlay(overlay_file.hflip())
.drawbox(50, 50, 120, 120, color='red', thickness=5)
.output('out.mp4')
.run()
)
[0] https://github.com/kkroening/ffmpeg-python