ffmpeg produz M4A que o iTunes não pode transmitir como um podcast (o aplicativo iOS Podcasts pode)

0

O iTunes só pode reproduzir esse M4A após o download. Eu encontrei outro podcast com M4A e o iTunes transmitiu esses episódios corretamente.

Meu comando é

ffmpeg -i input.ogg output.m4a

Resultado:

ffmpeg version 3.3.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.4.0 (Debian 6.4.0-4) 20170820
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  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
Input #0, ogg, from 'input.ogg':
  Duration: 00:00:04.12, start: 0.000000, bitrate: 40 kb/s
    Stream #0:0: Audio: vorbis, 22050 Hz, mono, fltp, 35 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (vorbis (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, ipod, to 'output.m4a':
  Metadata:
    encoder         : Lavf57.71.100
    Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 69 kb/s
    Metadata:
      encoder         : Lavc57.89.100 aac
size=      35kB time=00:00:04.13 bitrate=  69.5kbits/s speed=36.4x
video:0kB audio:34kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.260525%
[aac @ 0x56fc940] Qavg: 11478.364
    
por Vitaly Zdanevich 20.09.2017 / 09:45

1 resposta

1

Preciso de uma documentação mais atenta ...

Citação do link :

By default the MP4 muxer writes the 'moov' atom after the audio stream ('mdat' atom) at the end of the file. This results in the user requiring to download the file completely before playback can occur. Relocating this moov atom to the beginning of the file can facilitate playback before the file is completely downloaded by the client.

You can do this with the -movflags +faststart option:

ffmpeg -i input.wav -c:a libfdk_aac -movflags +faststart output.m4a You can also use this option on existing MP4/M4A files. Since the audio is simply being stream copied there is no re-encoding occurring, just re-muxing, so therefore there is no quality loss:

ffmpeg -i input.m4a -c:a copy -movflags +faststart output.m4a

    
por 20.09.2017 / 10:32