[FFmpeg-trac] #1953(avformat:new): Conflict with tags when copying streams from WAV files

FFmpeg trac at avcodec.org
Fri Nov 23 09:38:47 CET 2012


#1953: Conflict with tags when copying streams from WAV files
--------------------------------------+----------------------------------
               Reporter:  jamal       |                  Owner:
                   Type:  defect      |                 Status:  new
               Priority:  normal      |              Component:  avformat
                Version:  git-master  |               Keywords:  wav
             Blocked By:              |               Blocking:
Reproduced by developer:  0           |  Analyzed by developer:  0
--------------------------------------+----------------------------------
 Muxers containing AVCodecTag entries with tag value 0 (aside from
 codec_id_none) and/or 1 will apparently fail to copy a stream from a wav
 file with different results depending on the presence of each of those
 values.

 How to reproduce:

 Get any pcm_u8 wav sample:
 {{{
 % ffmpeg -i pcmu8.wav -c:a copy pcmu8.voc
 }}}
 The output will show something like this:

 {{{
 $ ./ffmpeg -i asd.wav -c:a copy ads.voc
 ffmpeg version N-47005-g3616afc Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Nov 22 2012 22:43:13 with gcc 4.7.2 (GCC)
   configuration: --enable-gpl --enable-memory-poisoning --enable-cross-
 compile --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32
 --arch=x86_64 --prefix=/mingw64
   libavutil      52.  8.100 / 52.  8.100
   libavcodec     54. 76.100 / 54. 76.100
   libavformat    54. 37.100 / 54. 37.100
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 23.102 /  3. 23.102
   libswscale      2.  1.102 /  2.  1.102
   libswresample   0. 17.101 /  0. 17.101
   libpostproc    52.  2.100 / 52.  2.100
 [wav @ 000000000025DBA0] max_analyze_duration 5000000 reached at 5015510
 Guessed Channel Layout for  Input Stream #0.0 : stereo
 Input #0, wav, from 'asd.wav':
   Metadata:
     encoder         : Lavf54.37.100
   Duration: 00:00:22.80, bitrate: 705 kb/s
     Stream #0:0: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 44100 Hz, stereo,
 u8, 705 kb/s
 File 'ads.voc' already exists. Overwrite ? [y/N] y
 Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65541'
 ([0][0][0][0])
 Output #0, voc, to 'ads.voc':
   Metadata:
     encoder         : Lavf54.37.100
     Stream #0:0: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 44100 Hz, stereo,
 705 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Could not write header for output file #0 (incorrect codec parameters ?):
 Invalid data found when processing input
 }}}
 The AVCodecTag list from the voc muxer contains tag entry 0 for PCM_U8, so
 it should work.

 In short, if a muxer's AVCodecTag list contains both tag entries 0 and 1,
 or a tag entry 0 but no tag entry 1, or vice-versa, different codecs will
 fail to copy with this same error and others will succeed (Or rather, the
 write_header code from the muxer will be executed as it should).

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1953>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list