Opened 9 years ago

Closed 9 years ago

#4312 closed defect (invalid)

media-video/ffmpeg-1.2.6-r1 - ffmpeg fails to dump vorbis metadata

Reported by: schorsch_76 Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Michael Niedermayer Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I try to recode a ogg vorbis file to a different audio rate. I want to keep the metadata. The plan is to dump the metadata to a file and then include it again in the second step.

The used file:
http://alternativlos.cdn.as250.net/alternativlos-30.ogg

Contained metadata:


Input #0, ogg, from 'alternativlos-30.ogg':

Duration: 02:55:17.21, start: 0.000000, bitrate: 75 kb/s

Stream #0:0: Audio: vorbis, 48000 Hz, stereo, fltp, 80 kb/s
Metadata:

ALBUM : Alternativlos
ARTIST : Frank+Fefe
COMMENT : Alternativlos 30 über SIGINT, Kryptographie und die NSA
GENRE : Speech
TITLE : Alternativlos, Folge 30
DATE : 2013
track : 30
METADATA_BLOCK_PICTURE: AAAAAwAAAAlpbWFnZS9wbmcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfp6JUE5HDQoaCgAAAA1JSERSAAACCQAAAesQAgAAAJr0RfgAACAASURBVHgB7L1tkJXVuaevMzFUjYiipIqXKulORdpMRJsGTx1NYndrxWRGGgStMRIjiK9TdYII8Xw6kW4931RazKkxaBTRiJ4pRegmM5nkQHeTlKYqvClOTcD87SZVNlSNCgpOlfHD+afXz1SWZ7u393r


Command i tried to dump the metadata:
ffmpeg -i alternativlos-30.ogg -f ffmetadata metadata.txt

Now the file "metadata.txt" should contain the metadata information. But it is nearly empty. Just a header cot printed


cat metadata.txt
;FFMETADATA1


When i try the same thing on a mp3 file. it works.

Reproducible: Always

Steps to Reproduce:

  1. Download file http://alternativlos.cdn.as250.net/alternativlos-30.ogg
  2. ffmpeg -i alternativlos-30.ogg -f ffmetadata metadata.txt
  3. cat metadata.txt

Actual Results:
metadata.txt file contains
;FFMETADATA1

Expected Results:
metadata.txt file contains

ALBUM : Alternativlos
ARTIST : Frank+Fefe
COMMENT : Alternativlos 30 über SIGINT, Kryptographie und die NSA
GENRE : Speech
TITLE : Alternativlos, Folge 30
DATE : 2013
track : 30
METADATA_BLOCK_PICTURE: AAAAAwAAAAlpbWFnZS9wbmcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfp6JUE5HDQoaCgAAAA1JSERSAAACCQAAAesQAgAAAJr0RfgAACAASURBVHgB7L1tkJXVuaevMzFUjYiipIqXKulORdpMRJsGTx1NYndrxWRGGgStMRIjiK9TdYII8Xw6kW4931RazKkxaBTRiJ4pRegmM5nkQHeTlKYqvClOTcD87SZVNlSNCgpOlfHD+afXz1SWZ7u393r

in the ffmetadata format.

Please see the gentoo bug tracker too.
https://bugs.gentoo.org/show_bug.cgi?id=537556

Change History (8)

comment:1 by Michael Niedermayer, 9 years ago

In ogg vorbis the metadata is in the vorbis stream while ffmetadata has no streams.
You can copy stream metadata to global by using "-map_metadata 0:s"

comment:2 by Michael Niedermayer, 9 years ago

Cc: Michael Niedermayer added

comment:3 by schorsch_76, 9 years ago

I tried to use your suggestion, but i could not get it working. The closest thing i got

ffmpeg -i alternativlos-30.ogg -map 0:0 -map 0:1 -c:a:0 vorbis -b:a:0 128k -ar 44100 -c:v png -strict -2 test.ogg
ffmpeg version 2.2.14 Copyright (c) 2000-2015 the FFmpeg developers

built on May 27 2015 20:44:59 with gcc 4.9.2 (Gentoo 4.9.2 p1.4, pie-0.6.2)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=amdfam10 -mcx16 -mpopcnt -pipe' --extra-cflags='-march=amdfam10 -mcx16 -mpopcnt -pipe' --extra-cxxflags='-march=amdfam10 -mcx16 -mpopcnt -pipe' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --disable-vaapi --enable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libaacplus --disable-libfaac --disable-libtheora --disable-libtwolame --disable-libwavpack --disable-libwebp --enable-libx264 --disable-libx265 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --enable-libvorbis --disable-libvpx --disable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-avx2 --cpu=amdfam10
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100

[ogg @ 0x656ea0] 2048 bytes of comment header remain
Input #0, ogg, from 'alternativlos-30.ogg':

Duration: 02:55:17.21, start: 0.000000, bitrate: 75 kb/s

Stream #0:0: Audio: vorbis, 48000 Hz, stereo, fltp, 80 kb/s
Metadata:

ALBUM : Alternativlos
ARTIST : Frank+Fefe
COMMENT : Alternativlos 30 über SIGINT, Kryptographie und die NSA
GENRE : Speech
TITLE : Alternativlos, Folge 30
DATE : 2013
track : 30

Stream #0:1: Video: png, rgb48be, 521x491, 90k tbr, 90k tbn, 90k tbc
Metadata:

comment : Cover (front)

File 'test.ogg' already exists. Overwrite ? [y/N] y
[ogg @ 0x659920] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[ogg @ 0x659920] Unsupported codec id in stream 1
Output #0, ogg, to 'test.ogg':

Metadata:

encoder : Lavf55.33.100
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp
Metadata:

ALBUM : Alternativlos
ARTIST : Frank+Fefe
DESCRIPTION : Alternativlos 30 über SIGINT, Kryptographie und die NSA
GENRE : Speech
TITLE : Alternativlos, Folge 30
DATE : 2013
TRACKNUMBER : 30
encoder : Lavf55.33.100

Stream #0:1: Video: png, rgb48be, 521x491, q=2-31, 200 kb/s, 90k tbn, 90k tbc
Metadata:

comment : Cover (front)

Stream mapping:

Stream #0:0 -> #0:0 (vorbis -> vorbis)
Stream #0:1 -> #0:1 (png -> png)

Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
Conversion failed!

comment:4 by James, 9 years ago

You're trying to transcode cover art (jpg/png/etc), which is currently not supported by the ogg muxer (Only theora video is). Notice the "[ogg @ 0x659920] Unsupported codec id in stream 1" error.
Also, you should use the libvorbis encoder instead of the native vorbis one. See https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio for tips.

Are you sure following command line doesn't work as intended?
ffmpeg -i alternativlos-30.ogg -map_metadata 0:s -f ffmetadata metadata.txt

comment:5 by schorsch_76, 9 years ago

Your provided command dumps the data to the metadata.txt file. Very nice! I just thought i should try it with conversion of the whole file.

in reply to:  5 comment:6 by Michael Niedermayer, 9 years ago

Replying to schorsch_76:

Your provided command dumps the data to the metadata.txt file. Very nice! I just thought i should try it with conversion of the whole file.

Does this resolve the ticket or does some issue remain ?

comment:7 by schorsch_76, 9 years ago

I guess this resolves this issue

comment:8 by Michael Niedermayer, 9 years ago

Resolution: invalid
Status: newclosed

ok, closing it then

Note: See TracTickets for help on using tickets.