Stream to Shoutcast + Flash Player + Video + VLC = Working!

About encoding, codec settings, muxers and filter usage
kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 29 Jul 2009 03:31

old out dated information. no need to add confustion.
Last edited by kdh on 09 Sep 2009 19:59, edited 1 time in total.

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: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby Jean-Baptiste Kempf » 30 Jul 2009 13:46

Nice howto. Can you post it on the wiki?
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.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 31 Jul 2009 04:47

We are doing a live show with video! Check it out!

http://www.everydayjunglist.org/edjtv.v2.html

video looks crappy cause its a crappy webcam..

As for the how-to? Sure how do I go about doing it?

goodmax
New Cone
New Cone
Posts: 2
Joined: 25 Jul 2009 14:57

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby goodmax » 01 Aug 2009 16:50

I get very crappy video output with you settings even with vb=400.
I'm using my TV card as source and default resolution is 352x288. kdh Did you do any tweaking over vlc or ffmpeg/ffshow configuration to get it work properly ? There seems to be tons of options on both vlc and ffmpeg. If use vb=800 it eats too much bandwidth.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 06 Aug 2009 05:14

I get very crappy video output with you settings even with vb=400.
I'm using my TV card as source and default resolution is 352x288. kdh Did you do any tweaking over vlc or ffmpeg/ffshow configuration to get it work properly ? There seems to be tons of options on both vlc and ffmpeg. If use vb=800 it eats too much bandwidth.
Really it all depends on what you are doing and what you are willing to settle for. For us, it works well. I posted my info as a basic guide and as I update stuff, I post it here to make it better. I haven't mucked with the ffmeg/ffshow settings other then whats posted above. I seem to hit a level, with it for a few weeks, then muck with it again down the road. I noticed if I change my FPS rate to 30, and bump up my vb to something like 300 it looks much better, but then I start smashing my bandwidth limit.

You gotta understand, I'm trying to stream my video source and my shoutcast source to atleast 30+ something concurrent connections. Being djs, we'd rather have the audio sound better over the video. At the settings I'm currently running 20 something video users rolls in at around 2meg per second constant speeds. thank god im hosted out of a read data center. :lol:

feel free to use what i've posted as a framework, tweak it around and if you can get better results, please post them here. it'd really help the over all community.

best of luck.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 11 Aug 2009 03:03

old out dated information. no need to add confustion.
Last edited by kdh on 09 Sep 2009 19:59, edited 1 time in total.

ILEoo
Developer
Developer
Posts: 91
Joined: 05 Nov 2008 16:29

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby ILEoo » 11 Aug 2009 13:55

when streaming, you should try adding lower keyint value to x264, eg

Code: Select all

venc=x264{keyint=30}
that should help on that flash syncing issue on wait also.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 11 Aug 2009 22:07

That should go on the client side right?

Where would the venc=x264{keyinit=30} in my string? Something like this?

:sout=#transcode{vcodec=h264,vb=100,fps=30,scale=0.5,acodec=mp3,ab=96,channels=2,samplerate=44100,venc=x264{keyint=30}}:std{access=udp,mux=ts,dst=mywebsite.com:8777}

ILEoo
Developer
Developer
Posts: 91
Joined: 05 Nov 2008 16:29

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby ILEoo » 12 Aug 2009 13:36

That should go on the client side right?

Where would the venc=x264{keyinit=30} in my string? Something like this?

:sout=#transcode{vcodec=h264,vb=100,fps=30,scale=0.5,acodec=mp3,ab=96,channels=2,samplerate=44100,venc=x264{keyint=30}}:std{access=udp,mux=ts,dst=mywebsite.com:8777}
yes, like that. Also I think it's better to use width/height instead of scale (but thats pretty small issue).

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 12 Aug 2009 22:30

OK, I will test this tonight.

I noticed I've had to really bump up my --sout-mux-caching levels on the server side. If I do a vlc -vvv with my command, the output tells me something about waiting for SPS or something and takes a really long time for it to sync up, but it does.

I'm not sure if that makes sense. But I'll post the output to what I'm talking about later.

