[FFmpeg-user] I can't copy or embed a picture to an output audio (A-A conversion)

Edward Park kumowoon1025 at gmail.com
Tue Sep 8 21:18:59 EEST 2020


Hi,

> ffprobe -hide_banner -show_streams /Users/home/Music/iTunes/iTunes\ Media/Music/Black\ Sabbath/Born\ Again/01\ Trashed.aiff — the command
> 
> ##Result:
> 
> Input #0, aiff, from '/Users/home/Music/iTunes/iTunes Media/Music/Black Sabbath/Born Again/01 Trashed.aiff':
...
>  Duration: 00:04:19.00, start: 0.000000, bitrate: 12309 kb/s
>    Stream #0:0: Audio: pcm_f32be (fl32 / 0x32336C66), 192000 Hz, 2 channels, flt, 12288 kb/s
>    Stream #0:1: Video: png, rgb24(pc), 732x745, 90k tbr, 90k tbn, 90k tbc (attached pic)
...
> [STREAM]
> index=0
> codec_name=pcm_f32be
> codec_long_name=PCM 32-bit floating point big-endian
> profile=unknown
> codec_type=audio
...
> [/STREAM]
> [STREAM]
> index=1
> codec_name=png
> codec_long_name=PNG (Portable Network Graphics) image
> profile=unknown
> codec_type=video
...
> [/STREAM]
> 
> 
> Based on that info I tried execute the following reincarnations of the command to copy what ffprobe  interpreted as a video stream but unsuccessfully:
...
> The commands either fail, show warnings such as “the video stream doesn’t exist” when I’m trying to map it, or transcode only the audio stream when I use -vcodec:copy or -c:v copy. Running ffprobe on newly created file shows the single audio stream as well.

Yes, it's rather misleading isn't it. Based on what the ff* tools tell you,  what you tried (or at least one of them) should definitely have worked. The problem is that the output from the commands you used to determine your plan is not really an accurate description.

> A stunning revelation awaited me when I passed the input through MediaInfo application. It showed only the audio-stream and no metadata reported by ffprobe hence the “no videostream exists” - or smth to the effect of that - message I mentioned above. What’s going on and where did ffprobe retrieve the metadata and cover information from? Is it a way to copy or embed an artwork or/and metadata to a new audio?

The output from mediainfo gives some indication that something is different; unusual; the video "stream" reported by ffprobe isn't really another stream. And when you think about it, it makes sense. It's an aiff format file, how is it going to have a video stream?? I don't even think it can have multiple streams of any kind (at least the "simple" kind, not the ones that are saved by drum machines and sequencers and whatnot. Think those get a different extension anyhow).

The answer is that the metadata and cover image are in an id3 tag. Use -write_id3v2 true with the aiff muxer to force it to write one. It's disabled by default for good reason though, chances are other applications than iTunes (and now its various spawns) won't expect, or look for one.

Regards,
Ted Park



More information about the ffmpeg-user mailing list