Opened 4 years ago

#2815 new defect

rtmp stream plays badly

Reported by: cehoyos Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: rtmp h264 dts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

(Using the stream from ticket #2814, this one may be a duplicate of that ticket that I fail to completely understand and several h264 timestamp-related tickets.)
A user provided a stream that I cannot transcode with ffmpeg (the output file is always unplayable).
The following commands work at least sometimes and to some degree (the audio file always looks fine):

$ ffmpeg -i rtmp://123.30.108.77/live/THVL1/THVL1?udp=1 out.ac3
$ ffplay rtmp://123.30.108.77/live/THVL1/THVL1?udp=1
$ ffmpeg -i rtmp://123.30.108.77/live/THVL1/THVL1?udp=1 -vcodec copy -vbsf h264_mp4toannexb -acodec aac -strict -2 out.ts

Remuxing causes many "Non-monotonous DTS in output stream ... This may result in incorrect timestamps in the output file" messages, ffmpeg cannot transcode out.ts, mplayer mostly fails to play it but ffplay and vlc play it in-sync.
Trying to transcode the original rtmp stream never produces a playable output file:

$ time ffmpeg -i rtmp://123.30.108.77/live/THVL1/THVL1?udp=1 -qscale 2 out.avi
ffmpeg version N-54992-g63c0113 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 28 2013 11:33:00 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  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.103 /  3. 81.103
  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 'rtmp://123.30.108.77/live/THVL1/THVL1?udp=1':
  Metadata:
    author          :
    copyright       :
    description     :
    keywords        :
    rating          :
    title           :
    presetname      : Custom
    creationdate    : Mon May 06 07:59:58 2013
                    :
    videodevice     : Matrox Video Capture Device
    avclevel        : 21
    avcprofile      : 77
    videokeyframe_frequency: 5
    audiodevice     : Realtek HD Audio Input
    audiochannels   : 1
    audioinputvolume: 75
  Duration: N/A, start: 0.002000, bitrate: 305 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 352x282 [SAR 1:1 DAR 176:141], 256 kb/s, 12.50 tbr, 1k tbn, 50 tbc
    Stream #0:1: Audio: mp3, 22050 Hz, mono, s16p, 49 kb/s
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    author          :
    ICOP            :
    description     :
    keywords        :
    rating          :
    INAM            :
    presetname      : Custom
    creationdate    : Mon May 06 07:59:58 2013
                    :
    videodevice     : Matrox Video Capture Device
    avclevel        : 21
    avcprofile      : 77
    videokeyframe_frequency: 5
    audiodevice     : Realtek HD Audio Input
    audiochannels   : 1
    audioinputvolume: 75
    ISFT            : Lavf55.12.102
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 352x282 [SAR 1:1 DAR 176:141], q=2-31, 200 kb/s, 12.50 tbn, 12.50 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 22050 Hz, mono, fltp, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (mp3 -> ac3)
Press [q] to stop, [?] for help
[avi @ 0x371a5c0] Too large number of skipped frames 62120 > 60000=   1.2kbits/s dup=0 drop=1617
frame=   19 fps=0.3 q=2.0 Lsize=     769kB time=01:24:50.72 bitrate=   1.2kbits/s dup=0 drop=1619
video:419kB audio:739kB subtitle:0 global headers:0kB muxing overhead -33.579669%

real    1m6.563s
user    0m2.029s
sys     0m0.081s

Change History (0)

Note: See TracTickets for help on using tickets.