![]()
sudo apt install ffmpeg
ffmpeg -i input.avi -vf scale="720:-1" output.avi
Shrink size
ffmpeg -i /media/stevee/489EB74C63B82B0E/ Iquitos.mp4 -vcodec libx264 -s hd720 -crf 25 -vf copy Dieta3Iquitos.mp4
Merge vids:
Let,s create the list first. Here is an example and let us call the list fileList.txt. In this example, both the files are in the home directory. each line starts with the keyword file and contains the path of the file within single quotes.
$ cat fileList.txt
file '/home/file1.mp4'
file '/home/file1.mp4'
Now, you can concatenate them.
ERROR : More than 1000 frames duplicatedsing the following FFmpeg command
ffmpeg -f concat -safe 0 -i fileList.txt -c copy mergedVideo.mp4
ffmpeg -i input.wav -vn -ar 44100 -ac 2 -b:a 192k output.mp3
FOR Truncated vids, no MOOV data at end
ffmpeg -i Desktop/FOLVids/day2postPedro2AppleRitual.mp4 -vcodec copy -acodec copy -movflags faststart Desktop/apple.mp4
ffplay /media/stevee/A08A-A20D/C26Edit1.mp4
Trim sections, cuts WANTED sections to new file, then merge all WANTED cuts using above Concat with List:
ffmpeg -i C26C.mp4 -ss 00:00 -to 01:01 -c:v libx264 -crf 25 P1Edit.mp4
ffprobe C23.mp4:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C23.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 00:02:31.10, start: 0.000000, bitrate: 5921 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5843 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
Metadata:
handler_name : SoundHandler
REMOVE AUDIO STREAM
ffmpeg -i Desktop/100VIDEO/HikeRape.MOV -c copy -an /media/stevee/36BC-884B/Movies/HikeRape.mov
ADD AUDIO AND CHANGE FORMAT (e.g. after mp3 has been normalised in Audacity)
ffmpeg -i Desktop/100VIDEO/XimenaHikeIkaro.MOV -i Desktop/100VIDEO/XimenaHikeIkaro.mp3 -map 0:v -map 1:a -c:v copy -shortest /media/stevee/36BC-884B/hikemp3.mp4