rtsp to flash, livestream

About encoding, codec settings, muxers and filter usage
multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

rtsp to flash, livestream

Postby multiuser » 10 Oct 2008 10:34

hi everyone!

my problem *gg*:

i have a vserver with a running VLC and a rtsp cam running in internet. now i want to get on server one rtspstream from cam and give the video as a flw/flash (or swf?) out on my webpage, because 98% of users has a flashplayer installed. is it possible to stream this in flash from rtsp?

how does it work?

this is wrong?! (swf?)
vlc rtsp://IPADDRESS:554/live.sdp --sout '#standard{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=IPADDRESS:10001/stream.flv}'
vlc rtsp://IPADDRESS:554/live.sdp --sout '#standard{access=http{mime=video/x-flv},mux=ogg,dst=IPADDRESS:10001/stream.flv}'

please help me :-)
thanks a lot!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: rtsp to flash, livestream

Postby Jean-Baptiste Kempf » 10 Oct 2008 12:49

You have to transcode.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 10 Oct 2008 13:32

transcode? what do you mean?
how is the command to do it?

schrotterp
New Cone
New Cone
Posts: 7
Joined: 10 Oct 2008 10:23

Re: rtsp to flash, livestream

Postby schrotterp » 10 Oct 2008 14:35

Because you must change file type, that is why transcode.

vlc rtsp://IPADDRESS:554/live.sdp --sout '#transcode{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=IPADDRESS:10001/stream.flv}'
source in /change video type/source out

Paul

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 10 Oct 2008 15:03

vlc rtsp://10.0.0.3:554/live.sdp --sout '#transcode{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=172.19.100.254:10001/stream.flv}'

says:

.
.
.
VLC media player 0.8.6h Janus
starting VLC root wrapper... using UID 0 (root)
***************************************
* Running VLC as root is discouraged. *
***************************************

It is potentially dangerous, and might not even work properly.
[00000297] main stream output error: invalid chain
[00000298] stream_out_transcode private error: cannot create chain
[00000297] main stream output error: stream chain failed for `transcode{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=172.19.100.254:10001/stream.flv}'
[00000295] main input error: cannot start stream output instance, aborting
[00000286] main playlist: nothing to play
[00000286] main playlist: stopping playback
server:~ # vlc rtsp://10.0.0.3:554/live.sdp --sout '#transcode{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=172.19.100.254:10001/stream.flv}'
VLC media player 0.8.6h Janus
starting VLC root wrapper... using UID 0 (root)
***************************************
* Running VLC as root is discouraged. *
***************************************
It is potentially dangerous, and might not even work properly.
[00000297] main stream output error: invalid chain
[00000298] stream_out_transcode private error: cannot create chain
[00000297] main stream output error: stream chain failed for `transcode{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=172.19.100.254:10001/stream.flv}'
[00000295] main input error: cannot start stream output instance, aborting
[00000286] main playlist: nothing to play

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 10 Oct 2008 15:12

and videolan 0.9 says:

