A conversão e a normalização do arquivo de áudio cria um arquivo inutilizável

2

Estou tentando usar o ffmpeg para converter e normalizar o áudio em um arquivo wav em uma máquina com Windows 7. Parece que posso fazer isso sem nenhum problema, mas sempre que tento fazer ambos recebo esse erro do Windows Media Player tentando reproduzi-lo: "O Windows Media Player não pode reproduzir o arquivo. O Player pode não suportar o tipo de arquivo ou talvez não suporte o codec que foi usado para compactar o arquivo. "

Agora, isso é estranho para mim, porque se eu simplesmente converter o arquivo ou se apenas normalizá-lo, não há problema em reproduzi-lo. Além disso, não parece importar em qual ordem eu faço as operações ou se eu as testar em uma linha; o resultado é sempre o mesmo.

Para referência quando estou convertendo o arquivo, estou usando ffmpeg -i infile.wav -c:a aac -b:a 64k outfile.m4a e, quando estou normalizando, estou usando ffmpeg -i infile -af "loudnorm" outfile .

Alguém se deparou com isso ou tem alguma idéia para soluções?

Atualizar com o log: Eu não tenho acesso aos arquivos em tamanho real que estou convertendo agora, mas abaixo está o log da chamada combinada em um arquivo de teste feito no mesmo equipamento.

ffmpeg started on 2017-06-12 at 10:11:32
Report written to "ffmpeg-20170612-101132.log"
Command line:
ffmpeg -i R_20170515-195003.wav -af loudnorm -report -c:a aac -b:a 64k outfile.m4a
ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'R_20170515-195003.wav'.
Reading option '-af' ... matched as option 'af' (set audio filters) with argument 'loudnorm'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'aac'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '64k'.
Reading option 'outfile.m4a' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url R_20170515-195003.wav.
Successfully parsed a group of options.
Opening an input file: R_20170515-195003.wav.
[file @ 03309820] Setting default whitelist 'file,crypto'
[wav @ 03309100] Format wav probed with size=2048 and score=99
[wav @ 03309100] Before avformat_find_stream_info() pos: 44 bytes read:65580 seeks:1 nb_streams:1
[wav @ 03309100] probing stream 0 pp:32
[wav @ 03309100] probing stream 0 pp:31
[wav @ 03309100] probing stream 0 pp:30
[wav @ 03309100] probing stream 0 pp:29
[wav @ 03309100] probing stream 0 pp:28
[wav @ 03309100] probing stream 0 pp:27
[wav @ 03309100] probing stream 0 pp:26
[wav @ 03309100] probing stream 0 pp:25
[wav @ 03309100] probing stream 0 pp:24
[wav @ 03309100] probing stream 0 pp:23
[wav @ 03309100] probing stream 0 pp:22
[wav @ 03309100] probing stream 0 pp:21
[wav @ 03309100] probing stream 0 pp:20
[wav @ 03309100] probing stream 0 pp:19
[wav @ 03309100] probing stream 0 pp:18
[wav @ 03309100] probing stream 0 pp:17
[wav @ 03309100] probing stream 0 pp:16
[wav @ 03309100] probing stream 0 pp:15
[wav @ 03309100] probing stream 0 pp:14
[wav @ 03309100] probing stream 0 pp:13
[wav @ 03309100] probing stream 0 pp:12
[wav @ 03309100] probing stream 0 pp:11
[wav @ 03309100] probing stream 0 pp:10
[wav @ 03309100] probing stream 0 pp:9
[wav @ 03309100] probing stream 0 pp:8
[wav @ 03309100] probing stream 0 pp:7
[wav @ 03309100] probing stream 0 pp:6
[wav @ 03309100] probing stream 0 pp:5
[wav @ 03309100] probing stream 0 pp:4
[wav @ 03309100] probing stream 0 pp:3
[wav @ 03309100] probing stream 0 pp:2
[wav @ 03309100] probing stream 0 pp:1
[wav @ 03309100] probed stream 0
[wav @ 03309100] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 03309100] All info found
[wav @ 03309100] After avformat_find_stream_info() pos: 204844 bytes read:294956 seeks:1 frames:50
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'R_20170515-195003.wav':
  Duration: 00:00:02.73, bitrate: 1536 kb/s
    Stream #0:0, 50, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: output url outfile.m4a.
