[FFmpeg-trac] #2085(FFmpeg:new): MP4 remux with playback stuck at 2nd seconds
FFmpeg
trac at avcodec.org
Sun Dec 30 21:40:16 CET 2012
#2085: MP4 remux with playback stuck at 2nd seconds
-----------------------------------+----------------------------------
Reporter: mikhailov | Type: defect
Status: new | Priority: normal
Component: FFmpeg | Version: 1.0.1
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-----------------------------------+----------------------------------
Summary of the bug:
We use FLV captured stream from webcam (using application build for Flash
Player), h264 comes direct from the flash, but audio stream '''Speex'''
should be encoded to '''AAC''' to make the streams compatible with mobile
devices '''h264 (Baseline) + AAC'''.
Video stream should not be encoded again, so we use the copy method, like
the following:
{{{
ffmpeg -i input.flv -c:v copy -c:a libvo_aacenc output.mp4
}}}
The resulted '''MP4''' video files plays back well on Flash Player 11.4+
and iPhone/iPad with iOS 5+ (Baseline compatible video stream). but on
Android devices and Flash Player 11.1/11.2 the playback freezes at 2-3
seconds. We also use qt-faststart, but it doesn't affect on stuck problem.
Stdout of ffmpeg encoding script:
{{{
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 17 2012 23:45:34 with Apple clang version 4.1
(tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/1.0 --enable-shared
--enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables
--cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac
--enable-libvo-aacenc --enable-libspeex
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[libspeex @ 0x7fabb902ea00] Missing Speex header, assuming defaults.
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, flv, from '1.flv':
Metadata:
creationdate : Thu Nov 22 09:46:36
duration2 : 29964
Duration: 00:00:30.25, start: 0.000000, bitrate: 212 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
File '1.mp4' already exists. Overwrite ? [y/N] y
Missing Speex header, assuming defaults.
Output #0, mp4, to '1.mp4':
Metadata:
creationdate : Thu Nov 22 09:46:36
duration2 : 29964
encoder : Lavf54.29.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x480
[SAR 1:1 DAR 4:3], q=2-31, 1k tbn, 1k tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 16000 Hz, mono, s16,
96 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (libspeex -> libvo_aacenc)
Press [q] to stop, [?] for help
[mp4 @ 0x7fabb9012800] st:0 PTS: 2139 DTS: 2139 < 2140 invalid, clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 2722 DTS: 2722 < 2723 invalid, clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 5440 DTS: 5440 < 5441 invalid, clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 8105 DTS: 8105 < 8106 invalid, clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 10772 DTS: 10772 < 10773 invalid,
clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 13456 DTS: 13456 < 13457 invalid,
clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 16127 DTS: 16127 < 16128 invalid,
clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 18835 DTS: 18835 < 18836 invalid,
clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 21675 DTS: 21675 < 21676 invalid,
clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 24476 DTS: 24476 < 24477 invalid,
clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 27283 DTS: 27283 < 27284 invalid,
clipping
[mp4 @ 0x7fabb9012800] st:0 PTS: 30079 DTS: 30079 < 30080 invalid,
clipping
frame= 454 fps=0.0 q=-1.0 Lsize= 978kB time=00:00:30.31 bitrate=
264.4kbits/s
video:620kB audio:346kB subtitle:0 global headers:0kB muxing overhead
1.170369%
}}}
I tried different versions of ffmpeg (0.10, 0.11, 1.0, 1.01) compiled with
mandatory '''--with-libvo-aacenc --with-speex''', but the problem still
not resolved.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2085>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list