Welcome to the MMOLEARN.COM

Build your first Dropshipping, Online Course, Affiliate, Blog, Business, Optin, etc, WEBSITE and make money with us. We offer over 10.000+ Wordpress Plugins & Themes which will let you build ANYTHING. Plus we have nice community which likes to gossip about building websites and making some money online! Its really easy to do when we have everything you need to BUILD anything you WANT. Hope you enjoy your stay and have a beautiful day with us!

or Register
gifd

Useful FFMPEG Command Lines for Youtube.

Catis

Well-known member

VIP MEMBER
Reputation: 22%
Joined
May 25, 2019
Messages
146
Reaction score
23
Points
53
Introduction

This thread showcases practical FFmpeg commands tailored for the needs of YouTubers. :)

If you're unfamiliar with FFmpeg, this page may not be particularly helpful to you.

FFmpeg is a free, open-source software and it's the Swiss Army knife of video- and audio-related processing. It can be used to do an unbelievable range of things and it's being utilized by virtually anyone who's doing any form of video processing. It comes as a command-line tool, but many programs ship with a built-in version of FFmpeg in them to be able to process multimedia files. FFmpeg will run on Linux, Windows, OS X and other platforms.
License: You are welcome to utilize the information provided here in any manner you prefer, without the need for attribution. However, I do not assume responsibility for the outcomes of your actions.
How to Navigate this Guide: Simply search the page for the specific example you require.
The examples presented lack extensive context and typically do not elucidate all the various options employed. The documentation serves that purpose – you can access it online in this comprehensive single-page HTML document or by executing man FFmpeg-all in your terminal.
While the order of options in an FFmpeg command holds some significance, generally, you can use them in any sequence you find suitable.

FFmpeg Command Lines

While the arrangement of options in an FFmpeg command carries some importance, you are generally free to use them in any order you prefer.

Example: Extracting audio from a YouTube video file

ffmpeg -i INPUT.mp4 -ab 256k OUTPUT.mp3


Spoiler: Trimming to a 3-second length

ffmpeg -y -ss 00:00:03 -i INPUT.mp4 -codec copy OUTPUT.mp4


Trim to 30s length after the initial 3s

ffmpeg -y -ss 00:00:03 -i INPUT.mp4 -to 00:00:30 -codec copy OUTPUT.mp4

Remove ID3 Tag Metadata

ffmpeg -y -i INPUT.mp4 -codec copy -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -preset superfast OUTPUT.mp4


Trim to 3s, alter MD5 Hash, and remove ID3 Tag Metadata


ffmpeg -y -ss 00:00:03 -i input.mp4 -codec copy output_cut.mp4

ffmpeg -y -i output_cut.mp4 -codec copy -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -preset superfast output.mp4

delete output_cut.mp4


Crop and Resize

ffmpeg -y -i input.mp4 -filter_complex "crop=640:360:10:10,scale=320:240,setdar=16/9" output.mp4

Apply Vignette

//vignette=0-10
ffmpeg -y -i input.mp4 -filter_complex "vignette=5" output.mp4

Zoom In

//zoom 150% to center
ffmpeg -y -i input.mp4 -filter_complex "crop=iw/2:ih/2,scale=640:360" output.mp4

//zoom 150% from left top corner
//ffmpeg -y -i input.mp4 -filter_complex "crop=iw/2:ih/2:0:0,scale=640:360" output.mp4

Capture a frame as an image

//Extract a frame at 30s
ffmpeg -y -i input.mp4 -ss 00:00:30 -frames:v 1 output.mp4

Generate a thumbnail every 10 seconds

ffmpeg -y -i imput.mp4 -f image2 -vf "fps=1/10" output.mp4


Accelerate video and audio playback

//Speed up to 170% = 1.7
ffmpeg -y -i input.mp4 -filter_complex "setpts=PTS/1.7; atempo=1.7" output.mp4

Overlay logo or apply filter

//Overlay Logo
ffmpeg -y -i input.mp4 -i "Logo.png" -filter_complex "[0:v][1:v]overlay=10:10" output.mp4
//Overlay Filter
//ffmpeg -y -i input.mp4 -i "Filter.png" -filter_complex "[0:v][1:v]overlay=0:0" output.mp4

Apply a blur effect to the video

//boxblur=9:9
ffmpeg -y -i input.mp4 -filter_complex "boxblur=2:5" output.mp4

Rotate the video

ffmpeg -y -i inputmp4 -filter_complex "hflip,vflip" -metadata:s:v rotate=0 -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -preset superfast output.mp4

