PDA

View Full Version : VLC/JTVLC Video Tutorial


secretply
02-22-2010, 11:10 AM
Step 1: Connect your video and audio devices to your computer

Step 2: Open VLC media player or download it if you haven't: http://www.videolan.org/vlc/

Step 3: Click Media -> Streaming

Step 4: Click the "Capture Device" tab.

Step 5a: On the video drop down box, select your video device you wish to use. On the audio drop down box, select your audio device you wish to use.

*If you're using a Dazzle then go to Step 5b and continue from there otherwise skip to Step 6.

Step 5b: Click Advanced Options.

Step 5c: Again, select the same video and audio devices under the drop down boxes. Check "Device Properties" and click OK

Step 6: Click Stream

Step 7: Click Next

Step 8a: Click the drop down box and select RTP and click Add. On "Address", type 127.0.0.1 and on "Port", type 1234

* If you want to customize your encoding settings (like video bitrate, resolution, audio bitrate, etc.) then go to Step 8b and continue from there otherwise skip to Step 9.

Step 8b: Check "Activate Transcoding" if it isn't already. Select your Profile that is best suited to you and click the wrench/screwdriver icon next to the Profile.

Step 8c: Click the "Video Codec" tab and set your codec, bitrate, frame rate, and resolution. Click the "Audio Codec" tab and set your codec, bitrate, channels, and sample rate. If you want subtitles, click the "Subtitles" tab and go from there. Click Save

Step 9: Click Next

* If you want to add any special parameters that VLC did not ask, you may do so in the "Generated Stream Output String" area otherwise continue to Step 10.

Step 10: On "Generated Stream Output String", navigate to mux=ts and insert a comma and the following: sdp=file://C:\vlc.sdp

Step 11a: Click Stream

* If you checked "Device Properties" back in Step 5c then continue from here otherwise skip to Step 12.

Step 11b: Click the dropdown box under video standard and select NTSC_M_J. Click the Video Proc Amp tab and adjust any options to your liking. Click the Video Image tab and check "USB Audio" and "Ext Audio" if you want audio from the Dazzle or just leave it alone if you do not want audio from the Dazzle. Click OK

Step 11c: Click the dropdown box under Color Space / Compression and select YUY2. Click the dropdown box under Output Stream and select 640x480. Click OK

* If you want a decent quality stream, you may want to try and error for this one. Different settings may have different results.

Step 11d: Click OK

Step 11e: Make sure "2: Video Composite In" and "0: Video Decoder Out" (for no audio) or "1: Audio Decoder Out" (this allows audio for Dazzle to go through) are selected. Click OK

Step 12: Minimize VLC media player.

Step 13: Download JTVLC if you haven't done so: http://apiwiki.justin.tv/mediawiki/index.php/VLC_Broadcasting_API#Download (Do not install or anything, just extract it if necessary)

Step 14: Open Command Prompt (Start -> All Programs -> Accessories -> Command Prompt or Start -> Run -> cmd)

* In command prompt, you will need to input 4 parameters: jtvlc.exe file path, username, stream_key, and the sdp file

Step 15: Your JTVLC.exe file path. Put " (quotation marks) before and after the file path. Should look something like this. "C:\User\Desktop\jtvlc-win-0.41\jtvlc.exe" and put a space after.

Step 16: Your username. Then put a space after.

Step 17: Your stream_key. You can find your stream key here: http://www.justin.tv/broadcast/advanced (It is enclosed by an orange rectangle. It is also important that no one knows this stream_key besides yourself.) and put a space after.

Step 18: Your sdp file path. Whatever file path you set back in Step 10 is the same file path, without the sdp=file:// part. Should look something like this. C:\vlc.sdp

* All together, it should look something like this: "C:\User\Desktop\jtvlc-win-0.41\jtvlc.exe" username live_41943127_F58Ens35FwQ9 C:\vlc.sdp

** If you're going to be broadcasting with VLC/JTVLC frequently then you can input all 4 parameters into Notepad, save it as a batch file, *.bat, then you can just double click the batch file and it will input everything on command prompt and launch command prompt automatically for you instead of you manually having it to do it every time and you can skip steps 14 to 19 if you need to refer to this tutorial again.

