Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Video stream recording (http://stream-recorder.com/forum/forumdisplay.php?f=4)
-   -  

how to stream rtmp to rtmp

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

Koze 01-19-2016 05:12 PM

how to stream rtmp to rtmp


 
Hello,

I have for example following stream:
Code:

"rtmp://stream.smcloud.net/live2/wawa/wawa_720p" -a "live2/eskatv" -f "WIN 11,9,900,170" -W "http://www.eska.tv/thrdparty/flowplayer/flowplayer.rtmp.swf" -p "http://www.eska.tv/player" --live -y "eskatv_360p"
and would like to re-stream to another rtmp using ffmpeg on Linux Debian. Do I need any other program than ffmpeg to do the task?

Could you kindly check my below command if is correct one?
Code:

ffmpeg -re -i "rtmp://stream.smcloud.net/live2/wawa/wawa_720p" -a "live2/eskatv" -f "WIN 11,9,900,170" -W "http://www.eska.tv/thrdparty/flowplayer/flowplayer.rtmp.swf" -p "http://www.eska.tv/player" --live -y "eskatv_360p" -codec copy  -f flv rtmp://xxxxxxx
If not what would be the way to re-stream above source?

Thank you in advance for any suggestion.

k

biezom 01-19-2016 05:52 PM

Re: how to stream rtmp to rtmp


 
hi

you can use livestreamer

Code:

livestreamer --player-external-http  --player-external-http-port "4546"  "rtmp://stream.smcloud.net/live2/wawa/wawa_720p app=live2/eskatv  pageUrl=http://www.eska.tv/player live=1 playpath=eskatv_360p" best
in local
Code:

http://127.0.0.1:4546/
extern
Code:

http://SERVER-IP:4546/
maybe need allow port 4546 on the server's firewall

Koze 01-19-2016 06:04 PM

Re: how to stream rtmp to rtmp


 
Thank you bezom,

So if I will use livestreamer with above port in local then can I re-stream within ffmpeg with following command:

Code:

ffmpeg -re -i "http://localhost:4546/" -acodec aac -strict -2 -vcodec copy -b:a 128K -preset ultrafast -bufsize 3968k -f flv rtmp://xxxxxxxxxxxxxxxx
or should I use:
Code:

ffmpeg -re -i "http://127.0.0.1:4546/" -acodec aac -strict -2 -vcodec copy -b:a 128K -preset ultrafast -bufsize 3968k -f flv rtmp://xxxxxxxxxxxxxxxx
Is that going to work?

Much appreciate your help,

k

biezom 01-19-2016 06:07 PM

Re: how to stream rtmp to rtmp


 
i don't know but the command with livestreamer re-stream already

Koze 01-19-2016 06:14 PM

Re: how to stream rtmp to rtmp


 
yes I know,

but I would like to re-stream to another server (let's say twitch.tv)

Sorry for not being clear with that.

Thank you,
k

biezom 01-19-2016 06:17 PM

Re: how to stream rtmp to rtmp


 
i'm not sure if i understand

if your sever is the debian linux run the livestreamer's command on this server

Koze 01-21-2016 12:46 PM

Re: how to stream rtmp to rtmp


 
Thanks biezom for your great help.

With your help I was able to re-stream the source using livestreamer and ffmpeg.

I was using following command within ffmpeg:
Code:

ffmpeg -re -i "http://127.0.0.1:4824/" -acodec aac -strict -2 -vcodec copy -b:v 2000k -b:a 128K -preset ultrafast -bufsize 3968k -f flv rtmp://xxxxxx
But at the begging of the stream I got following error
Code:

[flv @ 0x2619580] Codec for stream 0 does not use global headers but container format requires global headers
and then after successfully streaming over 2 h stream crashed with following information:

Code:

frame=197473 fps= 25 q=-1.0 size= 2457396kB t                                                  frame=197486 fps= 25 q=-1.0 size= 2457548kB t                                                  frame=197499 fps= 25 q=-1.0 size= 2457711kB t                                                  [flv @ 0x3626580] Failed to update header wit                                                  h correct duration.
[flv @ 0x3626580] Failed to update header wit                                                  h correct filesize.
frame=197500 fps= 25 q=-1.0 Lsize= 2457731kB                                                  time=02:11:40.03 bitrate=2548.6kbits/s
video:2314517kB audio:133208kB subtitle:0kB o                                                  ther streams:0kB global headers:0kB muxing ov                                                  erhead: 0.408774%

Any idea how I can fix the issue?
Should I change something within my ffmpeg command?

I also noticed that after about 1 h livestream terminal became inactive but streaming continued with ffmpeg.

Is that normal?

Thank you,

k

Koze 02-05-2016 01:40 PM

Re: how to stream rtmp to rtmp


 
Hello again,

I have tried to re-stream following link using livestreamer and ffmpeg:
Code:

http://wtk.live-ext.e96-jw.insyscd.net/lechtv.smil/playlist.m3u8
Live streamer is connecting and fetching the stream but ffmpeg produce a lot of errors.

Could anyone have a look and let me know if I need to change something in my ffmpeg command:
Code:

ffmpeg -re -headers 'User-Agent: bar'$'\r\n' -i "http://127.0.0.1:9155/" -acodec aac -bsf:a aac_adtstoasc -strict -2 -vcodec copy -bufsize 3968k -f flv rtmp://stream
Thanks a lot for your help in advance,

koze


All times are GMT -6. The time now is 08:23 AM.