//transpose
ffmpeg -i input.mp4 -vf "transpose=2,transpose=2,format=yuv420p" -metadata:s:v rotate=0 -codec:v libx264 -codec:a copy output.mp4

//This filter can rotate to any arbitrary angle and uses radians as a unit instead of degrees. This example will rotate π/1 radians, or 180°:
ffmpeg -i input.mp4 -vf "rotate=PI:bilinear=0,format=yuv420p" -metadata:s:v rotate=0 -codec:v libx264 -codec:a copy output.mp4

//You can use degrees instead. One degree is equal to π/180 radians. So if you want to rotate 45°:
ffmpeg -i input.mp4 -vf "rotate=45*(PI/180),format=yuv420p" -metadata:s:v rotate=0 -codec:v libx264 -codec:a copy output.mp4

Convert to MP4 format

//Encode MP4 with Youtube requirement
ffmpeg -y -i input.mp4 -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -preset superfast output.mp4

//Ref
//https://trac.ffmpeg.org/wiki/Encode/YouTube
//https://trac.ffmpeg.org/wiki/Encode/H.264

Convert to AVI format

ffmpeg -y -i input.mp4 -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -f avi -preset superfast output.avi

Convert to FLV format

ffmpeg -y -i input.mp4 -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -f flv -preset superfast output.flv

Convert to MP3 format
ffmpeg -y -i input.mp4 -vn -acodec libmp3lame -b:a 128k -ar 44100 -bufsize 50000k -f mp3 -preset superfast output.mp3


Convert to GIF format

//Convert .mp4 to animated gif(uncompressed) with length 30s
ffmpeg -y -i input.mp4 -s 320x240 -to 00:00:30 -preset superfast output.gif

Remove audio from video

ffmpeg -y -i input.mp4 -codec copy -an -preset superfast output.mp4

Add audio to video

ffmpeg -y -i audio.wav -i input.mp4 -codec copy -shortest -preset superfast output.mp4


Merge two audio files

ffmpeg -y -i audio.mp3 -i input.mp4 -filter_complex "[0:a][1:a]amix=inputs=2:duration=shortest" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -preset superfast output.mp4


Combine multiple videos

//Add intro - main - outro
ffmpeg -y -i intro.mp4 -i input.mp4 -i outro.mp4 -filter_complex "[1:v]scale=1280:720,setdar=16/9 [vmain]; [1:a]volume=1.6 [amain]; [0:v]scale=1280:720,setdar=16/9 [vintro]; [2:v]scale=1280:720 [voutro]; [vintro][0:a][vmain][amain][voutro][2:a]concat=n=3:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -bufsize 500000k -preset superfast output.mp4

//Add intro - main
ffmpeg -y -i intro.mp4 -i input.mp4 -filter_complex "[1:v]scale=1280:720,setdar=16/9 [vmain]; [1:a]volume=1.6 [amain]; [0:v]scale=1280:720,setdar=16/9 [vintro]; [vintro][0:a][vmain][amain]concat=n=2:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -preset superfast output.mp4

//Add main - outro
ffmpeg -y -i outro.mp4 -i input.mp4 -filter_complex "[1:v]scale=1280:720,setdar=16/9 [vmain]; [1:a]volume=1.6 [amain]; [0:v]scale=1280:720,setdar=16/9 [voutro]; [vmain][amain][voutro][0:a]concat=n=2:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -preset superfast output.mp4[/ICODE]

Audio Effect 1 - Bypass YouTube Copyright

