Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
librtmp url parsingHi, i'm totally new to rtmpdump/librtmp and rtmp also. And it seams that this is my first post so i want to greet everybody
I'm trying to build a program for dumping rtmp streamed videos. The url for such a stream is something like this: Code:
rtmp://cp125301.edgefcs.net/ondemand/mp4:zdf/12/06/120621_1808_hko_vh.mp4 Code:
./rtmpdump.linux -r rtmp://cp125301.edgefcs.net/ondemand/mp4:zdf/12/06/120621_1808_hko_vh.mp4 -V -o zdf2.mp4 Code:
DEBUG: Hostname : cp125301.edgefcs.net DEBUG: Port : 1935 DEBUG: Playpath : mp4:zdf/12/06/120621_1808_hko_vh.mp4 DEBUG: tcUrl : rtmp://cp125301.edgefcs.net:1935/ondemand DEBUG: app : ondemand but if i'm using librtmp its seams that the parser is doing some thing different here: Code:
#include "rtmp.h" #include <stdio.h> int main() { int retVal = 0; RTMP* r = RTMP_Alloc(); retVal = RTMP_SetupURL(r, "rtmp://cp125301.edgefcs.net/ondemand/mp4:zdf/12/06/120621_1808_hko_vh.mp4"); printf("\n\nhost: %s \nplaypath: %s \ntcUrl: %s \napp: %s\n\n", r->Link.hostname.av_val, r->Link.playpath.av_val,r->Link.tcUrl.av_val, r->Link.app.av_val); retVal = RTMP_Connect(r, NULL); printf("connect r: %i\n", retVal); return 0; } Code:
host: cp125301.edgefcs.net/ondemand/mp4:zdf/12/06/120621_1808_hko_vh.mp4 playpath: mp4:zdf/12/06/120621_1808_hko_vh.mp4 tcUrl: rtmp://cp125301.edgefcs.net/ondemand/mp4:zdf/12/06/120621_1808_hko_vh.mp4 app: ondemand/mp4:zdf/12/06/120621_1808_hko_vh.mp4 ERROR: WriteN, RTMP send error 104 (1 bytes) connect r: 0 ERROR: RTMP_Connect1, handshake failed. i was trying to correct this by manually set the values in the RTMP record by hand as they appear in rtmpdump.. but maybe i missed something Code:
//manual set hostname AVal hostname; hostname.av_val = "cp125301.edgefcs.net"; hostname.av_len = sizeof("cp125301.edgefcs.net"); r->Link.hostname = hostname; //manual set playpath AVal playpath; playpath.av_val = "mp4:zdf/12/06/120621_1808_hko_vh.mp4"; playpath.av_len = sizeof("mp4:zdf/12/06/120621_1808_hko_vh.mp4"); r->Link.playpath = playpath; // r->Link.playpath0 = playpath; // //manual tcUrl AVal tcUrl; tcUrl.av_val = "rtmp://cp125301.edgefcs.net:1935/ondemand"; tcUrl.av_len = sizeof("rtmp://cp125301.edgefcs.net:1935/ondemand"); r->Link.tcUrl = tcUrl; //manuel app AVal app; app.av_val = "ondemand"; app.av_len = sizeof("ondemand"); r->Link.app = app; Code:
ERROR: WriteN, RTMP send error 104 (1 bytes) ERROR: RTMP_Connect1, handshake failed. regards pythonner |
Tags: librtmp |
Thread Tools | |
Display Modes | |
|
|