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 » 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

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 » 01 Nov 2009 05:52

kevin, that first command takes my stream and turns it into something an web based flash player can understand in real time. No flv file is created. It creates an http link to this: everydayjunglist.org:8081/stream.flv and then I have a webpage that points to it. I used to use the longtail video player but recently switched to flowplayer. You can see the source code by looking at the source code of this page for details http://www.everydayjunglist.org/edjtv.v2.html

That second command yes, does create a file for archival reasons. If you like.. check this out.. it was recorded tonight for a halloween special. http://radio.everydayjunglist.org/recor ... 1.2009.flv

hope that helps.

As for shoutcast. Your shoutcast server needs to be set up correctly. Meaning, a normal shoutcast install will work. No really mucking with shoutcast needs to be done. If you understand shoutcast, my commands on the first page of this thread will intergrate with shoutcast. :wink:

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

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

Postby kevin8161 » 02 Nov 2009 08:40

Great. Will give it a try. Thank you kdh!

Just heard that http streaming will be supported in the new flash player 10.1. Would that simplify everything? no more need for ShoutCast in the middle?

http://blogs.adobe.com/ktowes/2009/10/r ... ulti-.html

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 » 03 Nov 2009 00:45

the main reason why we use shoutcast is its a very popular format. so if you goto shoutcast.com and type drum and bass, or jungle, our radio stream will pop up. this enables random listeners to easily find us.

the problem with flash 10.1 is (i think) they charge a license fee tp use it... that and it only does flash.

with some tweaking, i can make vlc do all sorts of awesome stuff for me and i can do it for free.

dtm
New Cone
New Cone
Posts: 4
Joined: 02 Nov 2009 09:41

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

Postby dtm » 04 Nov 2009 17:54

the main reason why we use shoutcast is its a very popular format. so if you goto shoutcast.com and type drum and bass, or jungle, our radio stream will pop up. this enables random listeners to easily find us.

the problem with flash 10.1 is (i think) they charge a license fee tp use it... that and it only does flash.

with some tweaking, i can make vlc do all sorts of awesome stuff for me and i can do it for free.
is this also working with IceCast (Server) and NSV (for streaming the WebCam)?

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 » 05 Nov 2009 23:18

There are some threads to make it work with IceCast but I haven't had any reason to try. Same with NSV.. but NSV is pretty much unsupported and slowly dieing. Our site would have run NSV, but Flash seemed the better route.

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 = Work

Postby kdh » 29 Jun 2010 23:47

My How-To has NOT been tested with Shoutcast 2.0. Only Shoutcast 1.X.

Also..

If VLC drops support for Shoutcast, this How-to might be completely worthless anyway and I might have to switch completely to ICECast... which long term might not be a problem.

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 = Work

Postby Jean-Baptiste Kempf » 01 Jul 2010 01:08

No, the support removed is ONLY about Shoutcast Directory listing.
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 = Work

Postby kdh » 01 Jul 2010 02:56

Discovered a bug using VLC streaming to Shoutcast 2.X. Will create a new thread and post details.

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 = Work

Postby Jean-Baptiste Kempf » 01 Jul 2010 17:27

trac.videolan.org/
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.

Jackis
New Cone
New Cone
Posts: 5
Joined: 02 Jul 2011 00:34

Re: Stream to Shoutcast + Flash Player + Video + VLC = Work

Postby Jackis » 02 Jul 2011 01:06

Hello,
I wont to start a stream server and give some moderators apportunity to stream prepared video files.
The content should be available as a flash stream. Please help me to run VLC correctly.

Please give me some examples, how can I start the server and connect the video with streaming server.
Best regards!


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 9 guests