ffmpeg -y -i input.mp4 -af "pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1),volume=1.6" -filter_complex "scale=1280:720,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -threads 0 -preset superfast output.mp4[/SPOILER] Audio Effect 2 - Bypass YouTube Copyright [SPOILER="Spoiler"]ffmpeg -y -i input.mp4 -af "pan=stereo|c0<0*c0+c1|c1<0*c0+c1,aeval=-val(0)|val(1),volume=1.6" -filter_complex "scale=1280:720,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -threads 0 -preset superfast output.mp4[/SPOILER] Fullscreen, Full Video Effect - Bypass YouTube Copyright [SPOILER="Spoiler"]//Change MD5 Hash, clear ID3 Tag Metadata, Encode with MP4 //atempo=1.15 «« Increase/decrease the audio speed, currently increase by 115% //volume=1.6 «« Increase/decrease the audio volume //pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) «« Change audio effect to bypass Youtube copyright //setpts=PTS/1.15 «« Increase/decrease the video speed, currently increase by 115% //crop=iw/1.2:ih/1.2 «« Increase/decrease the video zoom, currently zoom with 120% //crop=width:height:x:y «« Crop video by width,height and location x,y //boxblur=1:2 «« Increase/decrease the blur, max value 9:9 //scale=1280:720 «« Resize video to HD 1280x720 //hflip «« Flip the input video horizontally. ex: hflip,scale=1280:720 //vflip «« Flip the input video vertically. ex: vflip,scale=1280:720 //-b:v 1400k «« Increase/decrease the video quality ffmpeg -y -i input.mp4 -i filter.png -af "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1)" -filter_complex "[0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=1280:720 [v1]; [v1][1:v]overlay=0:0,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast output.mp4[/SPOILER] Compact Display, Full Video Effect, Overlay on background video - Bypass YouTube Copyright [SPOILER="Spoiler"]//Change MD5 Hash, clear ID3 Tag Metadata, Encode with MP4 //atempo=1.15 «« Increase/decrease the audio speed, currently increase by 115% //volume=1.6 «« Increase/decrease the audio volume //pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) «« Change audio effect to bypass Youtube copyright //setpts=PTS/1.15 «« Increase/decrease the video speed, currently increase by 115% //crop=iw/1.2:ih/1.2 «« Increase/decrease the video zoom, currently zoom with 120% //crop=width:height:x:y «« Crop video by width,height and location x,y //boxblur=1:2 «« Increase/decrease the blur, max value 9:9 //scale=640:360 «« Resize video to SD 640x360 //hflip «« Flip the input video horizontally. ex: hflip,scale=640:360 //vflip «« Flip the input video vertically. ex: vflip,scale=640:360 //-b:v 1400k «« Increase/decrease the video quality //background.mp4 «« background video //overlay=11:11 «« change the location x:y of input.mp4 video, it will overlay the background.mp4 //Do not use filter_HD.png ffmpeg -y -i input.mp4 -i background.mp4 -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1); [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=640:360 [v1]; [1:v][v1]overlay=shortest=1:x=11:y=11,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast output.mp4 //Use filter_HD.png ffmpeg -y -i input.mp4 -i background.mp4 -i filter_HD.png -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1); [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=640:360 [v1]; [2:v]scale=640:360 [v2]; [v1][v2]overlay=0:0 [v3]; [1:v][v3]overlay=shortest=1:x=11:y=11,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast output.mp4[/SPOILER] 3D Side by Side Display, Full Video Effect, No 3D Filtering - Bypass YouTube Copyright [SPOILER="Soiler"]//Please consider to change below parameter in oder to bypass copyright //boxblur=1:2 «« ncrease/decrease the blur, max value 9:9 //colorbalance=rs=0:gs=0.6:bs=0 «« Set color balance //colorchannelmixer=aa=0.8 «« Mix the color //Do not use filter_3D.png ffmpeg -y -i input.mp4 -i background.mp4 -shortest -af "atempo=1.2,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1)" -filter_complex "[0:v]setpts=PTS/1.2,boxblur=1:1,scale=640x720,colorbalance=rs=0:gs=0.6:bs=0,colorchannelmixer=aa=0.8 [SideLeft]; [0:v] setpts=PTS/1.2,boxblur=1:1,scale=640x720,colorbalance=rs=0.6:gs=0:bs=0,colorchannelmixer=aa=0.8 [SideRight]; [1:v][SideLeft] overlay=0:0 [tmp1]; [tmp1][SideRight]overlay=640:0,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast output.mp4[/SPOILER] 3D Side by Side Display, Full Video Effect, 3D Filtering Applied - Bypass YouTube Copyright [SPOILER="Spoiler"]//Please consider to change below parameter in oder to bypass copyright //boxblur=1:2 «« ncrease/decrease the blur, max value 9:9 //colorbalance=rs=0:gs=0.6:bs=0 «« Set color balance //colorchannelmixer=aa=0.8 «« Mix the color //filter_3D.png «« the filter effect background //Use filter_3D.png ffmpeg -y -i input.mp4 -i background.mp4 -i "filter_3D.png" -shortest -af "atempo=1.2,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1)" -filter_complex "[0:v]setpts=PTS/1.2,boxblur=1:1,scale=640x720,colorbalance=rs=0:gs=0.6:bs=0,colorchannelmixer=aa=0.8 [SideLeft]; [0:v] setpts=PTS/1.2,boxblur=1:1,scale=640x720,colorbalance=rs=0.6:gs=0:bs=0,colorchannelmixer=aa=0.8 [SideRight]; [1:v][SideLeft] overlay=0:0 [tmp1]; [tmp1][SideRight]overlay=640:0 [tmp2]; [tmp2][2:v]overlay=0:0,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast output.mp4[/SPOILER] Fullscreen Display, Adding Intro - Bypass YouTube Copyright [SPOILER="Spoiler"]ffmpeg -y -i input.mp4 -i "filter_HD.png" -i "intro.mp4" -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=1280:720,setdar=16/9 [v1]; [v1][1:v]overlay=0:0 [vmain]; [2:v]scale=1280:720,setdar=16/9 [vintro]; [vintro][2:a][vmain][amain]concat=n=2:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -bufsize 500000k -threads 0 -preset superfast output.mp4[/SPOILER] Fullscreen Display, Adding Outro - Bypass YouTube Copyright [SPOILER="Spoiler"]ffmpeg -y -i input.mp4 -i "filter_HD.png" -i "intro.mp4" -i "outro.mp4" -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=1280:720,setdar=16/9 [v1]; [v1][1:v]overlay=0:0 [vmain]; [2:v]scale=1280:720,setdar=16/9 [vintro]; [3:v]scale=1280:720,setdar=16/9 [voutro]; [vintro][2:a][vmain][amain][voutro][3:a]concat=n=3:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -bufsize 500000k -threads 0 -preset superfast "output.mp4"[/SPOILER] Fullscreen Display, Merging Noise Audio - Bypass YouTube Copyright [SPOILER="Spoiler"]//Add Noise to the original video. ffmpeg -y -i input.mp4 -i "filter_HD.png" -i "Noise.mp3" -filter_complex "[0:a][2:a]amix=inputs=2:duration=shortest,atempo=1.15; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=1280:720 [v1]; [v1][1:v]overlay=0:0,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast output.mp4[/SPOILER] Fullscreen Display, Merging Noise Audio, Adding Intro - Bypass YouTube Copyright [SPOILER="Spoiler"][SPOILER="Spoiler"]//Add Noise to the original video. // Add intro video ffmpeg -y -i input.mp4 -i "filter_HD.png" -i "Noise.mp3" -i "intro.mp4" -filter_complex "[0:a][2:a]amix=inputs=2:duration=shortest,atempo=1.15 [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=1280:720 [v1]; [v1][1:v]overlay=0:0,setdar=16/9 [vmain]; [3:v]scale=1280:720,setdar=16/9 [vintro]; [vintro][3:a][vmain][amain]concat=n=2:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast "output.mp4"[/SPOILER] Fullscreen Display, Pixel Filtering Effect - Bypass YouTube Copyright //Change MD5 Hash, clear ID3 Tag Metadata, Encode with MP4 //atempo=1.15 «« Increase/decrease the audio speed, currently increase by 115% //volume=1.6 «« Increase/decrease the audio volume //pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) «« Change audio effect to by pass Youtube copyright //setpts=PTS/1.15 «« Increase/decrease the video speed, currently increase by 115% //crop=iw/1.2:ih/1.2 «« Increase/decrease the video zoom, currently zoom with 120% //crop=width:height:x:y «« Crop video by width,height and location x,y //boxblur=1:2 «« Increase/decrease the blur, max value 9:9 //scale=1280:720 «« Resize video to HD 1280x720 //hflip «« Flip the input video horizontally. ex: hflip,scale=1280:720 //vflip «« Flip the input video vertically. ex: vflip,scale=1280:720 //-b:v 1400k «« Increase/decrease the video quality ffmpeg -y -i input.mp4 -i "filter_HD_Pixel1.png" -af "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1)" -filter_complex "[0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=1280:720 [v1]; [v1][1:v]overlay=0:0,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast "output.mp4" ffmpeg -y -i input.mp4 -i "filter_HD_Pixel3.png" -af "[0:a]volume=1.5" -filter_complex "[0:v]crop=501:314:0:0,boxblur=1:2,scale=1280:720 [v1]; [v1][1:v]overlay=0:0,setdar=16/9" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast "output_px3.mp4"[/SPOILER] Compact Display, Overlay on background video, Adding Intro and Outro - Bypass YouTube Copyright [SPOILER="Spoiler"]//Change MD5 Hash, clear ID3 Tag Metadata, Encode with MP4 //atempo=1.15 «« Increase/decrease the audio speed, currently increase by 115% //volume=1.6 «« Increase/decrease the audio volume //pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) «« Change audio effect to by pass Youtube copyright //setpts=PTS/1.15 «« Increase/decrease the video speed, currently increase by 115% //crop=iw/1.2:ih/1.2 «« Increase/decrease the video zoom, currently zoom with 120% //crop=width:height:x:y «« Crop video by width,height and location x,y //boxblur=1:2 «« Increase/decrease the blur, max value 9:9 //scale=640:360 «« Resize video to SD 640x360 //hflip «« Flip the input video horizontally. ex: hflip,scale=640:360 //vflip «« Flip the input video vertically. ex: vflip,scale=640:360 //-b:v 1400k «« Increase/decrease the video quality //background.mp4 «« background video //overlay=11:11 «« change the location x:y of input.mp4 video, it will overlay the background.mp4 //Use filter_HD.png ffmpeg -y -i "input.mp4" -i "background.mp4" -i "intro.mp4" -i "outro.mp4" -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=640:360 [v1]; [1:v][v1]overlay=shortest=1:x=11:y=11,setdar=16/9 [vmain]; [2:v]scale=1280:720,setdar=16/9 [vintro]; [3:v]scale=1280:720,setdar=16/9 [voutro]; [vintro][2:a][vmain][amain][voutro][3:a]concat=n=3:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast "output.mp4" //Use filter_HD.png //ffmpeg -y -i "input.mp4" -i "background.mp4" -i "filter_HD.png" -i "intro.mp4" -i "outro.mp4" -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=640:360 [v1]; [2:v]scale=640:360 [v2]; [v1][v2]overlay=0:0 [v3]; [1:v][v3]overlay=shortest=1:x=11:y=11,setdar=16/9 [vmain]; [3:v]scale=1280:720,setdar=16/9 [vintro]; [4:v]scale=1280:720,setdar=16/9 [voutro]; [vintro][3:a][vmain][amain][voutro][4:a]concat=n=3:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast "output.mp4"[/SPOILER] Compact Display, Overlay on this video, Adding Intro and Outro - Bypass YouTube Copyright [SPOILER="Spoiler"]//Change MD5 Hash, clear ID3 Tag Metadata, Encode with MP4 //atempo=1.15 «« Increase/decrease the audio speed, currently increase by 115% //volume=1.6 «« Increase/decrease the audio volume //pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) «« Change audio effect to by pass Youtube copyright //setpts=PTS/1.15 «« Increase/decrease the video speed, currently increase by 115% //crop=iw/1.2:ih/1.2 «« Increase/decrease the video zoom, currently zoom with 120% //crop=width:height:x:y «« Crop video by width,height and location x,y //boxblur=1:2 «« Increase/decrease the blur, max value 9:9 //scale=640:360 «« Resize video to SD 640x360 //hflip «« Flip the input video horizontally. ex: hflip,scale=640:360 //vflip «« Flip the input video vertically. ex: vflip,scale=640:360 //-b:v 1400k «« Increase/decrease the video quality //background.mp4 «« background video //overlay=11:11 «« change the location x:y of input.mp4 video, it will overlay the background.mp4 //Do not use filter_HD.png ffmpeg -y -i "input.mp4" -i "intro.mp4" -i "outro.mp4" -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=640:360 [v1]; [1:v]boxblur=9:9 [v2]; [v2][v1]overlay=shortest=1:x=11:y=11,setdar=16/9 [vmain]; [2:v]scale=1280:720,setdar=16/9 [vintro]; [3:v]scale=1280:720,setdar=16/9 [voutro]; [vintro][2:a][vmain][amain][voutro][3:a]concat=n=3:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast "output.mp4" //Use filter_HD.png //ffmpeg -y -i "{input}.*" -i "{input}.*" -i "filter_HD.png" -i "intro.mp4" -i "outro.mp4" -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,boxblur=1:2,scale=640:360 [v1]; [2:v]scale=640:360 [v2]; [v1][v2]overlay=0:0 [v3]; [1:v]boxblur=9:9 [v4]; [v4][v3]overlay=shortest=1:x=11:y=11,setdar=16/9 [vmain]; [3:v]scale=1280:720,setdar=16/9 [vintro]; [4:v]scale=1280:720,setdar=16/9 [voutro]; [vintro][3:a][vmain][amain][voutro][4:a]concat=n=3:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast "{output}.mp4"[/SPOILER] Fullscreen Display, Camera Movement Effect - Bypass YouTube Copyright [SPOILER="Spoiler"]//t*0.5 «« Increase by 0.5 to increase camera moving speed based on x axis //t*0.2 «« Increase by 0.5 to increase camera moving speed based on y axis ffmpeg -y -i "input.mp4" -filter_complex "[0:v]crop=in_w/1.5:in_h/1.5:(in_w-out_w)/1.5+((in_w-out_w)/1.5)*sin(t*0.5):(in_h-out_h)/1.5 +((in_h-out_h)/1.5)*sin(t*0.2),boxblur=1:1,scale=1280:720,setdar=16/9; [0:a]volume=7" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -preset superfast "output.mp4"[/SPOILER] Enjoy! I will update this topic with more FFmpeg Command Lines.
 

