ffmpeg 個人的メモ
音声ファイル詳細¶
$ sox --i audio.mp3
Input File : 'audio.mp3'
Channels : 2
Sample Rate : 22050
Precision : 16-bit
Duration : 00:02:30.31 = 3314291 samples ~ 11273.1 CDDA sectors
File Size : 1.20M
Bit Rate : 64.0k
Sample Encoding: MPEG audio (layer I, II or III)
再生速度を変える¶
2倍速¶
$ ffmpeg -i src.mp4 -vf setpts=PTS/2.0 -af atempo=2.0 dest.mp4
指定時間でカット¶
$ ffmpeg -i input.mp4 -t [duration] -c copy output.mp4
結合¶
How to merge audio and video file in ffmpeg - Super User ffmpeg join two mp4 files with ffmpeg on command line - Super User
Merge video and audio with ffmpeg. Loop the video while audio is not over - Stack Overflow
ノイズキャンセル¶
$ ffmpeg -i <input_file> -af "highpass=f=200, lowpass=f=3000" <output_file>