Changing streaming source (Webcam) from /dev/video0 to Internet Stream (syntax????)

256 views
Skip to first unread message

JR

unread,
Jan 7, 2010, 3:02:41 PM1/7/10
to JapelServer
FYI,

I replaced the /dev/video in the japel.properties file with my Hava TV
streamer Webcam=queue v4l2src rtsp://192.168.1.230 ! video/x-raw-
yuv,width=160,height=120 ! ffmpegcolorspace ! videorate ! video/x-raw-
yuv,framerate=5/1 ! x264enc ! mux. { mpegtsmux name=mux !
tcpserversink port=PORT } { gconfaudiosrc ! queue ! audioconvert !
faac ! queue ! mux. }

Hava supports VLC's rtsp:// protocol. This doesn't work and I get the
error about /dev/video0 even though it was removed from the
configuration file.

Any ideas? My understanding was that an "internet stream" was
supported. Does this need to be an http:// or mms:// stream as a
source or can it also be rtsp://. My assumption whatever v4l
supported would work.

Thanks in advance,
JR

Patrick Balleux

unread,
Jan 7, 2010, 10:27:17 PM1/7/10
to JapelServer
Hi JR,

You got it wrong.

You're trying to read a rtsp feed not a v4l2src device.

Is your webcam also providing sound? then if this is the case, you
should also modifiy the gstreamer configuration to get sound from the
webcam instead of your local

You should read the GStreamer documentation as there is a lot of
details on how to use the configuration: http://gstreamer.freedesktop.org/documentation/plugins.html

Here is a config from the console that you can test your webcam:

gst-launch-0.10 rtspsrc location=rtsp://192.168.1.230/ latency=0 !
decodebin ! ffmpegcolorspace ! autovideosink

Of course, you will have to check the proper URL as this example may
not work with your webcam. This will display your webcam in a small
window on your PC.

Once it is working, then you need to create a pipeline for JapelServer
that should look like this:

Webcam=queue rtspsrc location=rtsp://192.168.1.230/ latency=0 !
decodebin ! ffmpegcolorspace ! videorate ! video/x-raw-


yuv,framerate=5/1 ! x264enc ! mux. { mpegtsmux name=mux !
tcpserversink port=PORT } { gconfaudiosrc ! queue ! audioconvert !
faac ! queue ! mux. }

This one will assume that your webcam is providing sound also

Webcam=queue rtspsrc location=rtsp://192.168.1.230/ latency=0 !
decodebin name=dec ! ffmpegcolorspace ! videorate ! video/x-raw-


yuv,framerate=5/1 ! x264enc ! mux. { mpegtsmux name=mux !

tcpserversink port=PORT } { dec. ! queue ! audioconvert ! faac !
queue ! mux. }

That should get your going...

Pat

Jeffrey Rosenberg

unread,
Jan 8, 2010, 12:58:12 PM1/8/10
to japel...@googlegroups.com
Patrick,

Thanks so much for your reply.  All testing is done on a single local private (192.168.1.0/24) subnet.

Using VLC player to open up rtsp://192.168.1.230 works perfectly.

Using your command, I get the following:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
WARNING: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
gstrtspsrc.c(3132): gst_rtspsrc_loop_udp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
The server closed the connection.

When trying to stream a XVID video file or using the updated rtpsrc for Webcam, I click on the 500k or 50k video file or the webcam entry and the following is diplayed on the console.  VLC opens up but displays nothing