SisterHippo

Well-known member

VIP MEMBER
Reputation: 42%
Joined
Oct 21, 2018
Messages
268
Reaction score
68
Points
88
Excellent article!
 

Certhw

Well-known member

VIP MEMBER
Reputation: 32%
Joined
Apr 30, 2023
Messages
223
Reaction score
42
Points
56
What precisely did you do to bypass YouTube's restrictions?
 

Catis

Well-known member

VIP MEMBER
Reputation: 22%
Joined
May 25, 2019
Messages
146
Reaction score
23
Points
53
What precisely did you do to circumvent YouTube's restrictions?
Modify the sound effect, incorporate overlay layers, add a background, alter sound speed, reposition the video on the background... FFmpeg enables you to perform a wide range of tasks.
 

Catis

Well-known member

VIP MEMBER
Reputation: 22%
Joined
May 25, 2019
Messages
146
Reaction score
23
Points
53
Update with the latest command line:
Extract a 1-minute segment from an audio file, beginning at 2 minutes and 30 seconds, convert it to MP3, and apply audio fade-in and fade-out effects.


ffmpeg -i INPUT.mp4 -c:a libmp3lame -b:a 128k -ss 00:02:30 -to 00:03:30 -af 'afade=t=in:st=150:d=3,afade=t=out:st=207:d=3' OUTPUT.mp3


