[FFmpeg-user] Writing an MP3 file fails only when piping output

Parsha Pourkhomami parshap at gmail.com
Mon Aug 5 22:37:09 CEST 2013


While updating MP3 ID3 tags using the `-metadata` option, I have come
across some files that seem to break ffmpeg but only when writing out
to pipe:1. By break, I mean that when reading back the output file,
ffprobe reports an error, some players refuse to play it, and all the
original metadata (ID3 tags) seem to have been stripped.

If I write out to a file path, then it works fine! Here is a demonstration:

> ffmpeg -i test.mp3 -codec copy -f mp3 pipe:1 > piped.mp3
> ffprobe -show_format piped.mp3
[mp3 @ 0x9c4f0e0] Header missing
... more ffprobe output

> ffmpeg -i test.mp3 -codec copy -f mp3 saved.mp3
> ffprobe -show_format saved.mp3
... normal ffprobe output

I've tested multiple files and have found several failing examples
from different sources, so it does not seem to a one-off encoding
error. It also seems like if one MP3 file from a collection (e.g.,
album) fails then the rest from that group will fail too.

Here is an example of a failing file: https://s3.amazonaws.com/parshap/test.mp3


More information about the ffmpeg-user mailing list