Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Use ffserver, ffmpeg, rtmpdump, VLC to convert live RTMP stream into UDP multicastI've been banging my head against the desk for a while now with this problem, but hopefully one of you can help me. I'm attempting to use rtmpdump and VLC to convert (redirect) a couple of live RTMP streams into UDP multicasts.
When I try Code:
rtmpdump.exe -v -r rtmp://stream2.france24.yacast.net/france24_live/en -a france24_live/en -W http://www.france24.com/en/sites/all/modules/maison/aef_player/flash/player.swf -p http://www.france24.com/en/aef_player_popup/france24_player -y f24_liveen | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" - Code:
rtmpdump.exe -v -r rtmp://stream2.france24.yacast.net/france24_live/en -a france24_live/en -W http://www.france24.com/en/sites/all/modules/maison/aef_player/flash/player.swf -p http://www.france24.com/en/aef_player_popup/france24_player -y f24_liveen | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" - :sout-all :sout=#duplicate{dst=udp{mux=ts,dst=239.1.1.1:9000},dst=display} :ttl=20 :sout-keep Thanks in advance -SS |
#2
|
|||
|
|||
Re: use rtmpdump and VLC to convert a couple of live RTMP streams into UDP multicastsPersonally I would use ffserver instead, though I'm not sure it does UDP broadcasts. It definitely does RTP though. You might even be able to just use ffmpeg with an RTMP URL as the input and a UDP URL as the output.
vlc has always been pretty finicky and I've never had much success with it for streaming. |
#3
|
|||
|
|||
Re: use rtmpdump and VLC to convert a couple of live RTMP streams into UDP multicastsI've actually kept grinding on this issue and I think I almost have it solved, but maybe need just a little nudge to help figure it out the rest of the way.
So I took your suggestion (hyc) from the post you made at the Videolan forums and tried ... Code:
ffmpeg "rtmp://stream2.france24.yacast.net/france24_live/en app=france24_live/en swfUrl=http://www.france24.com/en/sites/all/modules/maison/aef_player/flash/player.swf pageUrl=http://www.france24.com/en/aef_player_popup/france24_player playpath=f24_liveen" -an -vcodec copy -f rtp rtp://10.188.252.76:9002 -vn -acodec copy -f rtp rtp://10.188.252.76:9004 -newaudio Code:
ffmpeg -loglevel verbose -i "rtmp://stream2.france24.yacast.net/france24_live/en app=france24_live/en swfUrl=http://www.france24.com/en/sites/all/modules/maison/aef_player/flash/player_new.swf pageUrl=http://www.france24.com/en/aef_player_popup/france24_player playpath=f24_liveen live=1" -vcodec copy -acodec copy -vbsf h264_mp4toannexb -f mpegts udp://10.188.252.76:9000 Code:
packetizer_h264 warning: waiting for SPS/PPS Code:
ffmpeg -i "rtmp://cp87869.live.edgefcs.net/live app=live playpath=us_300@21006 swfUrl=http://player.ooyala.com/static/cacheable/63abb43363926ab.e712725090ebb5f31/player_v2.swf swfVfy=1 pageUrl=http://www.bloomberg.com/tv live=1" -vcodec copy -acodec copy -vbsf h264_mp4toannexb -f mpegts udp://10.188.252.76:9000 Code:
faad warning: Unexpected channel configuration change Thanks! |
#4
|
|||
|
|||
Re: Use ffserver, ffmpeg, rtmpdump, VLC to convert live RTMP stream into UDP multicasAre you sure you even need that bitstream filter in there? I have to say, that filter has been pretty buggy for as long as I've worked with the ffmpeg code. (Which is a couple years already...) Just for experimental purposes, have you tried using any other output formats?
Like I said, I have pretty good luck with ffserver serving over RTP and HTTP. |
#5
|
|||
|
|||
Re: Use ffserver, ffmpeg, rtmpdump, VLC to convert live RTMP stream into UDP multicasUnfortunately, yes, I seem to need the bitstream filter. If I don't use it, I get ...
Code:
[mpegts @ 0x985cde0] h264 bitstream malformated, no startcode found, use -vbsf h264_mp4toannexb av_interleaved_write_frame(): Operation not permitted All these errors seem to me to center around malformed or missing PCR or ffmpeg's mpegts muxer is broken. Actually, in looking about the Internet, it would seem there's something odd about mpegts and h264 that ffmpeg doesn't handle well. I'm not about to give up yet, but I do need some more ideas on what I could try to do to fix this. |
#6
|
|||
|
|||
Re: Use ffserver, ffmpeg, rtmpdump, VLC to convert live RTMP stream into UDP multicasI still think you should try ffserver instead. This works for me with your France24 stream
ffserver.conf example Code:
Port 8090 RTSPPort 554 BindAddress 0.0.0.0 MaxHTTPConnections 1000 MaxClients 200 MaxBandwidth 10000 CustomLog - <Feed l.ffm> File /tmp/l.ffm FileMaxSize 2000M </Feed> <Stream test1.flv> Format rtp Feed l.ffm MulticastAddress 224.124.0.1 MulticastPort 5000 MulticastTTL 16 NoLoop VideoCodec libx264 VideoFrameRate 25 VideoBitRate 400 VideoSize 384x224 AVPresetVideo default AVPresetVideo main AVOptionVideo flags +global_header AudioCodec libfaac AudioBitRate 48 AudioChannels 1 AudioSampleRate 44100 AVOptionAudio flags +global_header </Stream> Code:
ffmpeg -i "rtmp://stream2.france24.yacast.net/france24_live/en app=france24_live/en swfUrl=http://www.france24.com/en/sites/all/modules/maison/aef_player/flash/player_new.swf pageUrl=http://www.france24.com/en/aef_player_popup/france24_player playpath=f24_liveen live=1" http://localhost:8090/l.ffm ============ This is even easier, don't use ffmpeg at all, just let ffserver fetch the stream directly: Code:
Port 8090 RTSPPort 554 BindAddress 0.0.0.0 MaxHTTPConnections 1000 MaxClients 200 MaxBandwidth 10000 CustomLog - <Stream test1.flv> Format rtp MulticastAddress 224.124.0.1 MulticastPort 5000 MulticastTTL 16 NoLoop File "rtmp://stream2.france24.yacast.net/france24_live/en app=france24_live/en swfUrl=http://www.france24.com/en/sites/all/modules/maison/aef_player/flash/player_new.swf pageUrl=http://www.france24.com/en/aef_player_popup/france24_player playpath=f24_liveen live=1" </Stream> Last edited by hyc : 08-06-2011 at 10:36 PM. |
#7
|
|||
|
|||
Re: Use ffserver, ffmpeg, rtmpdump, VLC to convert live RTMP stream into UDP multicasI had to look into ffserver a bit because the documentation is fairly sparse compared to ffmpeg, but I don't think this will work unless I'm reading this all wrong.
The target playback devices are a couple of IPTV set top boxes, so I need these streams bent into standard MPEG-TS UDP or RTP multicasts. This seems to be packing them up for an on-demand reflector service. Unfortunately, I think these little boxes are too dumb to know what to do with that. |
#8
|
|||
|
|||
Re: Use ffserver, ffmpeg, rtmpdump, VLC to convert live RTMP stream into UDP multicasQuote:
|
Tags: brodcast, convert multicast, ffmpeg, ffserver, france24, france24 yacast net, multicast, re broadcast, redirect rtmp, rtmp, rtmpdump, streaming, udp, udp multicast, vlc, yacast net |
Thread Tools | |
Display Modes | |
|
|