Piping live stream with rtmpdump to VLC

*nix specific usage questions
DrLex
New Cone
New Cone
Posts: 5
Joined: 13 Nov 2009 11:55

Piping live stream with rtmpdump to VLC

Postby DrLex » 22 Sep 2011 15:46

I am trying to play an RTMP audio stream ‘live’ (with minimal delay) through a version of VLC (1.1.3) that was installed through a package that was compiled without librtmp support. I want to avoid having to install a ‘custom’ VLC, therefore I had hoped to solve this through rtmpdump.

I read numerous reports from people who do something like this:

Code: Select all

rtmpdump -r "rtmp://some.rtmp.url" | vlc -
This does not work for me however. VLC just sits there and does nothing. Only if I kill the rtmpdump process VLC will start playing everything that was streamed from the point when rtmpdump was started. I also tried

Code: Select all

mkfifo /tmp/fifo rtmpdump -r "rtmp://some.rtmp.url" -o /tmp/fifo & vlc /tmp/fifo
This has exactly the same effect, VLC waits until rtmpdump has stopped.

The only possible difference I can see between my situation and the other reported successful situations, is that the stream I am trying to play is a live audio stream coming from Wowza media server, while the others may have been static FLV files served by some flash media server. What causes VLC to wait for rtmpdump to exit?

Lotesdelere
Cone Master
Cone Master
Posts: 9974
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Piping live stream with rtmpdump to VLC

Postby Lotesdelere » 22 Sep 2011 17:11

For a live stream you need to use the rtmpdump -v parameter:

Code: Select all

rtmpdump -v -r "rtmp://some.rtmp.url" | vlc -

DrLex
New Cone
New Cone
Posts: 5
Joined: 13 Nov 2009 11:55

Re: Piping live stream with rtmpdump to VLC

Postby DrLex » 22 Sep 2011 17:18

For a live stream you need to use the rtmpdump -v parameter:

Code: Select all

rtmpdump -v -r "rtmp://some.rtmp.url" | vlc -
I tried that, doesn't change anything.

Lotesdelere
Cone Master
Cone Master
Posts: 9974
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Piping live stream with rtmpdump to VLC

Postby Lotesdelere » 23 Sep 2011 10:12

Many RTMP streams also require at least the URL of the player information. Make sure about this for the stream you're trying to use.

And also use the VLC -vvv parameter and then paste the full resulting log here or on Pastebin if it's too long.

Code: Select all

rtmpdump -v -r "rtmp://some.rtmp.url" -W "http://www.some.url/SomePlayer.swf" | vlc -vvv -

DrLex
New Cone
New Cone
Posts: 5
Joined: 13 Nov 2009 11:55

Re: Piping live stream with rtmpdump to VLC

Postby DrLex » 23 Sep 2011 11:38

I think problems with the rtmp stream can be ruled out, because VLC will play if I do

Code: Select all

rtmpdump -v -r … > file.flv [ctrl-C after a few seconds] cat file.flv | vlc -
Here is the output of `rtmpdump -v -r … | cvlc -vvv -`: http://pastebin.com/WKtk6e3D
This is with rtmpdump being killed after a while from another terminal: http://pastebin.com/0xUepDTc

DrLex
New Cone
New Cone
Posts: 5
Joined: 13 Nov 2009 11:55

Piping live Wowza stream with rtmpdump to VLC

Postby DrLex » 23 Sep 2011 17:16

I found some public streams to test with (both “static” and live) and they work, so there must be something fishy with the stream coming from our Wowza media server. The stream will even freeze ffplay compiled with rtmplib support. If anyone has a clue as to what this could be…

madhusud
New Cone
New Cone
Posts: 8
Joined: 02 Aug 2011 13:09

Re: Piping live stream with rtmpdump to VLC

Postby madhusud » 11 Oct 2011 16:03

I have the same exact problem with vlc and live rtmp streams.
I am using a rtmpdump pipe to vlc to transcode a live stream. In some cases, vlc takes a very long time till it starts , about 450 seconds into the live stream. In other cases, it starts fairly quickly about 12s into the stream.