Trim the initial 5 minutes of a video.

ffmpeg -i input.avi -c copy -t 00:05:00 output.avi


Trim a 5-minute segment starting at 12:30 from a video.

ffmpeg -i input.avi -c copy -ss 00:12:30 -t 00:05:00 output.avi


Generate x264 MP4 videos optimized for online streaming. The x264 codec ensures a favorable compression ratio and high output quality. The provided options are well-suited for embedding and streaming videos online. Additionally, consider creating a webm version, as some browsers may not support the MP4 format (see below). Adjust the size and bitrates as needed.


ffmpeg -y -i in.suffix -filter:v scale=640:360,setsar=1/1 -pix_fmt yuv420p -c:v libx264 -preset:v slow -profile:v baseline -x264opts level=3.0:ref=1 -b:v 700k -r:v 25/1 -force_fps -movflags +faststart -c:a libfaac -b:a 80k -pass x out.mp4


Generate webm videos optimized for online streaming without audio. These are ideal for online playback. You may also require an mp4 version (refer to the above instructions). Adjust the bitrates and resolution accordingly.

NB: This example assumes the input has no sound.

ffmpeg -i bff-teaser-part-1-1000kbps-no-sound.mp4 -filter:v scale=640:360,setsar=1/1 -pix_fmt yuv420p -vpre libvpx-720p -b:v 800k -r:v 25/1 -force_fps -c:a none -pass 2 bff-teaser-part-1-1000kbps-no-sound.webm


Eliminate audio from webm videos.

ffmpeg -i bff-teaser-part-1-1000kbps-no-sound.mp4 -pix_fmt yuv420p -vpre libvpx-720p -b:v 800k -r:v 25/1 -force_fps -c:a none -pass 2 bff-teaser-part-1-1000kbps-no-sound.webm
 

TreasureCent

Well-known member

VIP MEMBER
Reputation: 32%
Joined
Oct 5, 2018
Messages
194
Reaction score
64
Points
65
Modify the sound effect, incorporate overlay layers, add a background, alter sound speed, reposition the video on the background... FFmpeg enables you to perform a wide range of tasks.
I tried.
 

TinnysDean

Well-known member

VIP MEMBER
Reputation: 32%
Joined
Feb 20, 2023
Messages
219
Reaction score
43
Points
59
Bookmarked, stored, and backed up.

#youneverknowwhenthiswillbeuseful
 
Top Bottom