ffmpeg produziert M4A, die iTunes nicht als Podcast streamen kann (iOS Podcasts-App kann)

703
Vitaly Zdanevich

iTunes kann ein solches M4A nur nach dem Herunterladen abspielen. Ich habe einen weiteren Podcast mit M4A gefunden und diese Episoden mit iTunes korrekt gestreamt.

Mein Befehl ist

ffmpeg -i input.ogg output.m4a

Ergebnis:

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 
0

1 Antwort auf die Frage

1
Vitaly Zdanevich

I need more carefully read documentation...

Quote from https://trac.ffmpeg.org/wiki/Encode/AAC#Progressivedownload:

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