thanks for the help!

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 13 Aug 2009 06:32

OK, I will test this tonight.

I noticed I've had to really bump up my --sout-mux-caching levels on the server side. If I do a vlc -vvv with my command, the output tells me something about waiting for SPS or something and takes a really long time for it to sync up, but it does.

I'm not sure if that makes sense. But I'll post the output to what I'm talking about later.

thanks for the help!

Here is the messages I'm talking about:

[00000506] packetizer_h264 packetizer warning: waiting for SPS/PPS
[00000506] packetizer_h264 packetizer warning: waiting for SPS/PPS
[00000506] packetizer_h264 packetizer warning: waiting for SPS/PPS

I get a bunch of these, and then wham. it works.

[00000506] packetizer_h264 packetizer debug: found NAL_SPS (sps_id=0)
[00000506] packetizer_h264 packetizer debug: found NAL_PPS (pps_id=0 sps_id=0)
[00000430] main stream output debug: adding a new sout input (sout_input:0xb7514028)
[00000431] stream_out_transcode stream out debug: creating video transcoding from fcc=`h264' to fcc=`FLV1'

But it only works if I have that caching way high. What do you suggest, or is that not really a bad thing?
Last edited by kdh on 13 Aug 2009 06:35, edited 1 time in total.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 13 Aug 2009 06:33

That should go on the client side right?

Where would the venc=x264{keyinit=30} in my string? Something like this?

:sout=#transcode{vcodec=h264,vb=100,fps=30,scale=0.5,acodec=mp3,ab=96,channels=2,samplerate=44100,venc=x264{keyint=30}}:std{access=udp,mux=ts,dst=mywebsite.com:8777}
yes, like that. Also I think it's better to use width/height instead of scale (but thats pretty small issue).
is the keyinit=30 directly tied to the fps=30 setting? or can they be different?

ILEoo
Developer
Developer
Posts: 91
Joined: 05 Nov 2008 16:29

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby ILEoo » 13 Aug 2009 09:20

Keyint tell how many frames there are between keyframes, and on stremaing, it should be 1-2s to get reasonable fast start on viewing.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 13 Aug 2009 22:30

Keyint tell how many frames there are between keyframes, and on stremaing, it should be 1-2s to get reasonable fast start on viewing.
AH! So thats why I have to have my caching so high. K.. I don't know why it didn't click before, but when you said it.. I was like duh.

Most testing when I get home from work!

I'm also NOT going to use the .05 scale option anymore and move onto the size instead.

Thanks!

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 17 Aug 2009 23:58


server side i'm getting this message:

[00000587] mux_ts mux warning: packet with too strange dts (dts=3025523014894,old=3025523050972,pcr=3025523050972)

What can I do to resolve it?
anyone got any hints? 8)

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 18 Aug 2009 05:10

Live demo! 8/27/2009 10pm Cen time, till they quit.. http://www.everydayjunglist.org/edjtv.v2.html

let me know what you think.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 09 Sep 2009 19:54

MAJOR UPDATE 9/9/2009

Please see the very first post in this thread for details!

viewtopic.php?f=4&t=60947&p=203460#p203460

http://radio.everydayjunglist.org/recor ... 9.2009.flv <-- here is an example of it in action.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 10 Oct 2009 08:06

live streaming from a club.. wouldnt happen if we didn't have vlc!!

http://www.everydayjunglist.org/edjtv.v2.html

selten
New Cone
New Cone
Posts: 3
Joined: 15 Oct 2009 17:00

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby selten » 15 Oct 2009 17:36

Hi!, Im going to install a server for test vlc and transmit shoutcast to flash player, i'm going to folow your instructions.

I have a question, is it possible to create a second setram, but deferred (1,2 or 3 hrs back in time) from the original stream?

maybe saving a file, and stream it 1,2 or 3 hrs after the main stream has started?, does this file can be limited to be of some max size?

or maybe save many small files of x amount of minutes, and then stream them in order?

thankyou for your support, i'll be working on this proyect and i´ll share the results as i get them.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 16 Oct 2009 00:13