java -jar JapelServer.jar japel.properties
WebServer:  japel.properties Configuration loaded
WebServer:  Accepting connection on http://ubuntu:8888
WebServer:  Connection from ubuntu(127.0.1.1)
Connection:  Host is:  http://127.0.1.1:8888
Connection from ubuntu(127.0.1.1):  Requested file:  /
Connection from ubuntu(127.0.1.1):  Streaming file.../
Connection from ubuntu(127.0.1.1):  Serving webpage.../index.html
Connection from ubuntu(127.0.1.1):  Closed
WebServer:  Connection from ubuntu(127.0.1.1)
Connection:  Host is:  http://127.0.1.1:8888
Connection from ubuntu(127.0.1.1):  Requested file:  /favicon.ico
Connection from ubuntu(127.0.1.1):  Streaming file.../favicon.ico
[Warning] Connection from ubuntu(127.0.1.1):  File was  not found.../favicon.ico
Connection from ubuntu(127.0.1.1):  Closed
WebServer:  Connection from ubuntu(127.0.1.1)
Connection:  Host is:  http://127.0.1.1:8888
Connection from ubuntu(127.0.1.1):  Requested file:  /LOVE.avi.m3u8
Connection from ubuntu(127.0.1.1):  Serving file:  /LOVE.avi.m3u8
Connection from ubuntu(127.0.1.1):  Serving Movie:  /LOVE.avi.m3u8
TCPServer:  Staring movie:  /syswork/videos/LOVE.avi (500k)
TCPServer:  Listening on port:  5888
TCPServer:  Movie started:  LOVE.avi (500k)
Connection from ubuntu(127.0.1.1):  Closed
WebServer:  Connection from ubuntu(127.0.1.1)
Connection:  Host is:  http://127.0.1.1:8888
Connection from ubuntu(127.0.1.1):  Requested file:  /stream
Connection from ubuntu(127.0.1.1):  Streaming video...
WebServer:  Connection from ubuntu(127.0.1.1)
Connection:  Host is:  http://127.0.1.1:8888
Connection from ubuntu(127.0.1.1):  Requested file:  /Webcam.m3u8
Connection from ubuntu(127.0.1.1):  Serving file:  /Webcam.m3u8
TCPServer:  Movie stopped...
TCPServer:  Movie stopped...
Connection from ubuntu(127.0.1.1):  Serving stream:  /Webcam.m3u8
TCPServer:  Staring stream:  Webcam
TCPServer:  Listening on port:  5888
Connection from ubuntu(127.0.1.1):  Closed
TCPServer:  Stream started:  Webcam
Connection from ubuntu(127.0.1.1):  Closed
WebServer:  Connection from ubuntu(127.0.1.1)
Connection:  Host is:  http://127.0.1.1:8888
Connection from ubuntu(127.0.1.1):  Requested file:  /stream
Connection from ubuntu(127.0.1.1):  Streaming video...

Any ideas? So far I haven't been successful with either an AVI (DIVX/XVID) file or the rtspsrc both via VLC player and via the iPhone on my local LAN.

Thanks,
JR

JR

