Page 1 of 1

Play a video that is being captured...

Posted: 01 Jan 2006 00:01
by TaskyZZ
Is there a way to play a video while it is being captured to file?

For instance, I set a capture streaming to file, then I want to start another VLC instance and start playing the video. It doesn't work. I am wondering if there is a way to set the capturing instance to open the file not locked, so other instances of the player can begin playing the file. Or maybe I am just looking at this all wrong.

Posted: 02 Jan 2006 03:09
by TaskyZZ
Ah...

I figured out you can do it if you use encapsulation method MPEG TS or PS.

Why this is, I am unsure. Is there anyone that can explain it to me? :)

Re: Play a video that is being captured + problems dft inter

Posted: 03 Jan 2006 17:15
by Luxnews
Is there a way to play a video while it is being captured to file?

For instance, I set a capture streaming to file, then I want to start another VLC instance and start playing the video. It doesn't work. I am wondering if there is a way to set the capturing instance to open the file not locked, so other instances of the player can begin playing the file. Or maybe I am just looking at this all wrong.
----------------

Yes, there IS YOU CAN DO IT !!!

I'm writing a procedure who's growing every day, but this is the core batch based on the italian IPTV La7:

Here is my ViewLa7.bat:

---------------- cut here ----------------
@echo off
Set NetStream="mms://vmedia.tin.it/LA7-600K"
Set FileLog="C:\TMPWORK\LA7-600K_live512k.AVI"


@echo Start recording on file: %FileLog%

Start C:\Programs\VideoLAN\VLC\vlc.exe %NetStream% :sout=#transcode{vcodec=mp1v,vb=512,scale=1,acodec=mpga,ab=96,channels=2}:duplicate{dst=std{access=file,mux=ts,url=%FileLog%}}

pause

@echo Starting second instance of VLC to watch free of browsing
@echo PLEASE WAIT SOME SECONDS that connection is established!!
@echo then push ENTER to go on.

Start C:\Programs\VideoLAN\VLC\vlc.exe --intf skins2 %FileLog%

---------------- cut here ----------------

This is very nice and the *ONLY* application I found to record and watch @ the same time a TV and being able to move RR and FF as I like. The only problem is I'm not able to jump 1 minute FF or 5 minutes FF or RR as the mpeg1 stream is not yet indexed. But I can move with just the cursor which is enough.

Switching to the SKINS2 interface, you can watch at the cursor automatic UPDATING itself because of the arriving streaming! It's really cool. I don't know why the default interfaces doesn't show up unless the AVI file is indexed. Instead with SKINS2 the cursor is always present (except with ASF unindexed).

At the moment I'm writing some win32 vbscript code (sorry, don't have and don't know visualbasic) to automate stream-line falls and auto-recover that seems to happen quite frequently (every 2 hours or 1.1 Gigabytes +/-) from my provider.

That's why I'm interested in knowing how to manage directly VLC with no luck untill now (I don't like ntservice solution). The procedure every time restarts a new instance of VLC untill it reaches 10 instances (otherwise it could lock my pc :-( for too many resources used).

If you need any more help U can reach me via LuxNews on gmail d0t com if U can rebuild my valid e-mail address :-))

Luca

Posted: 04 Jan 2006 10:13
by tonsofpcs
Why this is, I am unsure. Is there anyone that can explain it to me? :)
Sure, MPEG TS/PS are Streaming formats, id est they can be played without having the entire video, you just need a keyframe somewhere in the data available to start watching. Other formats are not, and many require the entire file to be completed (have header and 'footer') to play properly.

Posted: 04 Jan 2006 14:30
by dionoea
something like:

Code: Select all

vlc <input> --sout="#duplicate{dst=std{access=file,mux=<something>,url=<path to file>},dst=display}"
should work. (You can also do that in the Stream output dialog)

Posted: 04 Jan 2006 18:01
by TaskyZZ
Thanks for the replies. I am beginning to understand it a lot better.

What I am doing is working at putting together some PVR functionality. (I know, everybody is doing it :) ).

So, when I start capturing a recording, I want to be able to start watching at a later date, even if it is still being recorded, and possibly from another client somewhere else in the house.

FINALLY!

Posted: 09 Apr 2007 09:34
by rush4hire
something like:

Code: Select all

vlc <input> --sout="#duplicate{dst=std{access=file,mux=<something>,url=<path to file>},dst=display}"
should work. (You can also do that in the Stream output dialog)
Finally!! I've been up all night messing with this. Oh it's so picky!

Here's AutoIt code:

Code: Select all

$vlcid=Run('C:\PROGRA~1\VideoLAN\VLC\vlc http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf --sout="#duplicate{dst=std{access=file,mux=asf,url="C:\test\somefile101.asf"},dst=nodisplay}"')
And for VBScript:

Code: Select all

Private EXE: Set EXE = CreateObject("WScript.Shell") EXE.Run "C:\PROGRA~1\VideoLAN\VLC\vlc http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf --sout=""#duplicate{dst=std{access=file,mux=asf,url=""C:\test\somefile101.asf""},dst=nodisplay}"""
Thank you dionoea!

I just kept trying all kinds of crap with no success. The wiki instructions are lame. I'm going to add this now.

Look at all the junk I tried.

Code: Select all

-vvv input_stream --sout '#duplicate{dst=std{access=file,mux=asf,dst="C:\test\test4.asf"}}:standard{access=http,mux=asf,dst="http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf"}' :sout=#duplicate{dst="http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf",std{access=file,mux=asf,dst="C:\test\test4.asf"}} -vvv input_stream --sout '#duplicate{dst="http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf",std{access=file,mux=asf,dst="C:\test\test4.asf"}}' -vvv input_stream --sout '#duplicate{dst=std{access=file,mux=asf,dst="C:\test\test4.asf"}}:standard{dst=std{access=http,mux=asf,dst="http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf"}}' -vvv input_stream --sout '#duplicate{dst=std{access=file,mux=asf,dst="C:\test\test4.asf"}}:standard{access=http,mux=asf,dst=http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf}' C:\PROGRA~1\VideoLAN\VLC\vlc http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf --extraintf rc "C:\test\test4.asf" C:\PROGRA~1\VideoLAN\VLC\vlc http://69.1.83.130:80/Endavo3abn?MSWMExt=.asf :sout=#duplicate{dst=std{access=file,mux=asf,dst="C;\test\test.asf"}}
Now it confuses me when I see " marks inside " marks, like:
"I'm a string.. and "I'm a string in a string?".. ok ?"
Is that what C++ is like?

Posted: 09 Apr 2007 17:52
by rush4hire
Actually the wierd quotes really are bad.
When I did it this way, it chopped off the file name after the first space.

Code: Select all

C:\PROGRA~1\VideoLAN\VLC\vlc http://something.asf --sout="#duplicate{dst=std{access=file,mux=asf,url='C:\test\spaces may be.asf'},dst=nodisplay}"
So change the inner " with '
or it will do some wierd things.