LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 02-14-2012, 12:16 PM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 442

Rep: Reputation: 17
how to stream a webcam to http with VLC ?


hello
I want to stream my web cam to http by VLC my command is:
Quote:
cvlc v4l2:// :v4l2-vdev="/dev/video0" --sout '#transcode{vcodec=x264{keyint=60,idrint=2},vcodec=h264,vb=400,width=368,heigh=208,acodec=mp4a,ab=32 ,channels=2,samplerate=22100}:duplicate{dst=std{access=http{mime=video/x-ms-wmv},mux=asf,dst=:8082/stream.wmv}}' --no-sout-audio
but when I open

Quote:
127.0.0.1:8082/stream.wmv
on my firefox nothing happen just a black screen and a play bar underneath of browser and nothing what is wrong?
 
Old 02-14-2012, 10:15 PM   #2
AusBob
LQ Newbie
 
Registered: May 2011
Distribution: debian wheezy/sid
Posts: 9

Rep: Reputation: 0
hi,

Your command actually works for me so I would try to exclude browser/plugin/codec issues by trying to open the stream in, say, mplayer:

mplayer http://127.0.0.1:8082/stream.wmv

If that works, then you'd have to check your browser plugin (totem?) and codecs.
 
Old 02-15-2012, 02:23 AM   #3
linuxonbute
Member
 
Registered: May 2005
Location: Ardbeg on Bute
Distribution: Ubuntu 12.04 on Laptop and Desktop PC
Posts: 37

Rep: Reputation: 15
I came across this topic and thought I would try this. I also get a blank screen and trying your suggestion doesn't work either.
It gives the message "An error occured, stream contains no data."
Any ideas?
-------------------------------------------------------------------------------------------------------------
Edit
tried launching mplayer from command line and got this output:

mplayer http://127.0.0.1:8082/stream.wmv
MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing http://127.0.0.1:8082/stream.wmv.
Resolving 127.0.0.1 for AF_INET6...
Couldn't resolve name for AF_INET6: 127.0.0.1
Connecting to server 127.0.0.1[127.0.0.1]: 8082...
STREAM_ASF, URL: http://127.0.0.1:8082/stream.wmv
Resolving 127.0.0.1 for AF_INET6...
Couldn't resolve name for AF_INET6: 127.0.0.1
Connecting to server 127.0.0.1[127.0.0.1]: 8082...
nop_streaming_read error : Resource temporarily unavailable
Error while reading network stream.
Failed, exiting.
Resolving 127.0.0.1 for AF_INET6...
Couldn't resolve name for AF_INET6: 127.0.0.1
Connecting to server 127.0.0.1[127.0.0.1]: 8082...
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes) nop_streaming_read error : Resource temporarily unavailable
Cache fill: 0.00% (0 bytes)


Exiting... (End of file)

Last edited by linuxonbute; 02-15-2012 at 03:53 AM. Reason: extra information
 
Old 02-15-2012, 07:23 AM   #4
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 442

Original Poster
Rep: Reputation: 17
my problem solved and it was my linux box that does not recognize my webcam correctly
 
Old 02-15-2012, 09:45 AM   #5
linuxonbute
Member
 
Registered: May 2005
Location: Ardbeg on Bute
Distribution: Ubuntu 12.04 on Laptop and Desktop PC
Posts: 37

Rep: Reputation: 15
I still have the problem. My webcam is fully supported
 
Old 02-16-2012, 12:12 AM   #6
AusBob
LQ Newbie
 
Registered: May 2011
Distribution: debian wheezy/sid
Posts: 9

Rep: Reputation: 0
Hey linuxonbute,

Two suggestions:
1) Try playing back your webcam stream from vlc directly. That is, run vlc -> open capture device -> play. Check the options after enabling 'Show more options' to see which device/parameters are used

2) Try streaming a video file instead of your webcam to see if there are network issues. To do so, replace the first two options to cvlc above by your filename (cvlc movie.avi --sout ....). Then try to open the stream from mplayer.
 
Old 02-16-2012, 05:17 PM   #7
linuxonbute
Member
 
Registered: May 2005
Location: Ardbeg on Bute
Distribution: Ubuntu 12.04 on Laptop and Desktop PC
Posts: 37

Rep: Reputation: 15
Quote:
Originally Posted by AusBob View Post
Hey linuxonbute,

Two suggestions:
1) Try playing back your webcam stream from vlc directly. That is, run vlc -> open capture device -> play. Check the options after enabling 'Show more options' to see which device/parameters are used
works fine
Quote:
2) Try streaming a video file instead of your webcam to see if there are network issues. To do so, replace the first two options to cvlc above by your filename (cvlc movie.avi --sout ....). Then try to open the stream from mplayer.
reports 'location not found'
 
Old 02-18-2012, 09:40 AM   #8
AusBob
LQ Newbie
 
Registered: May 2011
Distribution: debian wheezy/sid
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by linuxonbute View Post
reports 'location not found'
That's rather odd. Can you please report both the vlc and mplayer command lines?
 
Old 02-19-2012, 03:11 PM   #9
linuxonbute
Member
 
Registered: May 2005
Location: Ardbeg on Bute
Distribution: Ubuntu 12.04 on Laptop and Desktop PC
Posts: 37

Rep: Reputation: 15
Quote:
Originally Posted by AusBob View Post
That's rather odd. Can you please report both the vlc and mplayer command lines?
I cannot find the syntax for command line for mplayer
I ran it from the gui when I got the error.

vlc gui ran fine but don't know what the command line should be.
I tried vlc http://127.0.0.1:8082/stream.wmv
which reported as follows:

VLC media player 1.1.4 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0x88ea914] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Blocked: call to setlocale(6, "")
Blocked: call to sigaction(17, 0xb6b640d4, 0xb6b64048)
Warning: call to signal(13, 0x1)
Warning: call to signal(13, 0x1)
Warning: call to srand(1329676677)
Warning: call to rand()
Blocked: call to setlocale(6, "")

(process:26459): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Warning: call to signal(13, 0x1)
Warning: call to signal(13, 0x1)
Blocked: call to setlocale(6, "")
Blocked: call to setenv("_PX_CONFIG_ORDER", "", 1)
[0x8cf23a4] main access error: connection failed: Connection refused
[0x8cf23a4] access_http access error: cannot connect to 127.0.0.1:8082
[0x8cf23a4] main access error: connection failed: Connection refused
[0x8cf23a4] access_mms access error: cannot connect to 127.0.0.1:8082
[0x8a41b0c] main input error: open of `http://127.0.0.1:8082/stream.wmv' failed: (null)

and I got the same with sudo vlc-wrapper http://127.0.0.1:8082/stream.wmv
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to stream a webcam to http with VLC ? golden_boy615 Linux - General 2 02-15-2012 07:54 AM
How to get VLC to remember a stream raylhm Suse/Novell 2 09-23-2008 01:34 AM
how to get vlc-0.9.0_beta3 to save webcam stream to file jimerickso Linux - Software 0 08-22-2008 04:42 PM
how to stream your tv tuner to another pc (without VLC) ? frenchn00b Linux - General 1 09-01-2007 04:46 PM
How to stream video. Not with VLC MikeOfAustin Linux - Software 1 06-29-2007 04:22 PM


All times are GMT -5. The time now is 04:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration