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

Moritz Barsnick barsnick at gmx.net
Tue Sep 8 15:57:28 EEST 2020


On Mon, Sep 07, 2020 at 05:11:53 +0300, Ilja wrote:
> ffprobe -hide_banner -show_streams /Users/home/Music/iTunes/iTunes\ Media/Music/Black\ Sabbath/Born\ Again/01\ Trashed.aiff — the command

Please don't use "-hide_banner", especially if it's the only console
output you are showing.

>   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)

Okay, two "streams" there.

> Based on that info I tried execute the following reincarnations of the command to copy what ffprobe  interpreted as a video stream but unsuccessfully:
>
> ffmpeg -y  -i /Users/home/Music/iTunes/iTunes\ Media/Music/Black\ Sabbath/Born\ Again/01\ Trashed.aiff -i /Users/home/Pictures/iTunes\ cover\ art/born-again.png  -map 0:v -c:a pcm_s24be -c:v png _desposition:v attached_pic   /Users/home/Desktop/01\ Trashed.aiff

I would assume "-map 0:v" *only* tries to map image attachment, no
audio. What's the second file good for anyway, if you're taking the
image from the first one?

And "_desposition:v" should throw a warning or an error. It will be
interpreted as an output file, not an option. (Even if you replaced "_"
with "-", the option is still misspelt.

> ffmpeg -y  -i /Users/home/Music/iTunes/iTunes\ Media/Music/Black\ Sabbath/Born\ Again/01\ Trashed.aiff -i /Users/home/Pictures/iTunes\ cover\ art/born-again.png  -map 0:v:1 -c:a pcm_s24be -c:v:1 png _desposition:v:1 attached_pic   /Users/home/Desktop/01\ Trashed.aiff

Same here. And your stream indices are incorrect.

> ffmpeg -y  -i /Users/home/Music/iTunes/iTunes\ Media/Music/Black\ Sabbath/Born\ Again/01\ Trashed.aiff -map 0:v -map 0:a -vcodec: copy -c:a pcm_s24be   /Users/home/Desktop/01\ Trashed.aiff
> 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.

This is not useful. Show us the actual command you tried, and its
complete, uncut console output. Then we can correlate the input and
your options to your error messages, and point out where you are going
wrong.

> 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”

I would say metadata and video "stream" (attachment) do not relate, but
I may be wrong and Mediainfo may be weak with AIFF files - I don't
know.

> - 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?

Each and every format has it quirks on where that is stored, and ffmpeg
tries to implement that best it can.

> Is it a way to copy or embed an artwork or/and metadata to a new
> audio?

Generally, there should be. ffmpeg did have some limitations in the
past, and may still have some.

> The same situation with copying metadata under “Metadata” section. It
> returned errors too of which I don’t remember any now.

Well, then we can't interpret the errors. ;-)

> ffmpeg -y m:date m:lyrics-eng m:album m:iTunes_CDDB_TrackNumber m:artist m:track m:genre m:album_artist m:title m:iTunes_CDDB_1 -i /Users/home/Music/iTunes/iTunes\ Media/Music/Black\ Sabbath/Born\ Again/01\ Trashed.aiff -map 0:v -map 0:a -vcodec: copy -c:a pcm_s24be   /Users/home/Desktop/01\ Trashed.aiff

What?

Cheers,
Moritz


More information about the ffmpeg-user mailing list