Page 1 of 1

VLC using rc and sout - letting go of files

Posted: 15 Apr 2009 12:34
by michaeldjcox
I'm using VLC -I rc thus to record a stream as mp3

Code: Select all

vlc -I rc --rc-host=localhost:5001 --rc-quiet "http://yp.shoutcast.com/sbin/tunein-station.pls?id=9907" --sout="#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=file,mux=raw,dst='test.mp3'}}"
When enter "stop"

VLC still has a lock on the file and it cannot be deleted.

Its there a way I can get VLC to release the file?

Re: VLC using rc and sout - letting go of files

Posted: 15 Apr 2009 13:26
by Rémi Denis-Courmont
VLC never locks files.

Re: VLC using rc and sout - letting go of files

Posted: 15 Apr 2009 14:30
by michaeldjcox
perhaps I don't mean lock.

What I mean is I cannot delete the file after I enter "stop" in the rc interface.

This is on vista - though I have noticed I can in XP.

Re: VLC using rc and sout - letting go of files

Posted: 15 Apr 2009 15:34
by Rémi Denis-Courmont
First, that's a problem with Windows anyway. Normal operating systems don't do that. Second, VLC does release the file handle after stop has been processed, but it takes a short while, since it's asynchronous. Unless --sout-keep is enabled, in which case you need to exit VLC completely.

Re: VLC using rc and sout - letting go of files

Posted: 15 Apr 2009 18:28
by michaeldjcox
Well bit more investigation.

It not to do with any difference between vista and XP.

I find that if I do this:

Code: Select all

vlc.exe -I rc "http://yp.shoutcast.com/sbin/tunein-station.pls?id=9907" --sout="#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=file,mux=raw,dst='test.mp3'}}"
on either platform and type "stop" the file is released.

When I do this:

Code: Select all

vlc.exe -I rc --rc-host=localhost:5002 --rc-quiet "http://yp.shoutcast.com/sbin/tunein-station.pls?id=9907" --sout="#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=file,mux=raw,dst='test.mp3'}}"
and send "stop" followed by linefeed the VLC process keeps a file handle open on the test.mp3 file (verified with sysinternals process explorer)

I do see the usual messages following "stop" from rc in both cases.

Thanks for your help

Michael

Re: VLC using rc and sout - letting go of files

Posted: 16 Apr 2009 09:17
by michaeldjcox
If I take out the:

--rc-host=localhost:5002

and type in the commands I was previously sending over the socket it works.

Can any please explain why the file handle is not released when I use "stop" over the socket rather that typed in.

I am on my knees begging.

MIchael