unread,
Jan 9, 2010, 11:52:56 AM1/9/10
to JapelServer
Just be make it easier, I decided to convert the AVI file to an iPhone
compatible format even though I assumed it would transcode the video.
I then tried again to open it up on my iPhone connected to my local
wireless LAN. Again it failed. I then updated my Ubuntu packages and
verified I have the full OpenJDK and all the Gstreamer pacakges
(running the latest version of Ubuntu from the Internet (32bit). It
still didn't work.

Here is the output from the console trying to open up the 50k link.
Quicktime on the iPhone just opens up and says "Loading Movies" and
never gets any further.

java -jar JapelServer.jar japel.properties

WebServer: japel.properties Configuration loaded
WebServer: Accepting connection on http://ubuntu:8888

WebServer: Connection from new-host-2.home(192.168.1.3)
Connection: Host is: http://192.168.1.23:8888
Connection from new-host-2.home(192.168.1.3): Requested file: /
TryHonesty-1.m4v.m3u8
Connection from new-host-2.home(192.168.1.3): Serving file: /
TryHonesty-1.m4v.m3u8
Connection from new-host-2.home(192.168.1.3): Serving Movie: /
TryHonesty-1.m4v.m3u8
TCPServer: Staring movie: /syswork/videos/TryHonesty-1.m4v (50k)


TCPServer: Listening on port: 5888

TCPServer: Movie started: TryHonesty-1.m4v (50k)
Connection from new-host-2.home(192.168.1.3): Closed
WebServer: Connection from new-host-2.home(192.168.1.3)
Connection: Host is: http://192.168.1.23:8888
Connection from new-host-2.home(192.168.1.3): Requested file: /
TryHonesty-1.m4v.m3u8
Connection from new-host-2.home(192.168.1.3): Serving file: /
TryHonesty-1.m4v.m3u8
TCPServer: Movie stopped...
Connection from new-host-2.home(192.168.1.3): Serving Movie: /
TryHonesty-1.m4v.m3u8
TCPServer: Staring movie: /syswork/videos/TryHonesty-1.m4v (50k)


TCPServer: Listening on port: 5888

TCPServer: Movie started: TryHonesty-1.m4v (50k)
Connection from new-host-2.home(192.168.1.3): Closed
WebServer: Connection from new-host-2.home(192.168.1.3)
Connection: Host is: http://192.168.1.23:8888
Connection from new-host-2.home(192.168.1.3): Requested file: /
TryHonesty-1.m4v.m3u8
Connection from new-host-2.home(192.168.1.3): Serving file: /
TryHonesty-1.m4v.m3u8
TCPServer: Movie stopped...
Connection from new-host-2.home(192.168.1.3): Serving Movie: /
TryHonesty-1.m4v.m3u8
TCPServer: Staring movie: /syswork/videos/TryHonesty-1.m4v (50k)


TCPServer: Listening on port: 5888

TCPServer: Movie started: TryHonesty-1.m4v (50k)
Connection from new-host-2.home(192.168.1.3): Closed
WebServer: Connection from new-host-2.home(192.168.1.3)
Connection: Host is: http://192.168.1.23:8888
Connection from new-host-2.home(192.168.1.3): Requested file: /
TryHonesty-1.m4v.m3u8
Connection from new-host-2.home(192.168.1.3): Serving file: /
TryHonesty-1.m4v.m3u8
TCPServer: Movie stopped...
Connection from new-host-2.home(192.168.1.3): Serving Movie: /
TryHonesty-1.m4v.m3u8
TCPServer: Staring movie: /syswork/videos/TryHonesty-1.m4v (50k)


TCPServer: Listening on port: 5888

TCPServer: Movie started: TryHonesty-1.m4v (50k)
Connection from new-host-2.home(192.168.1.3): Closed
WebServer: Connection from new-host-2.home(192.168.1.3)
Connection: Host is: http://192.168.1.23:8888
Connection from new-host-2.home(192.168.1.3): Requested file: /
stream
Connection from new-host-2.home(192.168.1.3): Streaming video...

Any ideas? I really want to try to get this working. I realize this
is Alpha code but I haven't been successful in stream even the Video
files.

Thanks again,
JR


On Jan 8, 12:58 pm, Jeffrey Rosenberg <rose...@linux.mine.nu> wrote:
> Patrick,
>
> Thanks so much for your reply. All testing is done on a single local private (192.168.1.0/24) subnet.
>
> Using VLC player to open up rtsp://192.168.1.230 works perfectly.
>
> Using your command, I get the following:
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> WARNING: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
> Additional debug info:
> gstrtspsrc.c(3132): gst_rtspsrc_loop_udp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
> The server closed the connection.
>
> When trying to stream a XVID video file or using the updated rtpsrc for Webcam, I click on the 500k or 50k video file or the webcam entry and the following is diplayed on the console. VLC opens up but displays nothing
>
> java -jar JapelServer.jar japel.properties
> WebServer: japel.properties Configuration loaded

> WebServer: Accepting connection onhttp://ubuntu:8888

Patrick

unread,
Jan 9, 2010, 6:19:03 PM1/9/10
to japel...@googlegroups.com
Is you computer a fast one?  I am wondering it this could be the problem.  On my setup, it works but I can see that the player (iPhone or VLC) is trying to load the stream a few times before it really starts....

I'll have a look at the code.

Pat
--
Patrick Balleux

Patrick Balleux

unread,
Jan 9, 2010, 9:27:36 PM1/9/10
to JapelServer
Hi

I just updloaded to SourceForge a new version "Alpha4" which has the
latest code. I don't know why, but Alpha3 what not up-to-date to the
latest source code.

Tell me how it goes...

Patrick


On 9 jan, 11:52, JR <rose...@gmail.com> wrote:
> Just be make it easier, I decided to convert the AVI file to an iPhone
> compatible format even though I assumed it would transcode the video.
> I then tried again to open it up on my iPhone connected to my local
> wireless LAN.  Again it failed.  I then updated my Ubuntu packages and
> verified I have the full OpenJDK and all the Gstreamer pacakges
> (running the latest version of Ubuntu from the Internet (32bit).  It
> still didn't work.
>
> Here is the output from the console trying to open up the 50k link.
> Quicktime on the iPhone just opens up and says "Loading Movies" and
> never gets any further.
>
> java -jar JapelServer.jar japel.properties
>
> WebServer:  japel.properties Configuration loaded

Reply all
Reply to author
Forward
0 new messages