Go Back   Winamp Forums > SHOUTcast > SHOUTcast TV / Nullsoft Video

Reply
Thread Tools Search this Thread Display Modes
Old 7th June 2004, 22:52   #1
hrst
Junior Member
 
Join Date: Jun 2004
Location: Finland
Posts: 5
Mixing live and pre-encoded video

Hi!

Is there any way (or program) to stream live video and pre-encoded video without having the clients to reconnect? This way:

1. First broadcast some nsv file.
2. Then broadcast live video.
3. Then broadcast some other nsv file.
And so on.

If I stop broadcasting an nsv file, server stops streaming. If I then start broadcasting live video, everyone has to click play button again. I tried to make a playlist including the same ;stream.nsv file again and again, but WinAmp doesn't understand to stop playback when the source gets disconnected.

Of course, it would be fantastic to get the pre-encoded files and live source change smoothly, but even the automatic reconnecting of every client would be fine.

(I hope this is not asked before. I have been reading this forum quite a long time, and I think I've read almost every thread interesting me even a bit.)

Great software (Winamp, Shoutcast server, encoding and broadcasting tools, VP codecs...) and great forum . A big praise to all developers .
hrst is offline   Reply With Quote
Old 7th June 2004, 23:22   #2
sankt
Moderator
 
sankt's Avatar
 
Join Date: Apr 2003
Location: SCVI . NET
Posts: 2,834
I think I remember some one trying something like like this with camtasia - or some other screen caputre software.

Basically you capture what is currently playing on your desktop screen. That is where you can switch from live to video file.
sankt is offline   Reply With Quote
Old 8th June 2004, 11:29   #3
hrst
Junior Member
 
Join Date: Jun 2004
Location: Finland
Posts: 5
Thanks for a quick reply!

What I want is to pre-encode video files using the slowest mode and 2-pass encoding to achieve the best quality. In addition, that kind screen capturing software takes up CPU resources too much -- it's not possible to achieve 25 FPS on my Athlon XP 2400+, I think. (Video capturing with capture card, rendering the captured video to screen, capturing the screen, encoding it -- that's too much to be done in real-time on my PC.)

So I want to encode only the live parts, having the nsv files just broadcast (like nsvscsrc.exe does).

My current procedure allows me to mix video files and live videos but not with the very best quality (the difference is quite visible at 300 kbps): this computer has a video capture card and an another computer has a VGA->s-video converter. This way I can change signals using an analog video switching box (of course a video mixer would be cool -- but expensive). I have attached a drawing that describes my current system.

Though, extra D/A and A/D conversions and faster real-time encoding result in 200kbps-like video at 300 kbps. That's
the problem, and I think it can be solved only in two ways:

1) A system that allows to change between live encoder (eg. nsvenc.exe) and "pseudo live" broadcaster (eg. nsvscsrc.exe) smoothly (just like nsvscsrc does with multiple files),

or

2) A system that makes Winamp client realize that the source has disconnected and stop playback, moving to the next item in the playlist.
Attached Images
File Type: gif my_current_system.gif (7.8 KB, 236 views)
hrst is offline   Reply With Quote
Old 8th June 2004, 23:23   #4
hrst
Junior Member
 
Join Date: Jun 2004
Location: Finland
Posts: 5
Yay! I made it! I'm stupid, why didn't I read the server configuration file:

; AutoDumpUsers controls whether listeners are disconnected if the source
; stream disconnects. The default is 0.
AutoDumpUsers=1

Now I can use "the solution number 2":

"2) A system that makes Winamp client realize that the source has disconnected and stop playback, moving to the next item in the playlist."

I hope this would help someone in the same trouble.
hrst is offline   Reply With Quote
Old 8th June 2004, 23:50   #5
sankt
Moderator
 
sankt's Avatar
 
Join Date: Apr 2003
Location: SCVI . NET
Posts: 2,834
Great Find !

I will add this information to www.scvi.net and credit you

You actually shouldnt have to change stuff around in the playlist. ( That would be a pain to do any way - constantly updating a playlist. )

Try this idea ...

Have NSVcap set up for live video feed and Kens GUI set up for streaming the video files. Switch between the two software programs to allow playing of live or video - with the default setting changed.

>Turn on NSVcap and turn off Kens GUI for live video fee.
>Turn on Kens GUI and turn off NSVcap for video files.

They will both point to the same shoutcast server - the only change will be live or recorded.

