FFMPEG for Vlogging

Join intro, content and outro more reference aand this ffmpeg -i intro.mp4 -i content.mp4.mp4 -i outro.mp4 -filter_complex ^ "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] ^ concat=n=3:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" concatOutput.mp4 1. Video form one Audio file and one image https://superuser.com/questions/1041816/combine-one-image-one-audio-file-to-make-one-video-using-ffmpeg ffmpeg -y -i imag.jpg -i audio.mp3 -c:a copy result.mp4 2. Video from…

Creating video from all images in a folder

Simple concat Code concat.bat @echo OFF setlocal ENABLEDELAYEDEXPANSION rem 1366×768 set BG_W=1366 set BG_H=768 set SLIDE_DURATION=4 set IMG_TYPE=JPG set /a TOTAL_IMAGE_FILES=0 set PICS_FOLDER=PICS set VIDS_FOLDER=VIDS for %%f in (./%PICS_FOLDER%/*.%IMG_TYPE%) do ( set /a TOTAL_IMAGE_FILES=TOTAL_IMAGE_FILES+1 rem https://stackoverflow.com/a/2919699 rem echo TOTAL_IMAGE_FILES is !TOTAL_IMAGE_FILES! rem echo file name is %%f rem https://stackoverflow.com/a/45811503 set filename[!TOTAL_IMAGE_FILES!]=%%f set TEMP_FILENUM=!TOTAL_IMAGE_FILES! echo filename[!TOTAL_IMAGE_FILES!]…

FFMPEG : Concatenation

change format if required Often Adobe premiere exports in mpeg set sourceFile=yogaIntro set sourceFileFormat=mpeg set targetFile=%sourceFile%WithLogo ffmpeg -i %sourceFile%.%sourceFileFormat% %targetFile%.mp4 -y Perform concat ffmpeg -y -i "yogaIntroWithLogo.mp4" -i "yogaOutroSilent.mp4" -filter_complex "[0:v] [0:a] [1:v] [1:a]concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" -y concat.mp4

FFMPEG : Trimming Options

Suppose we want to trim from 59 seconds to 66 seconds if audio is to be retained. ffmpeg -i outros.mp4 -ss 59 -t 7 yogaOutro.mp4 if audio channel is to be used. ffmpeg -i outros.mp4 -ss 59 -t 7 -an yogaOutroNoAudio.mp4 With filter_complex if audio is to be retained. ffmpeg -i outros.mp4 -filter_complex "[0:v]trim=start=59:end=66,setpts=PTS-STARTPTS [vout];[0:a]atrim=59:66…

Creating a vlog with short videos

split files ffmpeg -i introVideoWithLogo.mp4 -y -filter_complex ^ "split=2[out1][out2]" -map "[out1]" -ss 0 -t 10.4 -map 0 output1.mp4 -map "[out2]" -ss 10.5 -t 7 -map 0 output2.mp4 scale file ffmpeg -i cure4UrinaryProblems.mp4 -vf "scale='min(640,iw)':min'(352,ih)':force_original_aspect_ratio=decrease,pad=640:352:-1:-1:color=pink" scaled.mp4 Crop files set OUTPUT_FILE=”vlogOpener.mp4″ set CROP_WIDTH=1366 set CROP_HEIGHT=768 set CROP_STARTX=277 set CROP_STARTY=156 set OUTPUT_FILE=”vlogOpener%CROP_WIDTH%x%CROP_HEIGHT%.mp4″ ffmpeg -i vlogOpener1920x1080.mp4 -filter:v “crop=%CROP_WIDTH%:%CROP_HEIGHT%:%CROP_STARTX%:%CROP_STARTy%” -c:v…

Some practical applications of ffmpeg

Creating a blank video source ffmpeg -f lavfi -i color=c=black:s=1366×768:r=25/1 -f lavfi -i anullsrc=cl=mono:r=48000 -c:v h264 -c:a pcm_s16be -t 3 out.mov -y -c:v copy video -c:a copy audio for mp4 remove ‘-c:a pcm_s16be’ Because of Error Could not find tag for codec pcm_s16be ffmpeg -f lavfi -i color=c=black:s=1366×768:r=25/1 -f lavfi -i anullsrc=cl=mono:r=48000 -c:v h264 -t…

Solving common Issues with ffmpeg

Solving common Issues with ffmpeg Painfully slow file operations on ogg and opus files issue Whatsapp recorded files is saved as .ogg When downloaded to windows, it slows windows explorer Solution is Open Cmd go to downloads folder (C:\Users\user\Downloads) convert it to mp3 via ffmpeg delete original ogg file eg: cd downloads ffmpeg -i What.ogg…

FFMPEG Tutorial basics

1.Installation Download link: https://github.com/BtbN/FFmpeg-Builds/releases as shown in https://ffmpeg.org/download.html#build-windows Make sure that environment variable PATH contains path of ffmpeg.exe 2. Add Subtitles ffmpeg -i file1.mp4 -vf subtitles=subtitles.srt videoWithSubtitles.mp4 subtitles.srt addSubtitle.bat file 3. Add Texts addTexts.bat 4. Add Image/Thumbnail addImage.bat 5. Text Scrolling 6. Video from Image 6.a. still image video 6.b. zooming image video “C:\Program Files…