[00000001] main libvlc debug: translation test: code is "de"
[00000390] dummy interface: using the dummy interface module...
[00000400] main stream output error: invalid chain
[00000401] stream_out_transcode stream out error: cannot create chain
[00000400] main stream output error: stream chain failed for `transcode{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=172.19.100.254:10001/stream.flv}'
[00000399] main input error: cannot start stream output instance, aborting

schrotterp
New Cone
New Cone
Posts: 7
Joined: 10 Oct 2008 10:23

Re: rtsp to flash, livestream

Postby schrotterp » 10 Oct 2008 15:31

I think, VLC haven' t support flv format.

vlc rtsp://10.0.0.3:554/live.sdp --sout '#transcode{access=http,mux=asf,dst=172.19.100.254:10001/stream.asf}'

Paul

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 10 Oct 2008 17:08

hmmmm... it does´nt work?!

schrotterp
New Cone
New Cone
Posts: 7
Joined: 10 Oct 2008 10:23

Re: rtsp to flash, livestream

Postby schrotterp » 11 Oct 2008 12:31

Hello in this forum I found:

Code: Select all

I've tested a nightly build vlc release and it's working. Here is my line : vlc http://mafreebox.freebox.fr/freeboxtv/playlist.m3u --sout '#transcode{vcodec=FLV1,scale=0.25,acodec=mp3,samplerate=22050}:std{access=http,dst=192.168.0.7:1234/stream.flv}' -I http --http-host 192.168.0.7:8080 And, if I use my webbrowser to access to 192.168.0.7:8080 there is a link in the bottom of the page to access to a flash based video player. Wonderful ;) I've put everything behind an apache proxy server so, it's very clean ;)
Maybe help you.

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 11 Oct 2008 16:19

hey! good, but now i have:

Code: Select all

. . . [00000409] main mux debug: adding a new input [00000409] avformat mux debug: adding input [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000409] avformat mux debug: writing header Aspect ratio mismatch between encoder and muxer layer [00000409] avformat mux error: could not write header [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030) [00000432] avcodec encoder warning: vbv buffer overflow (flv@0x8209030)
but now i think, it is just a little problem...

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 13 Oct 2008 19:11

google says nothing, just a second user with same problems...
any idea?

LaBay
Blank Cone
Blank Cone
Posts: 25
Joined: 02 Sep 2008 09:17
Operating System: Windows
Location: Kyiv, Ukraine
Contact:

Re: rtsp to flash, livestream

Postby LaBay » 15 Oct 2008 12:16

Hi,

is it an AXIS IP cam? If it is, then a way of partial problem solving exist.
The AXIS IP video product output is MPEG4 ES unmuxed video stream, but VLC can't transcode such a strem by one way(don't ask me why). You have mux your video stream before transcoding.
Example with VLC 0.9.2/4

1) AXIS video stream muxing
vlc.exe rtsp://<cam's IP>:554/mpeg4/media.amp :sout=#duplicate{dst=display,dst=std{access=http,mux=ts,dst=127.0.0.1:8081}}
2) transcoding to FLV
vlc.exe -vvv http://127.0.0.1:8081 :http-caching=5000 :sout=#transcode{vcodec="FLV1",vb="1048",acodec="mp3",ab="128",channels="1"}:duplicate{dst=display,dst="std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=\"192.168.2.247:40221/stream.flv\"}"}

It works, BUT the quality of resulting flv video stream picture is very poor.

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 15 Oct 2008 13:46

ok, i tried:

10.0.0.140 is servers ip address.
10.0.0.4 is IP from Cam.
rtsp://10.0.0.4:554/live.sdp = rtsp stream from cam

1. vlc rtsp://10.0.0.4:554/live.sdp --sout '#duplicate{dst=display,dst=std{access=http,mux=ts,dst=127.0.0.1:8081}}'
2. vlc -vvv http://127.0.0.1:8081 --http-caching=5000 --sout='#transcode{vcodec="FLV1",vb="1048",acodec="mp3",ab="128",channels="1"}:duplicate{dst=display,dst="std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst="10.0.0.140:40221/stream.flv"}"}'

-- AND --
vlc -vvv rtsp://10.0.0.4:554/live.sdp --sout '#transcode{vcodec=FLV1,scale=0.25,acodec=mp3,samplerate=22050}:std{access=http,dst=10.0.0.140:1234/stream.flv}' -I http --http-host 10.0.0.140:8080

i always get the videos on kde, but in console (where the protocoll runs) i get
[00000466] avcodec encoder warning: vbv buffer overflow
(flv@0x82df910)

this message i get ol ~0.1 ms. = 1000x and more...
My Cam: VIVOTEK IP7131

LaBay
Blank Cone
Blank Cone
Posts: 25
Joined: 02 Sep 2008 09:17
Operating System: Windows
Location: Kyiv, Ukraine
Contact:

Re: rtsp to flash, livestream

Postby LaBay » 15 Oct 2008 15:50

Use rtsp and http caching.
Examples:
:rtsp-cashing=5000 and more
:http-caching=5000 and more

multiuser
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Oct 2008 10:22

Re: rtsp to flash, livestream

Postby multiuser » 15 Oct 2008 19:02

thanks for your assistance, however I, I believed leave it now and began from the front. again the requirements:

from the camera (low speed internet, ~760kbit upload) to a linuxserver (with highspeed internetconnection).
this server should share the videostream to use the stream on a website. on this website i want to show the video from Cam!

ActiveX on website is bad, because many users have a firefoxbrowser. it should run in IE and FF. i have read from "videolan-plugin" for browsers. but when i use it, it always "video is loading"... why?

who has an idea?
who kan help me?

thanks a lot!!

LaBay
Blank Cone
Blank Cone
Posts: 25
Joined: 02 Sep 2008 09:17
Operating System: Windows
Location: Kyiv, Ukraine
Contact:

Re: rtsp to flash, livestream

Postby LaBay » 24 Nov 2008 09:46

thanks for your assistance, however I, I believed leave it now and began from the front. again the requirements:

from the camera (low speed internet, ~760kbit upload) to a linuxserver (with highspeed internetconnection).
this server should share the videostream to use the stream on a website. on this website i want to show the video from Cam!

ActiveX on website is bad, because many users have a firefoxbrowser. it should run in IE and FF. i have read from "videolan-plugin" for browsers. but when i use it, it always "video is loading"... why?

who has an idea?
who kan help me?

thanks a lot!!
Hi
We have the same scheme: IP cam(AXIS) - media muxer(VLC 0.8.6 f) http streaming - public Internet - media server(VLC 0.8.6 f) http/mms streaming - public Internet multiview(sity surveilance, internet show etc.) "How to" about it here (Russian only).

BugMeNot2
Blank Cone
Blank Cone
Posts: 37
Joined: 30 Jan 2010 01:27

Re: rtsp to flash, livestream

Postby BugMeNot2 » 23 Oct 2010 10:21

Hi,
I have exactly same tasks. Can I find somewhere an english, french or german translation of the russian howto?

And btw - I would prefer to transcode to HTML5-videostream if possible?! Else flv must be the solution. Request visitors to install the latest browser version is ok for me, even better then asking visitors to install several plugins and codecs...

The original post is some years old - perhaps someone did new howtos for streaming live video on websites using vlc-commandline server? Would make me lucky :)

My setup:
Low-bandwidth ip cam connected to internet where a high-bandwidth server should take over the stream, convert it into html5 or flv stream so that I can put it inside my website.

Thank you very much for any recommendations?

Greetings,
Dr. Zoidberg




Thank Chromium-Browser: It translated the russian thing perfect: Its not what I am looking for. It just streams and proxies and recodes the stream, but you still need a special active-x component for the clients (IE required) to watch the video on a website. Thats no solution. Is there another option just using the browsers-onboard video-functionalities or flv to show the stream?

azeemakram
New Cone
New Cone
Posts: 2
Joined: 09 Mar 2012 07:34

Re: rtsp to flash, livestream

Postby azeemakram » 09 Mar 2012 07:40

Hello all : Can i have the steps to take output in RTMP stream from RTSP stream as an input.?


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 23 guests