[FFmpeg-trac] #2805(undetermined:closed): Can not demux to elementary .h264
FFmpeg
trac at avcodec.org
Tue Jul 23 15:02:55 CEST 2013
#2805: Can not demux to elementary .h264
-------------------------------------+-------------------------------------
Reporter: mikhailov | Owner:
Type: defect | Status: closed
Priority: normal | Component:
Version: unspecified | undetermined
Keywords: | Resolution: invalid
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by mikhailov):
Replying to [comment:7 mikhailov]:
> Replying to [comment:6 cehoyos]:
> > Replying to [comment:5 mikhailov]:
> > > Replying to [comment:4 cehoyos]:
> > > Why is this ticket invalid?
> >
> > It contains a user question - "How do I extract raw H264 (Annex B)
streams from valid mp4 (and flv) files?" - and this is not the right place
for user questions. Please note that I tried very hard to answer the
question in comment:2, I additionally repeated the need for always testing
current git head - as explained on http://ffmpeg.org/bugreports.html - but
this has of course no relevance for this ticket but only for future ones.
Finally, I made a comment about encoding aac. I still consider this a very
complete answer and honestly cannot understand why you reopened the ticket
- especially without even commenting on my answer to your original
question or indicating that you tested the example commands.
>
> This ticket does contain only one question: why demux doesn't work as
described in documentation. The problem may relate to the another ticket
such #2085 that still unresolved. Yes, thanks for the advice to use git
HEAD, I did it, result was the same. AAC codec doesn't affect to this
problem as you said about it as "Unrelated".
Sorry, I just reread it again. Thank you so much, those line looks
interesting:
{{{
$ ffmpeg -i input.flv -vcodec copy -vbsf h264_mp4toannexb out1.h264
$ ffmpeg -i output_0.mp4 -vcodec copy -vbsf h264_mp4toannexb out2.h264
}}}
Are these resulted files (out1.h264, out2.h264) elementary raw streams or
still wrap into container? The 2 command produces the same file size, but
with different errors:
{{{
ffmpeg -i input.flv -vcodec copy -vbsf h264_mp4toannexb out1.h264
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 23 2013 13:12:04 with Apple LLVM version 4.2
(clang-425.0.28) (based on LLVM 3.2svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-
cflags= --host-ldflags= --enable-libfaac --enable-libvo-aacenc --enable-
libspeex
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 81.102 / 3. 81.102
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Input #0, flv, from 'input.flv':
Metadata:
creationdate : Mon Oct 22 21:17:12
duration2 : 7497
Duration: 00:00:07.78, start: 0.000000, bitrate: 280 kb/s
Stream #0:0: Video: h264 (Baseline), yuv420p, 640x480 [SAR 1:1 DAR
4:3], 20 tbr, 1k tbn, 40 tbc
Stream #0:1: Audio: speex, 16000 Hz, mono, s16
Output #0, h264, to 'out1.h264':
Metadata:
creationdate : Mon Oct 22 21:17:12
duration2 : 7497
encoder : Lavf55.12.102
Stream #0:0: Video: h264, yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31,
90k tbn, 20 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec
copy: Invalid argument
[h264 @ 0x7fe71a830200] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 186390 >= 186390
[h264 @ 0x7fe71a830200] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 289890 >= 289890
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec
copy: Invalid argument
[h264 @ 0x7fe71a830200] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 368370 >= 368370
[h264 @ 0x7fe71a830200] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 373860 >= 373860
[h264 @ 0x7fe71a830200] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 419670 >= 419670
Last message repeated 1 times
[h264 @ 0x7fe71a830200] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 445500 >= 445500
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec
copy: Invalid argument
[h264 @ 0x7fe71a830200] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 548280 >= 548280
frame= 155 fps=0.0 q=-1.0 Lsize= 236kB time=00:00:07.75 bitrate=
249.6kbits/s
video:237kB audio:0kB subtitle:0 global headers:0kB muxing overhead
-0.113938%
ffmpeg -i output_0.mp4 -vcodec copy -vbsf h264_mp4toannexb out2.h264
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 23 2013 13:12:04 with Apple LLVM version 4.2
(clang-425.0.28) (based on LLVM 3.2svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-
cflags= --host-ldflags= --enable-libfaac --enable-libvo-aacenc --enable-
libspeex
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 81.102 / 3. 81.102
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output_0.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.12.102
Duration: 00:00:07.93, start: 0.100000, bitrate: 345 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p,
640x480 [SAR 1:1 DAR 4:3], 251 kb/s, 20.12 fps, 20 tbr, 16k tbn, 40 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 16000 Hz, mono,
fltp, 96 kb/s
Metadata:
handler_name : SoundHandler
Output #0, h264, to 'out2.h264':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.12.102
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 640x480
[SAR 1:1 DAR 4:3], q=2-31, 251 kb/s, 20.12 fps, 90k tbn, 20 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec
copy: Invalid argument
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec
copy: Invalid argument
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec
copy: Invalid argument
frame= 155 fps=0.0 q=-1.0 Lsize= 236kB time=00:00:07.85 bitrate=
246.5kbits/s
video:237kB audio:0kB subtitle:0 global headers:0kB muxing overhead
-0.113938%
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2805#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list