Step 19: Hit Enter. Wait about 10 seconds for something to popup. You should get the creator of JTVLC, the version, and the homepage. After all that, continue waiting until you get "Connected to Wowza successfully."

* If you are getting an error code, check this page for what could be wrong: http://apiwiki.justin.tv/mediawiki/index.php/VLC_Broadcasting_API#Jtvlc and then go back to Step 14 and continue from there with the new changes and try again otherwise continue to the last step.

Step 20: Once doing so, you should be broadcasting to Justin.tv now. Check your broadcast just to make sure everything is running smoothly. If you are getting some color lines then go back to Step 5 and do Step 5b if you didn't do it before.

Special thanks to nxarmada for helping out with VLC problems.

Pooyan
03-02-2010, 01:22 AM
I can get through all the steps pretty easily, and I am connected Wowza successfully; however, when I check my channel, its continually says 'Trying to find the Stream'

I am using WebCamMax 7.0.8.8 and Windows 7

secretply
03-02-2010, 08:50 AM
I can get through all the steps pretty easily, and I am connected Wowza successfully; however, when I check my channel, its continually says 'Trying to find the Stream'

I am using WebCamMax 7.0.8.8 and Windows 7

Your CPU might not handle seeing your channel as well as broadcasting which is why you get the "Trying to find the stream." Sometimes I have to wait about 3 minutes before the channel appears (and my computer is in really bad shape anyways). You can always check the archives as the broadcasts goes to there. If you see nothing on your archives then something went wrong, most likely with VLC.

hashbrowns
03-02-2010, 11:49 AM
Great tutorial, only part I don't get is the "file://C:\vlc.sdp" part, how do you create this?

secretply
03-02-2010, 01:39 PM
Great tutorial, only part I don't get is the "file://C:\vlc.sdp" part, how do you create this?

The SDP file is telling the computer some video stream information to stream on the Internet. You can find more information here: http://www.mc.maricopa.edu/other/media/streaming/howtostream.html

When you start streaming, the SDP file will automatically be created (or replaced if you already streamed before) and you should find it in the same path you specified.

Pooyan
03-02-2010, 03:07 PM
Your CPU might not handle seeing your channel as well as broadcasting which is why you get the "Trying to find the stream." Sometimes I have to wait about 3 minutes before the channel appears (and my computer is in really bad shape anyways). You can always check the archives as the broadcasts goes to there. If you see nothing on your archives then something went wrong, most likely with VLC.


The computer I am using is very new and pretty powerful. When I was using the Seetoo plugin it worked almost immediately. (Apparently, that no longer works) I have also used Flash with Webcammax. That worked, but the image was squished horizontally. I am sure there is some setting I need to tweak to fix that, but I was looking for other ways to broadcast...which lead me to this array.

I am sorry for my ignorance, but what/where is this archive you speak?

secretply
03-02-2010, 03:22 PM
The computer I am using is very new and pretty powerful. When I was using the Seetoo plugin it worked almost immediately. (Apparently, that no longer works) I have also used Flash with Webcammax. That worked, but the image was squished horizontally. I am sure there is some setting I need to tweak to fix that, but I was looking for other ways to broadcast...which lead me to this array.

I am sorry for my ignorance, but what/where is this archive you speak?

http://www.justin.tv/username/archive

Replace username with your username then you can see your past broadcasts on there (up to 7 days).

hashbrowns
03-10-2010, 03:10 AM
The SDP file is telling the computer some video stream information to stream on the Internet. You can find more information here: http://www.mc.maricopa.edu/other/media/streaming/howtostream.html

When you start streaming, the SDP file will automatically be created (or replaced if you already streamed before) and you should find it in the same path you specified.

While I must thank you for that, it really didn't help, ok I understand now what it does. But how do I stream it so it'll save in the first place? Bare in mind I've never used VLC nor can I specify a file path for the .sdp file because I don't have one to begin with