Or you could make a "hot" button for each file you want to stream. Create a batch file to activate the command line file streamer and link it to a particular file. Each individual "hot" button would be linked to a particual / individual file to be streamed.

Last edited by sankt; 9th June 2004 at 00:23.
sankt is offline   Reply With Quote
Old 9th June 2004, 00:39   #6
hrst
Junior Member
 
Join Date: Jun 2004
Location: Finland
Posts: 5
Oh, thank you a lot :)!

I can also attach the .bat files I'm using. I know everyone can make them without this help, but if I didn't put them here, my message would have no point in addition to "thank you" ;) :p.

configure.bat:
PHP Code:
set s_server=(server address here)
set s_port=8001
set s_portbase
=8000
set s_password
=(password here)
nsvenc /config 
encode_file.bat: (2-pass)
PHP Code:
@rem USAGEencode_file <source file> <destination directory> <destination filename (Winamp shows this as a title)>
nsvenc /config
nsvenc 
%%3
nsvenc 
/config
nsvenc 
%%3
mkdir 
%2
move 
%.%
broadcast_file.bat:
PHP Code:
nsvscsrc /titles /SC %s_server%:%s_portbase%:%s_password%:headers_without_password.txt /nb 1 %
broadcast_live.bat:
PHP Code:
nsvenc /cfgcap cap:0,0 sc:%s_server%:%s_port%:headers_with_password.txt 
headers_without_password.txt:
PHP Code:
content-type:video/nsv
icy
-metadata:0
icy
-name:My Test Server
icy
-genre:Video
icy
-pub:0
icy
-br:(the bitrate of the stream)
icy-url:(URL)
icy-irc:(IRC)
icy-icq:(ICQ)
icy-aim:(AIM)
icy-reset:
(headers_with_password.txt is just the same, but there's
your password in the first line, content-type comes in the second line.)

Pre-encoding:
> configure
(Select correct settings, first pass.)
> encode_file test.avi test My_test_video_title.nsv
(Select second pass).

Done!

Broadcasting:
> broadcast_file test

Done, it will broadcast the file until you press CTRL + C.

Broadcasting live:
> broadcast_live

Select capture settings and done!


And the playlist:
watch.pls:
PHP Code:
***91;playlist***93;
NumberOfEntries=100
File1
=http://yourserver.com:port/;stream.nsv
File2=http://yourserver.com:port/;stream.nsv
File3=http://yourserver.com:port/;stream.nsv
File4=http://yourserver.com:port/;stream.nsv
...
File100=http://yourserver.com:port/;stream.nsv 
Now I hope I haven't confused everyone with these scripts :). I use them personally, so they can be quite useless for other people. And sorry for my English too, it's night...
hrst is offline   Reply With Quote
Old 9th June 2004, 01:46   #7
sankt
Moderator
 
sankt's Avatar
 
Join Date: Apr 2003
Location: SCVI . NET
Posts: 2,834
Hey, this would be a easy weekend project for some one ...

Create a simple GUI that you can use to launch .bat NSV command line videos. Just like a video produciton board.

You would program each button with the location / name of the file to launch - and the gui itself could be programed to pass on the server information to all the buttons.

ip address
port number
pass word

You wouldnt have to program each button for the shoutcast server information, just the file name and directory location.

Label each button so that you can associate the button id with the file you want to be played.
sankt is offline   Reply With Quote
Old 12th June 2004, 02:18   #8
sankt
Moderator
 
sankt's Avatar
 
Join Date: Apr 2003
Location: SCVI . NET
Posts: 2,834
scvi.net updated with new information on changing between live and recorded files.

www.scvi.net/vid_switch.htm
sankt is offline   Reply With Quote
Old 12th June 2004, 02:39   #9
paradoxradio
Member
 
Join Date: Dec 2003
Posts: 71
might be worth looking at some third party software such as visualjockey (www.visualjockey.com) for some design ideas?

This is very similar to the stuff we use at live events, at the end of the day the only difference is is going on screens and not NSV.
paradoxradio is offline   Reply With Quote
Old 12th June 2004, 03:02   #10
sankt
Moderator
 
sankt's Avatar
 
Join Date: Apr 2003
Location: SCVI . NET
Posts: 2,834
Nice bit of information on that

I will add that to the software list.
sankt is offline   Reply With Quote
Reply
Go Back   Winamp Forums > SHOUTcast > SHOUTcast TV / Nullsoft Video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump