Intentional 30 second video delay

About encoding, codec settings, muxers and filter usage
aeromark
New Cone
New Cone
Posts: 3
Joined: 03 Mar 2005 16:53

Intentional 30 second video delay

Postby aeromark » 03 Mar 2005 17:07

Hi,

Newbie question:

I want to use a digital camcorder and a laptop connected by firewire as a coaching aid in my judo club.

Idea is that people practice technique in practice area, wander across to the viewing area and can then look at what they did. The video playback is delayed by 30 seconds for example.
Whilst they are viewing themselves, the next group of people can practice their technique. Thereby making the most use of the equipment and everyone's time.

Can VideoLAN streaming do this for me?
Am I barking up the wrong tree?
Is it too heavyweight for what I want to do?

How do I avoid filling the spare 20GB partiton I have available?


Any help is greatly appreciated.

Mark

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 03 Mar 2005 20:09

Yes, you can set caching (buffer length) at 30000 (milliseconds) to achieve a 30 second delay.

Need to know what opearting system you are using, what version of VLC..

As to disk capacity, you don't have to store any of it, if you don't want to -- the 30 sec delay can be inserted in the live feed, by VLC, either at the server input (the thing getting the data from the camera) or the client.

To give you a feel for disk use, 1 Mbps (really good quality mpeg4 video, full 30 frames per second, 640x480 resolution) would use 10 gigabytes per day (24 hours worth of recording). In other words, if you start a VLC stream, have a second copy of VLC running, storing to file, a two hour long class would only tak 2/24 x 10 = about 800 megabytes. The utilization is directly proportional to number of pixels -- if you start with a 320x240 pixel source, instead of 640x480, change to 256 kbps mpeg4, and a 2hour class would only take about 200 megabytes.

You could have the 30 second "tape delay" for immediate review, then go back to the file-copy for after-class review.

aeromark
New Cone
New Cone
Posts: 3
Joined: 03 Mar 2005 16:53

Postby aeromark » 07 Mar 2005 15:35

This sounds like just what I need.

In terms of OS, I'm currently using XP Home Edition SP2, but slapping a copy of Linux onto it is trivial.
I haven't downloaded or played with VLC yet. I wanted to make sure it'll do what I want before installing and RTFM.

I particularly like the ability to review afterwards.
I'll dive into the web pages and see how I get on. Any tips for techie to speed up the install/config process?

Thanks

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 07 Mar 2005 18:58

No hints. I use Windows XP, both USB Webcam and Osprey framegrabber, and they work fine.

Nothing against Linux at all, but I wouldn't bother changing the OS unless you just personally wanted to use Linux. If you do go the Linux route, you might want to check on the videolan Internet Relay Chat, see what's popular with the Linux devs -- I do know that some flavors of Linux seem to do better than others, in terms of the quantity of questions.

If the laptop is even moderately beefy, you should be able to both view locally, with the 30 second delay, plus stream the input to file.

For Windows, Mac, and I believe BEOS, there are nightly builds available, latest functionality.

Guest

Postby Guest » 08 Mar 2005 16:26

Thanks for the advice. I've got it streaming with a USB webcam with a configurable delay. Just what I wanted.

I'm hoping a DV/Firewire linked camcorder will behave the same.

I'm only starting one VLC process which is configured to display locally.
I've tried getting it to record at the same time as streaming to the local display but without much joy.
I then tried storing the file locally without displaying or streaming it locally and couldn't get it to work properly that way.

In order to display on the local display and save on the local disk, do I need to start two copies of VLC and have one as a server (streaming the video) and the other as a client which will display and save at the same time.

Any chance somebody can give me the command line options I need to get local display and save to a file?

Ta,
Mark

PS the wallpaper option is kinda neat.

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 08 Mar 2005 17:30

Using Windows, the default wxwindows user interface:

Select the thing you want to watch, whether a file or a Dshow camera input.
(File -- Open). If you are doing the camera output, please make sure to set the Audio device to "none".

Click the "Caching" button and type in 30000 to turn on a 30 second delay. This just tells the app to create a 30 second input buffer.

On the Open page, click the Stream Output" checkbox, then press Settings, which opens a Stream Output window.

On the stream output Window, select Play Locally.
Also select File, and type in a valid name -- say, c:\temp\testfile.asf.

Down in Encapsulation method, you have to pick a valid mechanism -- in this case pick ASF.

Under Transcoding options, click Video, and select DIV3 from the dropdown box. The default, 1024 kbps, is quite decent, you could probably cut it to 756K if you felt like it.

Press OK to exit the Stream Output window.

Press OK to exit the Open window. VLC should start displaying.

I normally use the latest nightly builds, rather than the 0.8.1 release -- enhanced functionality and bug fixes.

aeromark
New Cone
New Cone
Posts: 3
Joined: 03 Mar 2005 16:53

Postby aeromark » 15 Mar 2005 11:16

Thanks for your input and your instructions. They worked really well.

I got it working using one of the nightly builds and trialled it at my judo club last night. It ran continously for three and a half hours with a 30 second delay and I recorded it all in ASF format.

Unfortunately the ASf files appear to be corrupt when viewing with WMP or IrfanPlugins or Quicktime, but that is something to work on.

It's odd that I could only get it to stream properly if I streamed to a local file in ASF format as well as display locally. It wouldn't work just displaying locally and complained about the fifo buffer not being emptied quick enough if I tried to cache more that 14 seconds.

Thnaks,
Mark

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 15 Mar 2005 21:58

A "vanilla" setting would be:
On the Dshow Input tab, as well as selecting the Video device, do a Refresh next to Audio device and select one from the dropdown list. If you actually plug a mic in, it'll record, otherwise you'll just have a blank audio channel.
If you really don't want any audio, you need to explicitly set your Audio device to None. I am not positive about if the resulting output would then be OK in general (should be, just not sure).

Assuming you did pick an audio device, then on the Stream Output page:
Filename whatever.asf
Encapsulation ASF
Video CODEC DIV3 1Mbps
Audio CODEC MP3 192K

You can probably cut the DIV3 to 768K, and the audio to 96 or 128K wihtout issue.

If you have the original 3-1/2 hour file, want to try to make it WMP-compatible, I would try streaming it from one copy of VLC, then have a second copy of VLC act as a client. Tell the second copy to do a Stream Output, using the settings I gave above.

hobokengolf
New Cone
New Cone
Posts: 7
Joined: 19 Jan 2009 21:47

Re: Intentional 30 second video delay

Postby hobokengolf » 19 Jan 2009 22:46

I'm not sure what the etiquette is for old threads but I am looking to do EXACTLY what is described here...

I've followed the instructions - but for whatever reason I can not get this to work properly with any cache/delay beyond 3500 (3.5 seconds). Once I set it to more than 3.5 seconds I wind up getting a cycle of 2 seconds video, 2 seconds pause (give or take) which is unusable for my application.


Thanks in advance for any suggestions,


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 15 guests