Skip to content

Instantly share code, notes, and snippets.

@Stylesproline
Stylesproline / README.md
Last active January 20, 2022 07:31
Setup YouTube Live Event

Setup YouTube Live Event

Head on over to your YouTube live Events page (https://www.youtube.com/my_live_events).

Create a new live event that is unlisted (or private) and of Custom type.

Under Basic ingestion choose 1500 Kbps - 4000 kbps (720p).

Check the Enable 60fps box.

@Stylesproline
Stylesproline / README.md
Created December 9, 2021 07:53
Awesome-Selfhosted
@Stylesproline
Stylesproline / README.md
Last active December 8, 2021 09:01
How to overlay/downmix two audio files using ffmpeg

How to overlay/downmix two audio files using ffmpeg

Can I overlay/downmix two audio mp3 files into one mp3 output file using ffmpeg?

stereo + stereo → stereo

Use the amix https://ffmpeg.org/ffmpeg-filters.html#amix filter:

ffmpeg -i 01.mp3 -i 02.mp3 -filter_complex amix=inputs=2:duration=longest output3.mp3

stereo + stereo → stereo

ffmpeg.exe -f lavfi -i color=c=#DD0000:s=1920x1080 -loop 1 -i <input.jpg> -s "1920x1080" -t 5 -filter_complex "[1:v]scale=1920:-2[fg], [0:v][fg]overlay=y=-'t*((h-1080)/5)':eof_action=endall" -y <output.mp4>
echo off
:again
set SquareSize=600
ffmpeg.exe -i "%rt.mp4" ^
-c:v libx264 -crf 23 ^
-filter_complex "[0:v]split=2[blur][vid];[blur]scale=%SquareSize%:%SquareSize%:force_original_aspect_ratio=increase,crop=%SquareSize%:%SquareSize%,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[vid]scale=%SquareSize%:%SquareSize%:force_original_aspect_ratio=decrease[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2" ^
-profile:v baseline -level 3.0 -pix_fmt yuv420p -preset faster -tune fastdecode ^
-c:a aac -ac 2 -b:a 128k ^
ffmpeg -i input.mp4 -i logo.png -filter_complex "[0:v][1:v] overlay=185:475:enable='between(t,2,19)'" output.mp4
ffmpeg -i <input.mp4> -vf "[in]drawtext=text='https://gist.github.com/': fontcolor=white: borderw=2: fontfile=Arial Black: fontsize=w*0.04: x=(w-text_w)-(w*0.04): y=(h-text_h)-(w*0.04): enable='between(t,0,6)',\
drawtext=text='https://github.com/Stylesproline': fontcolor=white: borderw=2: fontfile=Arial Black: fontsize=w*0.04: x=(w-text_w)/2: y=(h-text_h)/2: enable='between(t,7,8)',\
drawtext=text='Stack I': fontcolor=white: borderw=2: fontfile=Arial Black: fontsize=w*0.04: x=(w-text_w)/2: y=(h-text_h)/2: enable='between(t,9,10)'[out]" -codec:a copy <output.mp4>