EDIT:
I manually created the sdp file in the specified path. But now I get a fucking error saying it's empty?! Seriously, does anyone know how to fix this beause noone on the internet seems to know at the moment? Also, can you just stream the files from VLC media files than having the visual come from another source i.e. WebcamMax + vhscrcap etc.?

Joe33345678
03-11-2010, 02:19 PM
ok now I got jtvlc working mostly. it creates the sdp file fine and it broadcasts, but when I run my capture card in any resolution on YUV2 or RGB24 it encodes like the top half of the screen, this is on H264, and the rest of the screen bleeds. If you want me to I can give you a demonstration sometime to show you what I mean.

I wanna get this working because it looked epic in H264 on VLC :D

also a note to add. I did try and display it locally upon streaming to rtp protocol, and the screen displayed locally is frozen. it encodes like 1 frame but nothing happens. but if I go to the stream www.justin.tv/joe33345678 after I enabled jtvlc, the broadcast is running 30fps but like I said, bleeding screen. any other encoder I attempt to try with this setup does not work at all.

secretply
03-11-2010, 03:10 PM
ok now I got jtvlc working mostly. it creates the sdp file fine and it broadcasts, but when I run my capture card in any resolution on YUV2 or RGB24 it encodes like the top half of the screen, this is on H264, and the rest of the screen bleeds. If you want me to I can give you a demonstration sometime to show you what I mean.

I wanna get this working because it looked epic in H264 on VLC :D

also a note to add. I did try and display it locally upon streaming to rtp protocol, and the screen displayed locally is frozen. it encodes like 1 frame but nothing happens. but if I go to the stream www.justin.tv/joe33345678 after I enabled jtvlc, the broadcast is running 30fps but like I said, bleeding screen. any other encoder I attempt to try with this setup does not work at all.

I looked at your archives and I see what you mean. Unfortunately I don't know how to resolve it, it could be a bad AV cable but I'm no where near an expert in this field. I have to say your Xbox 360 gaming quality is a lot better than mine.

secretply
03-11-2010, 03:19 PM
While I must thank you for that, it really didn't help, ok I understand now what it does. But how do I stream it so it'll save in the first place? Bare in mind I've never used VLC nor can I specify a file path for the .sdp file because I don't have one to begin with

EDIT:
I manually created the sdp file in the specified path. But now I get a fucking error saying it's empty?! Seriously, does anyone know how to fix this beause noone on the internet seems to know at the moment? Also, can you just stream the files from VLC media files than having the visual come from another source i.e. WebcamMax + vhscrcap etc.?

Did you do Step 10? When you put sdp=file://C:\vlc.sdp and start streaming, it will create it for you automatically. You don't/shouldn't need to do it manually. If you have it manually, delete it then let it do it automatically once you're past Step 11. Make sure you're looking in the right file path (Local Disk C: -> vlc.sdp or if you specified somewhere else).

Joe33345678
03-11-2010, 05:41 PM
Question, I noticed the Encapsulation Method before Video and Audio Codec, now does that have to be on Mpeg-Ts for this to work correctly? I figured yes because I tried every other one to no avail but you never added that into the tutorial, just a heads up :)

also you don't have to delete mux-ts in the command line if you just add in sdp=file://C:\vlc.sdp by adding it in between commas, example

Original Line
:sout=#transcode{vcodec=h264,vb=500,fps=30,scale=1 ,acodec=mp4a,ab=96,channels=2,samplerate=44100}:rt p{dst=127.0.0.1,port=1234,mux=ts}

New Line
:sout=#transcode{vcodec=h264,vb=500,fps=30,scale=1 ,acodec=mp4a,ab=96,channels=2,samplerate=44100}:rt p{dst=127.0.0.1,port=1234,mux=ts,sdp=file://C:\vlc.sdp}

I added in sdp=file://C:\vlc.sdp into the brackets without removing mux=ts and just adding a comma right after mux=ts. It still works fine either way.

I am gonna investigate with this further since I don't have to remove mux=ts anymore and see if the other Encapsulations work, that may fix my H264 bleeding encoding glitch

secretply
03-11-2010, 06:20 PM
Question, I noticed the Encapsulation Method before Video and Audio Codec, now does that have to be on Mpeg-Ts for this to work correctly? I figured yes because I tried every other one to no avail but you never added that into the tutorial, just a heads up :)

