Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 01-19-2016, 06:12 PM
Koze Koze is offline
Member
 
Join Date: Sep 2015
Posts: 35
Koze is on a distinguished road
Default

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
Reply With Quote
  #2  
Old 01-19-2016, 06:52 PM
biezom biezom is offline
Senior Member
 
Join Date: Sep 2014
Posts: 1,025
biezom is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 01-19-2016, 07:04 PM
Koze Koze is offline
Member
 
Join Date: Sep 2015
Posts: 35
Koze is on a distinguished road
Default

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

Last edited by Koze : 01-19-2016 at 07:07 PM. Reason: adding code
Reply With Quote
  #4  
Old 01-19-2016, 07:07 PM
biezom biezom is offline
Senior Member
 
Join Date: Sep 2014
Posts: 1,025
biezom is on a distinguished road
Default

Re: how to stream rtmp to rtmp


i don't know but the command with livestreamer re-stream already
Reply With Quote
  #5  
Old 01-19-2016, 07:14 PM
Koze Koze is offline
Member
 
Join Date: Sep 2015
Posts: 35
Koze is on a distinguished road
Default

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
Reply With Quote
  #6  
Old 01-19-2016, 07:17 PM
biezom biezom is offline
Senior Member
 
Join Date: Sep 2014
Posts: 1,025
biezom is on a distinguished road
Default

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
Reply With Quote
  #7  
Old 01-21-2016, 01:46 PM
Koze Koze is offline
Member
 
Join Date: Sep 2015
Posts: 35
Koze is on a distinguished road
Default

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

Last edited by Koze : 01-21-2016 at 01:49 PM. Reason: CORRECTION
Reply With Quote
  #8  
Old 02-05-2016, 02:40 PM
Koze Koze is offline
Member
 
Join Date: Sep 2015
Posts: 35
Koze is on a distinguished road
Default

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
Reply With Quote
Reply Post New Thread
Tags:



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 01:29 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons