FFmpeg
FFmpeg
FFmpeg Explorer!
https://www.ffmpegbyexample.com/
resize
$ ffmpeg -i input.mp4 -c:v libx265 -vtag hvc1 -vf scale=1920:1080 -crf 20 -c:a copy output.mp4
cut video
Cutting the videos based on start and end time using ffmpeg - Stack Overflow
$ ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4
merge video and audio
How to merge audio and video file in ffmpeg - Super User
$ ffmpeg -i video.mp4 -i audio.wav -c copy output.mkv
concat multi videos
FFmpegでMP4を結合(concat)するワンライナー | Hori Blog
concat を使い分ける | ニコラボ
FFmpeg 修剪静音(silenceremove) | Alby's blog
$ -af silenceremove=start_periods=1:start_duration=0:start_threshold=-50dB:detection=peak,areverse,silenceremove=start_periods=1:start_duration=0:start_threshold=-50dB:detection=peak,areverse
concat audio
KevCaz's Website
code:bash
# convertion to pcm
for f in *.m4a
do
ffmpeg -i ${f%.*}.m4a -c:a pcm_s16le -ac 2 -ar 48000 -f s16le ${f%.*}.pcm
done
# concatenate files
cat blank.pcm part1.pcm blank.pcm part2c.pcm part2f.pcm blank.pcm part3.pcm blank.pcm part4.pcm blank.pcm > final.pcm
# back to .m4a
ffmpeg -f s16le -ac 2 -ar 48000 -i final.pcm -c:a aac -b:a 192K -ac 2 final.m4a