also you don't have to delete mux-ts in the command line if you just add in sdp=file://C:\vlc.sdp by adding it in between commas, example

Original Line
:sout=#transcode{vcodec=h264,vb=500,fps=30,scale=1 ,acodec=mp4a,ab=96,channels=2,samplerate=44100}:rt p{dst=127.0.0.1,port=1234,mux=ts}

New Line
:sout=#transcode{vcodec=h264,vb=500,fps=30,scale=1 ,acodec=mp4a,ab=96,channels=2,samplerate=44100}:rt p{dst=127.0.0.1,port=1234,mux=ts,sdp=file://C:\vlc.sdp}

I added in sdp=file://C:\vlc.sdp into the brackets without removing mux=ts and just adding a comma right after mux=ts. It still works fine either way.

I am gonna investigate with this further since I don't have to remove mux=ts anymore and see if the other Encapsulations work, that may fix my H264 bleeding encoding glitch

The encapsulation is pretty much based on your profile selection. I did not mention this because I stated that if you wanted to customize encapsulation, video, audio, etc. then you can continue otherwise skip to next step.

Yes, adding ,sdp=file://C:\vlc.sdp will still work either way. I don't know if removing mux=ts has much to do with anything, I updated the tutorial with it still in but I'll check with someone about mux=ts tomorrow. Thank you for the reply.

Joe33345678
05-18-2010, 08:06 PM
kinda 2 months late but I thought I'd add this, I tested movies as well for the heck of it and it does the same exact bleeding effect to the movies as well. so it is definately the encoder doing this but jtvlc will not accept any other codec :(. im gonna see if I can get the video to display on my end in a preview window before it hits jtvlc. It might be jtvlc itself causing the problem

EDIT: just tested it, the problem is with vlc itself. the output on vlc is in grey but the video pops up sorta on justin tv with bleeding video. no matter what resolution I have it set to. sounds like its all vlc's fault :(

