0
ffmpeg -ss 4.6 -i 1.opus -c copy 2.opus

Cuts the file as required but it also removes the album art. Same command works for mp3 files, the album art doesn't get removed for mp3.

Edit:

I see the problem is that "Stream #0:0: Audio" is getting copied but not "Stream #0:1: Video" (which contains the album art) from 1.opus.

No improvement with

ffmpeg -ss 4.6 -i 1.opus -map 0 -map -0:v:0 -c copy 2.opus

and

ffmpeg -ss 4.6 -i 1.opus -c copy -map 0 2.opus

gives error "Unsupported codec id in stream 1".

Edit2:

ffmpeg -ss 4.6 -i 1.opus -c:a libopus -b:a 128000 -c:v libtheora -q:v 10 -c copy 2.opus

Didn't copy album art either, despite ffmpeg -codecs showing that my ffmpeg does have theora and opus codecs.

I then ran all the commands without -c copy , that didn't work either.

gom
  • 213
  • 1
  • 2
  • 7
  • Possible solution at https://video.stackexchange.com/questions/26406/ffmpeg-copy-all-the-streams-including-cover-art-except-the-first-video-strea – Mokubai Apr 15 '22 at 06:21
  • @Mokubai Thanks but it didn't work for me, see my edit done after ur comment. – gom Apr 15 '22 at 07:20
  • I gave up and added the album art via GUI (foobar2000). – gom Apr 15 '22 at 09:08

0 Answers0