[FFmpeg-trac] #3175(avformat:open): audio (aac) silently on streamcopy from mpegts to flv

FFmpeg trac at avcodec.org
Mon Jun 9 00:40:14 CEST 2014


#3175: audio (aac) silently on streamcopy from mpegts to flv
------------------------------------+------------------------------------
             Reporter:  iluvatar    |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  aac flv     |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by malakudi):

 I've recently experienced this same issue. The real problem is that, when
 using codec copy with bitstream filter to write audio in flv, the flv
 header always reports that the audio is 44100 stereo. If the original
 source has these attributes, the resulting flv file is OK. If original
 source is different, like 22050 mono for example (as in the original
 poster example), the resulting file cannot be played back.

 So in the following example:
 ffprobe -i out.aac
 Input #0, aac, from 'out.aac':
   Duration: 00:00:21.61, bitrate: 94 kb/s
     Stream #0:0: Audio: aac, 48000 Hz, stereo, fltp, 94 kb/s

 ffmpeg -i out.aac -acodec copy -bsf:a aac_adtstoasc out.flv
 Input #0, aac, from 'out.aac':
   Duration: 00:00:21.61, bitrate: 94 kb/s
     Stream #0:0: Audio: aac, 48000 Hz, stereo, fltp, 94 kb/s
 Output #0, flv, to 'out.flv':
   Metadata:
     encoder         : Lavf55.33.100
     Stream #0:0: Audio: aac ([10][0][0][0] / 0x000A), 48000 Hz, stereo, 94
 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 size=     258kB time=00:00:20.58 bitrate= 102.7kbits/s
 video:0kB audio:248kB subtitle:0 data:0 global headers:0kB muxing overhead
 3.888596%

 ffprobe -i out.flv
 Input #0, flv, from 'out.flv':
   Metadata:
     encoder         : Lavf55.33.100
   Duration: 00:00:20.59, start: 0.000000, bitrate: 102 kb/s
     Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 94 kb/s

 you can see that the resulting file has attibutes 44100 Hz, stereo, which
 is wrong. Actually it always has 44100, stereo, no matter what the input
 is, when using aac_adtstoasc bitstream filter.

 However, if you transcode, flv has the correct header.
 So, the bug is that the flv header is not updated correctly with the
 attributes of the input stream when using bitstream filter aac_adtstoasc.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3175#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list