On looking at the logs, I can see for the live streams which start quickly -
Starting live stream
INFO: Metadata:
INFO: author
INFO: copyright
INFO: description Event 3148634/en/0 running on amazon1/us-east/i-a44668c4 with address 107.20.87.222 started streaming at 2011-10-11T12:07:33Z
INFO: keywords
INFO: rating
INFO: title
INFO: presetname Custom
INFO: creationdate Tue Oct 11 12:07:37 2011
INFO: videodevice Virtual Cam
INFO: framerate 1.00
INFO: width 80.00
INFO: height 60.00
INFO: videocodecid VP62
INFO: videodatarate 100.00
INFO: videokeyframe_frequency10.00
INFO: audiodevice Virtual Audio
INFO: audiosamplerate 22050.00
INFO: audiochannels 1.00
INFO: audioinputvolume 75.00
INFO: audiocodecid .mp3
INFO: audiodatarate 48.00
...
...
[flv @ 0x1738a90]max_analyze_duration reached
[flv @ 0x1738a90]Estimating duration from bitrate, this may be inaccurate


However for the stream which takes 450 seconds it is just -
...
...
[flv @ 0x1fd6de0]Estimating duration from bitrate, this may be inaccurate

For whatever reason the max_analyze_duration is not triggered in the 2nd case. It must be the missing metadata for the 2nd stream which somehow helps vlc. It would be really helpful if somebody could figure out a way to supply this metadata via the command line.

capellini80
New Cone
New Cone
Posts: 3
Joined: 07 Feb 2012 19:51

Re: Piping live stream with rtmpdump to VLC

Postby capellini80 » 07 Feb 2012 20:02

Sorry to revive an older thread, but has anybody with this problem had any success? I'm having the same issue streaming live audio to vlc. Works fine if I output to a file and then open the file after.

Here's the command in question if you'd like to take a look yourself (NPR's live stream):

Code: Select all

rtmpdump -v -r "rtmp://204.2.215.118:1935/live?_fcs_vhost=cp42183.live.edgefcs.net&akmfv=1.7" \ -a "live?_fcs_vhost=cp42183.live.edgefcs.net&akmfv=1.7" \ -y "Live1@1094?v1st=null&mt=live1&s_vi=[CS]v1|2798B532051D0619-4000010B80113471[CE]" \ -W "http://www.npr.org/player/v2/audioPlayer.swf" \ -p "http://www.npr.org/player/v2/mediaPlayer.html?action=3&t=live1&islist=false" \ | vlc -
EDIT: VLC debug results.
Last edited by capellini80 on 07 Feb 2012 20:34, edited 1 time in total.

bat999
Cone that earned his stripes
Cone that earned his stripes
Posts: 200
Joined: 19 Dec 2007 02:35

Re: Piping live stream with rtmpdump to VLC

Postby bat999 » 07 Feb 2012 20:29

Here's the command in question if you'd like to take a look yourself (NPR's live stream):
Hi
That NPR live stream's playing OK for me with VLC.
Verbose output is here --->http://pastebin.com/b1z3pjbd
EDIT
-vvv output is here ---> http://pastebin.com/iFMAjSWh
Last edited by bat999 on 07 Feb 2012 20:40, edited 1 time in total.

capellini80
New Cone
New Cone
Posts: 3
Joined: 07 Feb 2012 19:51

Re: Piping live stream with rtmpdump to VLC

Postby capellini80 » 07 Feb 2012 20:39

Hm, thanks. Looks like you're using a later version of VLC? I've got 1.0.6 installed via package manager (Ubuntu 10.04). I'll try building from the latest source if I can and see if that helps.

capellini80
New Cone
New Cone
Posts: 3
Joined: 07 Feb 2012 19:51

Re: Piping live stream with rtmpdump to VLC

Postby capellini80 » 07 Feb 2012 20:53

I re-installed from the lucid-bleed ppa and that seems to have done the trick.

Thanks.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 43 guests