I would guess you'd have to save a file and then start a 2nd vlc server to read that file 1 or 2 hours after you started recording to it.

its something you'll have to mess with and test. You'd have to script it all. I do everything on linux so most of my scripting is done in bash or perl depending on what i'm doing.

max size of file is really dependent on the OS. Like ulimit sizes are around 2gigs, but you can over ride them.

what os are you running?

selten
New Cone
New Cone
Posts: 3
Joined: 15 Oct 2009 17:00

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby selten » 16 Oct 2009 01:25

I´m going to install a new one, so I can choose from all of them W32 or Linux wich I like the most.

I been thinking about this idea, and I think I have some solution for it, I need only to mount the server and start streamming to it, and saving to files.

I'm not an expert about Linux programing, if I need some help I´'ll be back asking for it, or some clue to solve it.

right now i'll install the OS, and the last VLC version, what do U suggest to install extra? shoutcast server, flash setram server, wowzamedia?

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 17 Oct 2009 01:05

im only using vlc and shoutcast server.

i do all my server side stuff on linux.. client is windows. I can give you some basic hints when it comes to perl or shell scripting, but i don't have any full on code to share.

best of luck.

selten
New Cone
New Cone
Posts: 3
Joined: 15 Oct 2009 17:00

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby selten » 17 Oct 2009 20:32

Thankyou very much for your support, i'll post any advance i got to share it, maybe I can give back something withg this proyect.

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kdh » 17 Oct 2009 22:27

be sure to create your own thread as lots of people would love to see how its done. =)

kevin8161
New Cone
New Cone
Posts: 4
Joined: 28 Oct 2009 22:33

Re: Stream to Shoutcast + Flash Player + Video + VLC = Working!

Postby kevin8161 » 31 Oct 2009 04:10

Hello kdh,
Thanks for sharing. I have a few questions:
In this command, I connect back to 127.0.0.1:9070 and turn it into something that a Flash Based Video player can understand and stream to my website.

vlc --freetype-font=/usr/share/vlc/skins2/fonts/FreeSans.ttf --sub-filter=marq --marq-size=20 --marq-position=9 --marq-marquee="Live: $showname" http://localhost:9070 --sout-mux-caching 45000 --sout-ffmpeg-qmin=10 --sout-ffmpeg-rc-buffer-size=20000 --sout-ffmpeg-qmax=30 --sout-ffmpeg-qscale=1 --sout-ffmpeg-luma-elim-threshold=-4 --sout-ffmpeg-chroma-elim-threshold=7 --sout "#transcode{vcodec=FLV1,acodec=mp3,vb=100,ab=64,sfilter=marq}:std{access=http,mux=ffmpeg{mux=flv},dst=everydayjunglist.org:8081/stream.flv}" --daemon
What is the outcome of this command? A flv file get generated?

Similarly,
n this command, I connect back to 127.0.0.1:9070 and turn it into something that a Flash Based Video player can understand and save the in coming audio and video to file.

vlc --freetype-font=/usr/share/vlc/skins2/fonts/FreeSans.ttf --sub-filter=marq --marq-size=20 --marq-position=9 --marq-marquee="Prerecorded: $showname" http://localhost:9070 --sout-mux-caching 45000 --sout-ffmpeg-qmin=10 --sout-ffmpeg-rc-buffer-size=20000 --sout-ffmpeg-qmax=30 --sout-ffmpeg-qscale=1 --sout-ffmpeg-luma-elim-threshold=-4 --sout-ffmpeg-chroma-elim-threshold=7 --sout "#transcode{vcodec=FLV1,acodec=mp3,vb=160,ab=96,sfilter=marq}:std{access=file,mux=ffmpeg{mux=flv},dst=./myrecording.flv --daemon
Does it generate a file "/myrecording.flv"?
How do I receive it by using flash form the client browser? Just point to the flv file generated here?

All your commands are about vlc, is there anything need to done for the ShoutCast server?

Looks promising and I am getting ready to try out!

Thanks a lot!
Kevin


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 35 guests