Page 1 of 1
Skipping in an FTP stream does not work anymore with v0.9?
Posted: 08 Dec 2008 05:06
by bulletmark
Hi, sorry I've looked all over Google and here but can't find an answer to the problem I am having.
I've used vlc to stream recordings via ftp from my Topfield PVR box for some time and it has always worked well. Recently I upgraded to ubuntu intrepid 8.10 running vlc 0.9.4-1ubuntu3. Now I find that I can't skip ahead in vlc. I get the following messages and then vlc stops (and sometimes hangs).
[00000410] access_ftp access error: cannot retrieve file
[00000408] main input error: INPUT_CONTROL_SET_POSITION(_OFFSET) 0.2% failed
I could skip fine in vlc 0.8 and can still run vlc 0.8.6 on my wife's xp box ok. It seems a new problem with vlc 0.9? Possibly vlc 0.9 uses a different method now to skip forward/backwards in a stream? I expected to find a command line option to enable the old behaviour but can't find one. Anyone have any suggestions?
Re: Skipping in an FTP stream does not work anymore with v0.9?
Posted: 08 Dec 2008 18:16
by Rémi Denis-Courmont
Looks like the FTP server is returning an error for whatever reason. I need a dump of the FTP session for further debugging.
Re: Skipping in an FTP stream does not work anymore with v0.9?
Posted: 09 Dec 2008 05:39
by bulletmark
Thanks for replying Remi. I switched the ftp server into debug mode and captured the output of a failed run from vlc 0.9.4 on my ubuntu box, and then of a good run from vlc 0.8.6 on my wife's xp box. Both play the stream ok when it starts then I skip ahead and the failure occurs on vlc 0.9.4 but vlc 0.8.6 skips ahead fine. The logs were essentially the same so I'll only reproduce here the salient difference. It seems to me that the new vlc is merely failing to issue a REST ftp command after entering extended passive mode?(!)
Here is the ftpd debug output using vlc 0.9.4 on ubuntu intrepid when I skip ahead in the ftp stream and it fails:
Code: Select all
Finished loop with ret=-1, in_get=0, aborted=1, current @4876800
ftpd-topfield2659: retrieve: Transfer of /DataFiles/Scrubs (2008) - My Waste of Time.rec aborted @4876800
ftpd-topfield2659: <--- 426
ftpd-topfield2659: Transfer aborted. Data connection closed.
ftpd-topfield2659: command: ABOR
ftpd-topfield2659: <--- 225
ftpd-topfield2659: ABOR command successful.
ftpd-topfield2659: Received ABOR
ftpd-topfield2659: command: EPSV
ftpd-topfield2659: <--- 229
ftpd-topfield2659: Entering Extended Passive Mode (|||3205|)
ftpd-topfield2659: command: TYPE I
ftpd-topfield2659: <--- 200
ftpd-topfield2659: Type set to I.
ftpd-topfield2659: command: RETR DataFiles/Scrubs (2008) - My Waste of Time.rec
ftpd-topfield2659: retrieve: /DataFiles/Scrubs (2008) - My Waste of Time.rec @0
retrieve: srcpath=/DataFiles/Scrubs (2008) - My Waste of Time.rec, current=0, ret=-101
tf_cmd_get() returned -101
ftpd-topfield2659: <--- 550
ftpd-topfield2659: Not a file: DataFiles/Scrubs (2008) - My Waste of Time.rec
Finished loop with ret=-101, in_get=0, aborted=0, current @0
ftpd-topfield2659: command: ABOR
ftpd-topfield2659: <--- 225
ftpd-topfield2659: ABOR command successful.
ftpd-topfield2659: Received ABOR
ftpd-topfield2659: command: QUIT
ftpd-topfield2659: <--- 221
ftpd-topfield2659: Goodbye.
.. (and the stream fails)
Here is the ftpd debug output using vlc 0.8.6 on winxp when I skip ahead in the ftp stream and it succeeds:
Code: Select all
Finished loop with ret=-426, in_get=1, aborted=0, current @4212636
ftpd-topfield2737: retrieve: Transfer of /DataFiles/Scrubs (2008) - My Waste of Time.rec aborted @4212636
ftpd-topfield2737: <--- 426
ftpd-topfield2737: Transfer aborted. Data connection closed.
ftpd-topfield2737: command: ABOR
ftpd-topfield2737: <--- 225
ftpd-topfield2737: ABOR command successful.
ftpd-topfield2737: Received ABOR
ftpd-topfield2737: command: EPSV
ftpd-topfield2737: <--- 229
ftpd-topfield2737: Entering Extended Passive Mode (|||4375|)
ftpd-topfield2737: command: TYPE I
ftpd-topfield2737: <--- 200
ftpd-topfield2737: Type set to I.
ftpd-topfield2737: command: REST 170061063
ftpd-topfield2737: <--- 350
ftpd-topfield2737: Restarting at 170061063. Send STORE or RETRIEVE to initiate transfer.
ftpd-topfield2737: command: RETR DataFiles/Scrubs (2008) - My Waste of Time.rec
ftpd-topfield2737: retrieve: /DataFiles/Scrubs (2008) - My Waste of Time.rec @170061063
Note: request for data not on 512 byte boundary (170061063 % 512 == 263)
retrieve: srcpath=/DataFiles/Scrubs (2008) - My Waste of Time.rec, current=170060800, ret=0
ftpd-topfield2737: <--- 150
ftpd-topfield2737: Opening BINARY mode data connection for 'DataFiles/Scrubs (2008) - My Waste of Time.rec' (2504581120 bytes).
Created data connection: fd=8
Trying to write to 64761 bytes to the client
Waiting for write for 2 seconds
.. (and the stream plays ok from the new position)
I can post the complete logs if you need them.
Re: Skipping in an FTP stream does not work anymore with v0.9?
Posted: 09 Dec 2008 17:24
by Rémi Denis-Courmont
I cannot reproduce this issue.
Re: Skipping in an FTP stream does not work anymore with v0.9?
Posted: 09 Dec 2008 22:43
by bulletmark
I cannot reproduce this issue.
Can I ask what version you can't reproduce this problem with? I'm running the latest ubuntu intrepid version 0.9.4-1ubuntu3. I can't seem to find a later deb version packaged anywhere - any suggestions?
Do you agree from looking at my logs quoted above that the problem seems to be that vlc is simply failing to issue a REST command?
Re: Skipping in an FTP stream does not work anymore with v0.9?
Posted: 10 Dec 2008 16:18
by Rémi Denis-Courmont
Nope. The FTP plugin appears to seek fine. It's likely a bug in the file format handler. I cannot help with that.
Re: Skipping in an FTP stream does not work anymore with v0.9?
Posted: 02 Feb 2009 13:48
by bulletmark
Ok, 2 months later ...
Not being able to use vlc anymore is killing me! Please, can somebody please suggest where I can go for help next?
I installed vlc 0.8.6i (last of the 0.8 series) in a virtualbox xp machine and proved that it works fine. I can skip wherever I like in the ftp stream and it always plays fine from the new position. I installed vlc 0.9.2 (first of the 0.9 series) and it hangs immediately when I move the slider bar. It will play fine to that point and I can pause and unpause or stop and play just fine. I reproduced this behaviour on a real windows xp machine and on my ubuntu linux box so it seems the bug is generic to the 0.8 to 0.9 vlc changes. Same ftp server/device, same playing file.
Remi - can you suggest somebody/somewhere else where I can post for help?
Re: Skipping in an FTP stream does not work anymore with v0.9?
Posted: 03 Feb 2009 11:15
by bulletmark
For the next punter who may come along with this or a similar problem ....
I debugged the connection between the newer vlc and the ftp server and found that the newer vlc does not close the socket down gracefully on a skip so the ftp-server was failing to execute some cleanup logic on the device transfer before initiating the next transfer. I have the source code for the ftpd-topfield so I changed ftpd.c to make sure it cleans up the transfer no matter how the socket is broken and this fixes the problem. I have sent the patch to the maintainer of ftpd-topfield.