tronic24
06-06-2010, 02:14 AM
im trying to stream avi files on my computer to my jtv channel. i followed all these steps but when i run command prompt i get error 102. all directions were followed and all file pathways are correct. my only problem is vlc isnt creating the SDP file so it cant find it. anyone know how to help me?:mad::eek::(:mad:


Step 1: Connect your video and audio devices to your computer

Step 2: Open VLC media player or download it if you haven't: http://www.videolan.org/vlc/

Step 3: Click Media -> Streaming

Step 4: Click the "Capture Device" tab.

Step 5a: On the video drop down box, select your video device you wish to use. On the audio drop down box, select your audio device you wish to use.

*If you're using a Dazzle then go to Step 5b and continue from there otherwise skip to Step 6.

Step 5b: Click Advanced Options.

Step 5c: Again, select the same video and audio devices under the drop down boxes. Check "Device Properties" and click OK

Step 6: Click Stream

Step 7: Click Next

Step 8a: Click the drop down box and select RTP and click Add. On "Address", type 127.0.0.1 and on "Port", type 1234

* If you want to customize your encoding settings (like video bitrate, resolution, audio bitrate, etc.) then go to Step 8b and continue from there otherwise skip to Step 9.

Step 8b: Check "Activate Transcoding" if it isn't already. Select your Profile that is best suited to you and click the wrench/screwdriver icon next to the Profile.

Step 8c: Click the "Video Codec" tab and set your codec, bitrate, frame rate, and resolution. Click the "Audio Codec" tab and set your codec, bitrate, channels, and sample rate. If you want subtitles, click the "Subtitles" tab and go from there. Click Save

Step 9: Click Next

* If you want to add any special parameters that VLC did not ask, you may do so in the "Generated Stream Output String" area otherwise continue to Step 10.

Step 10: On "Generated Stream Output String", navigate to mux=ts and insert a comma and the following: sdp=file://C:\vlc.sdp

Step 11a: Click Stream

* If you checked "Device Properties" back in Step 5c then continue from here otherwise skip to Step 12.

Step 11b: Click the dropdown box under video standard and select NTSC_M_J. Click the Video Proc Amp tab and adjust any options to your liking. Click the Video Image tab and check "USB Audio" and "Ext Audio" if you want audio from the Dazzle or just leave it alone if you do not want audio from the Dazzle. Click OK

Step 11c: Click the dropdown box under Color Space / Compression and select YUY2. Click the dropdown box under Output Stream and select 640x480. Click OK

* If you want a decent quality stream, you may want to try and error for this one. Different settings may have different results.

Step 11d: Click OK

Step 11e: Make sure "2: Video Composite In" and "0: Video Decoder Out" (for no audio) or "1: Audio Decoder Out" (this allows audio for Dazzle to go through) are selected. Click OK

Step 12: Minimize VLC media player.

Step 13: Download JTVLC if you haven't done so: http://apiwiki.justin.tv/mediawiki/index.php/VLC_Broadcasting_API#Download (Do not install or anything, just extract it if necessary)

Step 14: Open Command Prompt (Start -> All Programs -> Accessories -> Command Prompt or Start -> Run -> cmd)

* In command prompt, you will need to input 4 parameters: jtvlc.exe file path, username, stream_key, and the sdp file

Step 15: Your JTVLC.exe file path. Put " (quotation marks) before and after the file path. Should look something like this. "C:\User\Desktop\jtvlc-win-0.41\jtvlc.exe" and put a space after.

Step 16: Your username. Then put a space after.

Step 17: Your stream_key. You can find your stream key here: http://www.justin.tv/broadcast/advanced (It is enclosed by an orange rectangle. It is also important that no one knows this stream_key besides yourself.) and put a space after.

Step 18: Your sdp file path. Whatever file path you set back in Step 10 is the same file path, without the sdp=file:// part. Should look something like this. C:\vlc.sdp

* All together, it should look something like this: "C:\User\Desktop\jtvlc-win-0.41\jtvlc.exe" username live_41943127_F58Ens35FwQ9 C:\vlc.sdp

** If you're going to be broadcasting with VLC/JTVLC frequently then you can input all 4 parameters into Notepad, save it as a batch file, *.bat, then you can just double click the batch file and it will input everything on command prompt and launch command prompt automatically for you instead of you manually having it to do it every time and you can skip steps 14 to 19 if you need to refer to this tutorial again.

Step 19: Hit Enter. Wait about 10 seconds for something to popup. You should get the creator of JTVLC, the version, and the homepage. After all that, continue waiting until you get "Connected to Wowza successfully."

* If you are getting an error code, check this page for what could be wrong: http://apiwiki.justin.tv/mediawiki/index.php/VLC_Broadcasting_API#Jtvlc and then go back to Step 14 and continue from there with the new changes and try again otherwise continue to the last step.

Step 20: Once doing so, you should be broadcasting to Justin.tv now. Check your broadcast just to make sure everything is running smoothly. If you are getting some color lines then go back to Step 5 and do Step 5b if you didn't do it before.

Special thanks to nxarmada for helping out with VLC problems.

Drinkydrinkyfightfight
06-10-2010, 09:15 PM
This absolutely did not work at all....

Drinkydrinkyfightfight
06-13-2010, 09:23 PM
Step 11 makes no sense at all, jibberish to me.

azed
07-29-2010, 01:04 PM
Salut desolé si je parle en francais je vais essayer de traduire apres.

j'ai bien suivis tout les etape correctement, j'ai pris la key du lien http://fr.justin.tv/broadcast/advanced je lance la diffusion et clic sur mon fichier.bat ca a l'aire de fonctionner avec le message connected to wouza successfully mais rien ne se passe sur ma chaine chez justin tv.

Quel peut etre l'erreur s'il vous plait.

Ps : en créant le fichier.bat, j'y ai bien mis mon nom et la clé qui été générée dans la page http://fr.justin.tv/broadcast/advanced

merci

3lood
09-08-2010, 12:09 PM
I don't know why the command doesn't let me get an .sdp file.
step 11 is confusing to me as well.

anti
11-16-2010, 08:02 PM
So, after probably half a day of messing around with this I finally got it to stream to jtv. So I'll give a run down of the problems I encountered. My intent was to stream my desktop using VLC screen:// and encoding that to H.264 for jtvlc.

First, I couldn't get the sdp file to create properly. After messing around for a long time I eventually stumbled upon a suggestion of using 3 forward slashes, like this: sdp=file:///C:\vlc.sdp. This is either the case for newer versions of VLC or VLC 1.1.1 (the version I was using at the time.)

So, I finally got VLC to output an sdp file, yet nothing would stream to my channel after successfully connecting. I assumed it was either a problem with jtvlc or my encoding. Since I could do something about one of them, I tried to display the output locally in VLC. No matter what transcoding combination I used the stream would never output locally.

So, I finally downgraded VLC to 1.0.1 (the version jtvlc says *works*). I didn't need 3 forward slashes, and the transcoding combination I wanted to use just worked.

If anyone is having trouble I suggest using this version of VLC. I have yet to try the latest stable VLC build (1.1.5) but yeah, I figured I should post this in case anyone was still having trouble. It may be a solution.

*Edit* I forgot to mention, you can find older versions of VLC here: http://www.oldapps.com/VLC_Player.php OR just search "old apps" in google in case this forum censors links.

klawdek
01-12-2011, 07:26 PM
Step 10) The string mux=ts does not exist so I added the other string at the end.

