Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Re-broadcasting streaming media (http://stream-recorder.com/forum/forumdisplay.php?f=38)
-   -  

Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg

(http://stream-recorder.com/forum/showthread.php?t=9639)

dude007 07-24-2011 02:01 PM

Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg


 
Hi,

I am trying restream a stream of my own to a lower quality.

the Code i'm using is

Quote:

C:\rtmpdump-2.3>rtmpdump --live -r "rtmp://1.2.3.4/live/feed1" -p "http://website.net" -W "http://xyz.net/mediaplayer.swf" -q | ffmpeg -i - -re -isync -acodec libfaac -ab 128000 -ar 32000 -vcodec libx264 -b 600k -f flv "rtmp://5.6.7.8/live/feed1relay"
The error message is
Code:

ffmpeg version N-31100-g9251942, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 30 2011 21:17:59 with gcc 4.5.3
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec  53.  7. 0 / 53.  7. 0
  libavformat  53.  4. 0 / 53.  4. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter  2. 24. 0 /  2. 24. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
pipe:: Invalid data found when processing input

Can i get some help with it?

If i use the above code to save it to a file, it works.

But i cannot seem to restream it.

Can I please get some assistance with this.

Thank you in advance!

hyc 07-27-2011 08:55 PM

Re: Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg


 
Your ffmpeg binary was built with --enable-librtmp, therefore you should be doing all of this in ffmpeg, and not using rtmpdump at all.

Code:

ffmpeg -i "rtmp://1.2.3.4/live/feed1 pageUrl=http://website.net swfurl=http://xyz.net/mediaplayer.swf live=1" -re -isync  -vcodec libx264 -b 600k -acodec libfaac -ab 128000 -ar 32000 -f flv "rtmp://5.6.7.8/live/feed1relay"

dude007 07-28-2011 01:27 PM

Re: Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg


 
Hi,

Thanks for the reply.

I've gotten past the first bit now.

I am unable to stream to any of my servers with this, it says

"rtmp server sent error"
"rtmp server requested error"

rtmp://xx/xx/xx - Operation not permitted

before that It detects the live stream running all the hardware streaming etc..

Any help?

hyc 07-28-2011 05:53 PM

Re: Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg


 
Try adding "-loglevel debug" to the command, and give us the output. Most likely your output servers require authentication before you can send them a stream.

dude007 07-29-2011 08:09 AM

Re: Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg


 
Thank you.

Got it working.

Much appreciated hyc!

hyc 07-29-2011 11:52 AM

Re: Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg


 
So what was the actual problem? You should always let everyone else know the solution, after you've made everyone read through your problem.

dude007 07-29-2011 03:20 PM

Re: Restreaming (Relaying) a FMS stream to another FMS using rtmpdump and/or ffmpeg


 
Oh sorry, i thought I did post the sol.

Just had to disable all the html/swf protections.

RTMPdump has been unable to fake the pageURL so far...
It oddly works with disabled protection.

Now i'll be working on how to secure the setup, this is very very unsecure in my line of work.


All times are GMT -6. The time now is 09:11 PM.