PDA

View Full Version : Problem getting CityTv streams to download with rtmpdump


jedix
10-10-2011, 01:24 PM
When I download the videos with the following command, the videos won't play in ffmpeg or any player I've tried:


rtmpdump -r "rtmpe://cp80642.edgefcs.net/ondemand/?ovpfv=2.1.4" -y "mp4:citytv/1632712407/1632712407_1206922320001_citytv-fringe-s4-e03-copy.mp4" -W "hXXp://admin.brightcove.com/viewer/us20110929.2031/connection/ExternalConnection_2.swf" -o ep3.mp4


Here is the error I get when trying to use an XBMC plugin to stream the content:


15:18:54 T:140727866607360 INFO: (object end)
15:18:54 T:140727866607360 INFO: Previous line repeats 5 times.
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x29
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x28
15:18:54 T:140727866607360 INFO: Previous line repeats 1 times.
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x29
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x28
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x29
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x28
15:18:54 T:140727866607360 INFO: Previous line repeats 1 times.
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x29
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, unknown packet type received: 0x28
15:18:54 T:140727866607360 INFO: RTMP_ClientPacket, received: invoke 40995 bytes



Here's what mplayer/vlc/ffmpeg reports:



$ ffmpeg -i ep1.mp4 -y -f mjpeg -ss 10.00 -vframes l -an test.jpgffmpeg version 0.8.5, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 9 2011 14:49:12 with gcc 4.5.2
configuration:
libavutil 51. 9. 1 / 51. 9. 1
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 4. 0 / 53. 4. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 23. 0 / 2. 23. 0
libswscale 2. 0. 0 / 2. 0. 0
[flv @ 0x1de4440] Could not find codec parameters (Video: h264)
[flv @ 0x1de4440] Could not find codec parameters (Audio: aac, 44100 Hz, 2 channels)
[flv @ 0x1de4440] Estimating duration from bitrate, this may be inaccurate
ep1.mp4: could not find codec parameters



Any help would be very much appreciated.

Thanks!

jedix
10-11-2011, 05:33 PM
I've managed to verify that it is indeed a bad RTMPdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) and not a bug in ffmpeg by using windows media player and flashplayer in windows. Does anyone know how the stream could be encrypted or something?

jedix
10-11-2011, 05:56 PM
I'm assuming it's some sort of encryption and these details need to be used to make the stream usable.. but I don't know how with the --conn or -C option.


19:34:39 T:139870337156864 ERROR: DEBUG:root:SWFURL: isSlim=true&wmode=opaque&debuggerID=&optimizedContentLoad=true&bgcolor=%23000000&playerID=911449494001&flashID=myExperience45047864001&height=480&width=640&autoStart=&publisherID=1632712407&%40videoPlayer=1192789504001
19:34:39 T:139870337156864 NOTICE: .
19:34:39 T:139870337156864 NOTICE: {'app': u'ondemand/', 'scheme': u'rtmpe', 'querystring': None, 'playpath': u'mp4:citytv/1632712407/1632712407_1192774924001_citytv-fringe-s4-e02-copy.mp4', 'netloc': u'cp80642.edgefcs.net'}
19:34:39 T:139870337156864 ERROR: DEBUG:root:STREAM_URL: rtmpe://cp80642.edgefcs.net/ondemand/?ovpfv=2.1.4 playpath=mp4:citytv/1632712407/1632712407_1192774924001_citytv-fringe-s4-e02-copy.mp4 swfurl=hXXp://admin.brightcove.com/viewer/us20110929.2031/connection/ExternalConnection_2.swf swfvfy=true
19:34:39 T:139870337156864 NOTICE: .
19:34:39 T:139870817015776 DEBUG: WaitOnScriptResult- plugin returned successfully
19:34:39 T:139870337156864 INFO: Scriptresult: Success
19:34:39 T:139870337156864 INFO: Python script stopped
19:34:39 T:139870337156864 DEBUG: Thread XBPyThread 139870337156864 terminating
19:34:39 T:139870817015776 DEBUG: CPlayerCoreFactory::GetPlayers(rtmpe://cp80642.edgefcs.net/ondemand/?ovpfv=2.1.4 playpath=mp4:citytv/1632712407/1632712407_1192774924001_citytv-fringe-s4-e02-copy.mp4 swfurl=hXXp://admin.brightcove.com/viewer/us20110929.2031/connection/ExternalConnection_2.swf swfvfy=true)

jedix
10-11-2011, 06:13 PM
Here's the output of the command.. Why do I get the client sent 6, server answered 9 issue if I have RTMPdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) version 2.4?


$ rtmpdump -r "rtmpe://cp80642.edgefcs.net/ondemand/?ovpfv=2.1.4" -y "mp4:citytv/1632712407/1632712407_1206922320001_citytv-fringe-s4-e03-copy.mp4" -W "hXXp://admin.brightcove.com/viewer/us20110929.2031/connection/ExternalConnection_2.swf" -o test.mp4
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: duration 2617.26
INFO: moovPosition 40.00
INFO: width 832.00
INFO: height 468.00
INFO: videocodecid encv
INFO: audiocodecid enca
INFO: avcprofile 77.00
INFO: avclevel 31.00
INFO: aacaot 2.00
INFO: videoframerate 29.97
INFO: audiosamplerate 44100.00
INFO: audiochannels 2.00
INFO: trackinfo:
INFO: length 78517439.00
INFO: timescale 30000.00
INFO: sampledescription:
INFO: sampletype encv
INFO: length 115421184.00
INFO: timescale 44100.00
INFO: sampledescription:
INFO: sampletype enca
248.705 kB / 2.30 sec (0.0%)

KSV
10-11-2011, 11:16 PM
They are using FlashAccess DRM to protect their videos. AFAIK currently there is no method available to strip the DRM except screen capturing (http://all-streaming-media.com/record-video-from-screen/).

Adobe FlashAccess docs:
http://docs.google.com/viewer?url=http://help.adobe.com/en_US/flashaccess/2.0/overview.pdf&chrome=true

Encryption Object in video stream:
DEBUG: (object begin)
DEBUG: Property: <Name: Encryption, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: Version, NUMBER: 2.00>
DEBUG: Property: <Name: Method, STRING: Standard>
DEBUG: Property: <Name: Flags, NUMBER: 0.00>
DEBUG: Property: <Name: Params, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: Version, NUMBER: 1.00>
DEBUG: Property: <Name: EncryptionAlgorith, STRING: AES-CBC>
DEBUG: Property: <Name: EncryptionParams, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: keyLengh, NUMBER: 16.00>
DEBUG: (object end)
DEBUG: Property: <Name: KeyInfo, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: subType, STRING: FlashAccessv2>
DEBUG: Property: <Name: FMRMS_METADATA, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: Metadata, STRING: MIIWuwYJKoZIhvcNAQcCoIIWrDCCFqgCAQExCzAJBgUrDgMCGg UAMIILQAYJKoZIhvcNAQcBoIILMQSCCy0wggspAgECMIIEUDCC BEwCAQECAQEEJDJDNTg0M0I3LTFCNEYtM0FCQy1CODZCLTNGMD lFQzlCQTRGMwSCA7hQRDk0Yld3Z2RtVnljMmx2YmowaU1TNHdJ aUJsYm1OdlpHbHVaejBpVlZSR0xUZ2lJSE4wWVc1a1lXeH>
DEBUG: Property: <Name: License, STRING: >
DEBUG: (object end)