Step 17) No Steam key at :http://www.justin.tv/broadcast/advanced it is a page about broadcasting PC games. Why would the stream key be on a public page? If the stream key is available it would be more likely to be in one's account page (It is not there either)

klawdek
01-13-2011, 04:47 AM
Well I found the stream key in the XML file that I DLed initially with FME.

There is more than one RTP selection in VLC you have to pick the one for MPG to get the mux=ts thing so you can add the sdp=file:///C:\vlc.sdp

You have to put 3 slashes in the sdp thing or it does not work.

This tutorial could use a little polishing up, but is a good start.

I apologize for the negative stuff I said.

Rapsody10
01-13-2011, 05:09 AM
@klawdek
This tutorial is very poorly written, is missing many crucial steps and grossly inaccurate.
if you believe that is the case , please by all means make one better yourself
I'm sure everyone will appreciate it , just create a new thread and if is good I will stick it

Raps

klawdek
01-13-2011, 06:42 AM
You are right. I was too harsh on the tutorial. Perhaps someday if I ever get any better at this stuff I will with secretply's permission, attempt to polish this one up a bit

kevinvdburgt
02-01-2011, 08:53 AM
The file vlc.sdp wont appear on my C disk. It still does not exists.

tasty.donuts
02-05-2011, 09:42 PM
I'm trying to do this from a Mac and because I'm new to the VLC interface for this am having a bit of trouble because the VLC software is asking for a "Channel Name" and an "SDP URL". I can't crack what path goes where, anyone figure this out? Thanks for the tutorials.

Gazzamc
04-01-2011, 09:25 AM
For anybody having trouble with the sdp file... here's how to get it to create in version (1.1.6) and maybe the latest (1.1.8) didn't test it yet.

Simply change the slash direction from:

sdp=file://C:\vlc.sdp

to this and add a 3rd to file:

sdp=file:///C:/vlc.sdp

do the same thing in cmd:

from:

C:\vlc.sdp

to:

C:/vlc.sdp

works like a charm ;)

Edit: This works on 1.1.8 also... Good luck with your broadcasts..

also just a heads up i was unable to create a sdp file in the path:

C:/vlc.sdp

but once i changed it to my desktops path

C:/Users/Username/Desktop/vlc.sdp

it created no problem. (dnt no if this was just my pc or what, win7 btw)..

Redbullsnation
04-03-2011, 09:54 AM
cool, m8
thx i'll try it

EDIT: YES, it works!!!

hazmyr
04-06-2011, 10:57 AM
nice tut, thanks man.

eycel
04-15-2011, 03:31 PM
Hi, Iv goton to the point where I got my stream up and running my movies. When Its streamings though, the movie skips like every 10 seconds, it completely stops then starts again. Are there any settings that can be changed that can help mend it?