Applying option af (set audio filters) with argument loudnorm.
Applying option c:a (codec name) with argument aac.
Applying option b:a (video bitrate (please use -b:v)) with argument 64k.
Successfully parsed a group of options.
Opening an output file: outfile.m4a.
[file @ 04b90d40] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
detected 4 logical cores
[graph_0_in_0_0 @ 04c14a80] Setting 'time_base' to value '1/48000'
[graph_0_in_0_0 @ 04c14a80] Setting 'sample_rate' to value '48000'
[graph_0_in_0_0 @ 04c14a80] Setting 'sample_fmt' to value 's16'
[graph_0_in_0_0 @ 04c14a80] Setting 'channel_layout' to value '0x3'
[graph_0_in_0_0 @ 04c14a80] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[format_out_0_0 @ 04c14b80] Setting 'sample_fmts' to value 'fltp'
[format_out_0_0 @ 04c14b80] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[Parsed_loudnorm_0 @ 04c14a00] auto-inserting filter 'auto_resampler_0' between the filter 'graph_0_in_0_0' and the filter 'Parsed_loudnorm_0'
[format_out_0_0 @ 04c14b80] auto-inserting filter 'auto_resampler_1' between the filter 'Parsed_loudnorm_0' and the filter 'format_out_0_0'
[AVFilterGraph @ 04b954e0] query_formats: 4 queried, 3 merged, 6 already done, 0 delayed
[auto_resampler_0 @ 04c14c00] [SWR @ 05d60060] Using fltp internally between filters
[auto_resampler_0 @ 04c14c00] ch:2 chl:stereo fmt:s16 r:48000Hz -> ch:2 chl:stereo fmt:dbl r:192000Hz
[auto_resampler_1 @ 04c14c80] [SWR @ 05d74580] Using dblp internally between filters
[auto_resampler_1 @ 04c14c80] ch:2 chl:stereo fmt:dbl r:192000Hz -> ch:2 chl:stereo fmt:fltp r:96000Hz
Output #0, ipod, to 'outfile.m4a':
  Metadata:
    encoder         : Lavf57.71.100
    Stream #0:0, 0, 1/96000: Audio: aac (LC) (mp4a / 0x6134706D), 96000 Hz, stereo, fltp, 64 kb/s
    Metadata:
      encoder         : Lavc57.89.100 aac
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[out_0_0 @ 04c14b00] EOF on sink link out_0_0:default.
No more output streams to write to, finishing.
size=       3kB time=00:00:02.73 bitrate=   9.8kbits/s speed=14.6x    
video:0kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 112.246193%
Input file #0 (R_20170515-195003.wav):
  Input stream #0:0 (audio): 128 packets read (524288 bytes); 128 frames decoded (131072 samples); 
  Total: 128 packets (524288 bytes) demuxed
Output file #0 (outfile.m4a):
  Output stream #0:0 (audio): 256 frames encoded (262144 samples); 257 packets muxed (1576 bytes); 
  Total: 257 packets (1576 bytes) muxed
128 frames successfully decoded, 0 decoding errors
[AVIOContext @ 04c6c960] Statistics: 30 seeks, 280 writeouts
[aac @ 04c6b800] Qavg: 65294.412
[AVIOContext @ 04b95c80] Statistics: 589868 bytes read, 1 seeks
    
por reddisht 12.06.2017 / 15:33

2 respostas

2

Para detectar corretamente os picos , loudnorm altera a taxa de amostragem do arquivo em o processo (por exemplo, de 48000 Hz a 96000 Hz). Eu acho que o WMP não consegue lidar com altas taxas de amostragem e, portanto, gera esse erro.

Você pode especificar a taxa de amostragem com o -ar -parameter - você precisa fazer isso por arquivo, sempre especificando a taxa de amostragem do arquivo de saída com -ar . (Normalmente, 44100 Hz para CD-rip e 48000 Hz para áudio relacionado a vídeo; o FFmpeg mostra a taxa de amostragem da entrada por padrão).

Por exemplo:

ffmpeg -i infile.wav -af "loudnorm" -ar 48000 -c:a aac -b:a
64k outfile.m4a
    
por 12.06.2017 / 16:06
1

for true peak limiting, this filter upsamples to 192 kHz. It is up to you to downsample to an appropriate sampling rate.

link

    
por 26.06.2017 / 22:21

Tags