top / index / prev / next / target / source

2025-05-03 diary: Zoom H4essential 録音データを YouTube および m4a 形式に変換する手順 (1トラック+2パス版)

いがぴょんの日記 日記形式でつづる いがぴょんコラム ウェブページです。

Zoom H4essential 録音データを YouTube および m4a 形式に変換する手順 (1トラック+2パス版)

Zoom H4essential の録音データを MacBook Air にコピー

Zoom H4essential を MacBook Air に接続して録音データをコピーします

フロート音源を CD 音源に変換

レベル測定 (1パス目)

ffmpeg -i 250503_130527_TrMic.WAV -af loudnorm=print_format=json -f null -

出力結果

{
  "input_i" : "-38.93",
  "input_tp" : "-10.71",
  "input_lra" : "23.70",
  "input_thresh" : "-51.49",
  "output_i" : "-24.13",
  "output_tp" : "-2.00",
  "output_lra" : "17.60",
  "output_thresh" : "-35.74",
  "normalization_type" : "dynamic",
  "target_offset" : "0.13"
}

loudnorm (2パス目)

録音された音源(32bit floatなど)を、標準的なCD音質(16bit/44.1kHz)に変換し、音量正規化も行います。

ffmpeg -i 250503_130527_TrMic.WAV \
-af loudnorm=I=-16:TP=-1.5:LRA=15:measured_I=-38.93:measured_TP=-10.71:measured_LRA=23.70:measured_thresh=-51.49:offset=0.13:linear=true:print_format=summary \
-ar 44100 -sample_fmt s16 -c:a pcm_s16le \
250503_130527_TrMic-loudnorm.wav

出力

[Parsed_loudnorm_0 @ 0x7fa539105e40] rate=1411.0kbits/s speed=19.8x    
Input Integrated:    -38.9 LUFS
Input True Peak:     -10.7 dBTP
Input LRA:            23.7 LU
Input Threshold:     -51.5 LUFS

Output Integrated:   -15.4 LUFS
Output True Peak:     -1.5 dBTP
Output LRA:           21.0 LU
Output Threshold:    -27.6 LUFS

Normalization Type:   Dynamic
Target Offset:        -0.6 LU
[out#0/wav @ 0x7fa539304dc0] video:0KiB audio:481482KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.000045%
size=  481483KiB time=00:46:35.00 bitrate=1411.2kbits/s speed=19.8x 

必要に応じて複数ファイルを連結

複数の wav ファイルを1つにまとめます。filelist.txt をシェル芸で作成すると少し幸せです。

printf "file '%s'\n" 250429_125454_TrMic-loudnorm.wav 250429_134129_TrMic-loudnorm.wav > filelist.txt
ffmpeg -f concat -safe 0 -i filelist.txt -c copy 250429_125454_TrMic-concat.wav

wav ファイルを指定時間で切り詰め

録音データを必要な範囲にトリミングします。

concatした場合

ffmpeg -ss 470  -t 4645 -i 250429_125454_TrMic-concat.wav -c copy 250429_TrMic-part1.wav

concatしていない場合

ffmpeg -ss 1970  -t 575 -i 250503_130527_TrMic-loudnorm.wav -c copy 250503_TrMic-part1.wav

YouTube 形式に変換

静止画と音声を組み合わせて、YouTube向け動画ファイルに変換します。

ffmpeg -loop 1 -framerate 2 -i Borodin.png -i 250503_TrMic-part1.wav -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p 250503_TrMic-part1.mkv

m4a ファイル形式に変換

取り回ししやすいファイルサイズにするため、m4a 形式に変換します。

ffmpeg -i 250503_TrMic-part1.wav -c:a aac -b:a 192k 250503_TrMic-part1.m4a

関連する日記

Last modified: $Date: 2025-05-03 $


この日記について