[rtmpdump] Using rtmpsrv for CSPAN videos results in corrupt flv?
F G
fosco.grubb at gmail.com
Mon Dec 19 13:33:09 CET 2011
Before I start, Thank you for all the hard work that has gone into
rtmpdump. :-)
I believe I am having the same trouble as sgorwood, described in a message
posted in May 2011 (see bottom of email). When attempting to playback CSPAN
captures, I receive various errors in different video players, but fairly
consistent behavior. As an example, I have tried to capture the same stream
sgorwood mentions ( http://www.c-spanvideo.org/program/MobileTechn ),
although I experience the same issue with any other stream I attempt to
dump.
I am using rtmpsrv to capture video, using the following:
iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root
-j REDIRECT
/home/fosco/rtmpdump/rtmpsrv -V
iptables -t nat -D OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root
-j REDIRECT
The above command results in a large about of output being scrolled to the
terminal during the capture, I have included a short portion below:
RTMP Server v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL
Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!
rtmpdump -r "rtmp://video.c-spanarchives.org:1935/fastplay" -a "fastplay"
-f "LNX 11,1,102,55" -W "
http://www.c-spanvideo.org/videoLibrary/assets/swf/CSPANPlayer.swf?programid=252147&rand=902534212"
-p "http://www.c-spanvideo.org/program/MobileTechn" -y
"mp4:full/2011/05/19/20110519200000002_hd.mp4" -o 20110519200000002_hd.flv
Closing connection... done!
RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 899.00
INFO: length 3239042.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 44100.00
INFO: length 158852096.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: videoframerate 899.00
INFO: aacaot 2.00
INFO: avclevel 31.00
INFO: avcprofile 77.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 960.00
INFO: height 540.00
INFO: frameWidth 960.00
INFO: frameHeight 540.00
INFO: displayWidth 960.00
INFO: displayHeight 540.00
INFO: framerate 22.48
INFO: moovposition 289080973.00
INFO: duration 3602.94
226.928 kB / 2.89 sec (0.0%)
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 899.00
INFO: length 3239042.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 44100.00
INFO: length 158852096.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: videoframerate 899.00
INFO: aacaot 2.00
INFO: avclevel 31.00
INFO: avcprofile 77.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 960.00
INFO: height 540.00
INFO: frameWidth 960.00
INFO: frameHeight 540.00
INFO: displayWidth 960.00
INFO: displayHeight 540.00
INFO: framerate 22.48
INFO: moovposition 289080973.00
INFO: duration 3602.94
403.361 kB / 8.01 sec (0.2%)
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 899.00
INFO: length 3239042.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 44100.00
INFO: length 158852096.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: videoframerate 899.00
INFO: aacaot 2.00
INFO: avclevel 31.00
INFO: avcprofile 77.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 960.00
INFO: height 540.00
INFO: frameWidth 960.00
INFO: frameHeight 540.00
INFO: displayWidth 960.00
INFO: displayHeight 540.00
INFO: framerate 22.48
INFO: moovposition 289080973.00
INFO: duration 3602.94
1237.523 kB / 26.43 sec (0.7%)
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 899.00
INFO: length 3239042.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 44100.00
INFO: length 158852096.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: videoframerate 899.00
INFO: aacaot 2.00
INFO: avclevel 31.00
INFO: avcprofile 77.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 960.00
INFO: height 540.00
INFO: frameWidth 960.00
INFO: frameHeight 540.00
INFO: displayWidth 960.00
INFO: displayHeight 540.00
INFO: framerate 22.48
INFO: moovposition 289080973.00
INFO: duration 3602.94
1390.485 kB / 22.64 sec (0.6%)
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 899.00
INFO: length 3239042.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 44100.00
INFO: length 158852096.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: videoframerate 899.00
INFO: aacaot 2.00
INFO: avclevel 31.00
INFO: avcprofile 77.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 960.00
INFO: height 540.00
INFO: frameWidth 960.00
INFO: frameHeight 540.00
INFO: displayWidth 960.00
INFO: displayHeight 540.00
INFO: framerate 22.48
INFO: moovposition 289080973.00
INFO: duration 3602.94
2000.680 kB / 36.40 sec (1.0%)
...
During playback of the capture, the video jumps backwards a few seconds
upon hitting the mentioned errors, and continues playing from that point.
This happens over and over, causing the video to slowly progress forward,
after repeating sections multiple times.
in mplayer:
*fosco at grubb:~/cspan$ mplayer 20110519200000002_hd.flv *
MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.
Playing 20110519200000002_hd.flv.
libavformat file format detected.
*[flv @ 0x1f59880]Estimating duration from bitrate, this may be inaccurate*
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO: [H264] 960x540 0bpp 44.917 fps 0.0 kbps ( 0.0 kbyte/s)
Clip info:
audiochannels: 2
audiosamplerate: 44100
videoframerate: 899
aacaot: 2
avclevel: 31
avcprofile: 77
audiocodecid: mp4a
videocodecid: avc1
width: 960
height: 540
frameWidth: 960
frameHeight: 540
displayWidth: 960
displayHeight: 540
framerate: 22
moovposition: 289080973
duration: 3603
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: No such file or directory.
[VO_3DFX] Unable to open /dev/3dfx.
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object
file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 960x540 => 960x540 Planar YV12
*[h264 @ 0x7ffa62083020]number of reference frames exceeds max (probably
corrupt input), discarding one*
*[h264 @ 0x7ffa62083020]number of reference frames exceeds max (probably
corrupt input), discarding one*
*[h264 @ 0x7ffa62083020]reference picture missing during reorder*
*[h264 @ 0x7ffa62083020]Missing reference picture*
*[h264 @ 0x7ffa62083020]reference picture missing during reorder5 0 *
*[h264 @ 0x7ffa62083020]Missing reference picture*
*A: 27.6 V: 25.1 A-V: 2.464 ct: -0.289 0/ 0 4% 0% 0.6% 50 0 *
************************************************
**** Your system is too SLOW to play this! ****
************************************************
Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
- Try -ao sdl or use the OSS emulation of ALSA.
- Experiment with different values for -autosync, 30 is a good start.
- Slow video output
- Try a different -vo driver (-vo help for a list) or try -framedrop!
- Slow CPU
- Don't try to play a big DVD/DivX on a slow CPU! Try some of the
lavdopts,
e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- Broken file
- Try various combinations of -nobps -ni -forceidx -mc 0.
- Slow media (NFS/SMB mounts, DVD, VCD etc)
- Try -cache 8192.
- Are you using -cache to play a non-interleaved AVI file?
- Try -nocache.
Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.
A: 31.1 V: 31.1 A-V: -0.082 ct: -0.278 0/ 0 4% 0% 0.5% 110 0
MPlayer interrupted by signal 2 in module: key_events
A: 31.3 V: 31.1 A-V: 0.112 ct: -0.277 0/ 0 4% 0% 0.5% 110 0
Exiting... (Quit)
in vlc:
*fosco at grubb:~/cspan$ cvlc 20110519200000002_hd.flv *
VLC media player 1.1.4 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0xb67cb0] dummy interface: using the dummy interface module...
*[flv @ 0x239ca30]Estimating duration from bitrate, this may be inaccurate*
*[flv @ 0x7f1154016c80]Estimating duration from bitrate, this may be
inaccurate*
*[0x176e840] main input error: ES_OUT_SET_(GROUP_)PCR is called too late
(pts_delay increased to 300 ms)*
*number of reference frames exceeds max (probably corrupt input),
discarding one*
*number of reference frames exceeds max (probably corrupt input),
discarding one*
*number of reference frames exceeds max (probably corrupt input),
discarding one*
*number of reference frames exceeds max (probably corrupt input),
discarding one*
Referenced Email from May 2011:
[rtmpdump] Can't get rtmpdump to work with CSPAN*Steve Gorwood* sgorwood at
swbell.net <rtmpdump%40mplayerhq.hu?Subject=Re%3A%20%5Brtmpdump%5D%20Can%27t%20get%20rtmpdump%20to%20work%20with%20CSPAN&In-Reply-To=%3C201105252354.51303.sgorwood%40swbell.net%3E>
*Thu May 26 06:54:51 CEST 2011*
- Previous message: [rtmpdump] Trying to dump an rtmp
stream<http://lists.mplayerhq.hu/pipermail/rtmpdump/2011-May/001440.html>
- *Messages sorted by:* [ date
]<http://lists.mplayerhq.hu/pipermail/rtmpdump/2011-May/date.html#1441>
[ thread ]<http://lists.mplayerhq.hu/pipermail/rtmpdump/2011-May/thread.html#1441>
[ subject ]<http://lists.mplayerhq.hu/pipermail/rtmpdump/2011-May/subject.html#1441>
[ author ]<http://lists.mplayerhq.hu/pipermail/rtmpdump/2011-May/author.html#1441>
------------------------------
I am having trouble downloading CSPAN video using rtmpdump (version 2.3) on
kubuntu 11.4. For example, the url:
http://www.c-spanvideo.org/program/MobileTechn
When I try to use the parameters:
rtmpdump -r rtmp://video.c-spanarchives.org:1935/fastplay/../ -y
mp4:full/2011/05/19/20110519200000002_hd.mp4 -A 84 -B 3602 -W
http://www.c-spanarchives.org/flash/cspanPlayer.swf -o
MobileTechn_0.mp4
The dump begins correctly at 2.3%. It proceeds for a while, then drops back
and redownloads a portion of the earlier stream. It will do this repeatedly
as the dump proceeds so that the final file will contain many repeated segments.
I used rtmpsrv to get (hopefully) better parameters. Rtmpsrv gave me the
following command line:
rtmpdump -r "rtmp://video.c-spanarchives.org:1935/fastplay" -a "fastplay" -f
"LNX 10,3,181,14" -W
"http://www.c-spanvideo.org/videoLibrary/assets/swf/CSPANPlayer.swf?rand=1249707438"
-p
"http://www.c-spanvideo.org/program/MobileTechn" -y
"mp4:full/2011/05/19/20110519200000002_hd.mp4" -o 20110519200000002_hd.flv
This gave me the same behavior.
If I add the -V parameter, I observe that I get the following information at
the point of the problem:
7741.721 kB / 158.22 sec (4.3%)
DEBUG: HandleCtrl, received ctrl. type: 31, len: 6
DEBUG: HandleCtrl, Stream BufferEmpty 1
DEBUG: HandleCtrl, received ctrl. type: 1, len: 6
DEBUG: HandleCtrl, Stream EOF 1
DEBUG: RTMP_ClientPacket, received: invoke 208 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name: level, STRING: status>
DEBUG: Property: <Name: code, STRING:
NetStream.Pause.Notify>
DEBUG: Property: <Name: description, STRING: Pausing
full/2011/05/19/20110519200000002_hd.mp4.>
DEBUG: Property: <Name: details, STRING:
full/2011/05/19/20110519200000002_hd.mp4>
DEBUG: Property: <Name: clientid, NUMBER: 504348861.00>
DEBUG: (object end)
DEBUG: (object end)
I have found that if I use the --live parameter, the behavior improves,
although I get occasional video corruption.
Is there anything that I can do to fix this problem?
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20111219/0206cba6/attachment-0001.html>
More information about the rtmpdump
mailing list