Click here to go to the forum index Click here for the home page
 
Author Message

<  TAP and patch development  ~  Simple and fast .REC conversion

Page 2 of 3
Goto page Previous  1, 2, 3  Next
captain747480
Posted: Tue Jun 17, 2008 8:19 am Reply with quote
Frequent contributor Joined: 25 Jun 2005 Posts: 499 Location: London Transmitter: Crystal Palace
The rec2ts.php is in the same directory as the files I'm trying to convert. I've tried a number of individual .rec files and also *.rec but it always gives the 'Failed to Open' message.

_________________
TF5800 HD103SI 1Tb HDD, TS On,F/W: MS6 Recommended F/W 12/9/2009 -Sy+Pe
TAPs: MyStuff 6.4; TF5000 Display v1.53; MHEG Control A2f; EPG2MEI v0.96; TAP Commander 1.0.3; MyInfo B5.5; AccurateBM v0.3; SecCache (UK) v0.4; Font Manager 1.0d
Other Kit:LG 37LE5900 TV, Zotac ND-22 HTPC running XMBC, Sky+ HD, Panasonic HT-520 Home Cinema, Harmony 885, Asus WL-500GX with Oleg's, 2Tb NAS (Mirrored), Flirc USB Keyboard Emulator
View user's profile Send private message MSN Messenger
R2-D2
Posted: Tue Jun 17, 2008 8:40 am Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
captain747480 wrote:
it always gives the 'Failed to Open' message.
Hmm... that's a very basic error, so something is wrong. Do the filenames have spaces in them, maybe? (You can either use backslash to escape them, or wrap the whole filename in quotes -- you can usually use filename completion [tab] to help with this.)

And from the path to php I assume you're running this on an Asus or Slug (or the like). So does rt2mei work for you?

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website
DefineByte
Posted: Tue Jun 17, 2008 11:29 am Reply with quote
Frequent contributor Joined: 07 Jun 2007 Posts: 221 Location: UK
You need to change to the directory the files are in (cd) before that command will work, don't you? Did you do that?

(apologies if I'm stating the obvious, or talking rubbish Embarassed)

_________________
TF5800 250GB 5.13.65+patches AutoStart: Power Restore 0.7.6, EIT Sub 0.6 SnG, SecCache (UK) 0.4, Extend 1.7, Info Viewer 1.9 DE, QuickJump 1.72, UK Auto Scheduler 0.73.1, EPGnavigator 6.1b (simonc/biggsd), Filer 2.21, TF5000Display 1.53a Other TAPs: Channel Manager 5.1, CutAds 1.3, FastScanGUI 0.6a, HDDInfo 2.3a, HDFW 2.4, JoinAds 1.3, Signal Monitor 0.53, SimpleCharEditor 3.09, Sudoku 1.5, TAP Commander 1.34, Testpatterns 1.2
View user's profile Send private message
captain747480
Posted: Wed Jun 18, 2008 10:08 am Reply with quote
Frequent contributor Joined: 25 Jun 2005 Posts: 499 Location: London Transmitter: Crystal Palace
R2-D2 wrote:
captain747480 wrote:
it always gives the 'Failed to Open' message.
Hmm... that's a very basic error, so something is wrong. Do the filenames have spaces in them, maybe? (You can either use backslash to escape them, or wrap the whole filename in quotes -- you can usually use filename completion [tab] to help with this.)

And from the path to php I assume you're running this on an Asus or Slug (or the like). So does rt2mei work for you?


@DefineByte - I've tried running this from the directory where the files I want to convert are stored and using full path names as well as the shortened version I posted.

@R2-D2 - Yes some of the files have spaces but I've edited one of them so it doesn't and I still get the 'Failed to Open'. I had also disabled my Swap File and thought that might be causing problems but I've re-enabled my Swap File and I still get the error.

I am using this on an Asus as you surmised and rt2mei works.

Unfortunately I've not got much time to play about but hopefully at the weekend I'll be able to look at your script and try to de-bug it myself. Thanks for your help so far I'll post back once I've dug about a bit more.

_________________
TF5800 HD103SI 1Tb HDD, TS On,F/W: MS6 Recommended F/W 12/9/2009 -Sy+Pe
TAPs: MyStuff 6.4; TF5000 Display v1.53; MHEG Control A2f; EPG2MEI v0.96; TAP Commander 1.0.3; MyInfo B5.5; AccurateBM v0.3; SecCache (UK) v0.4; Font Manager 1.0d
Other Kit:LG 37LE5900 TV, Zotac ND-22 HTPC running XMBC, Sky+ HD, Panasonic HT-520 Home Cinema, Harmony 885, Asus WL-500GX with Oleg's, 2Tb NAS (Mirrored), Flirc USB Keyboard Emulator
View user's profile Send private message MSN Messenger
richie
Posted: Thu Jun 19, 2008 6:51 pm Reply with quote
Frequent contributor Joined: 30 Mar 2005 Posts: 156 Location: Ash Vale (Hannington)
Is the file greater than 2GB ?

If so you may need a hacky perl script I developed ....
View user's profile Send private message
R2-D2
Posted: Thu Jun 19, 2008 7:15 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
richie wrote:
Is the file greater than 2GB ?
Ah yes, you probably need a PHP that understands how to open big files (5.2?).

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website
richie
Posted: Fri Jun 20, 2008 10:01 am Reply with quote
Frequent contributor Joined: 30 Mar 2005 Posts: 156 Location: Ash Vale (Hannington)
I have php 5.2.5 and found I still needed my script to open large files.
View user's profile Send private message
richie
Posted: Fri Jun 20, 2008 12:45 pm Reply with quote
Frequent contributor Joined: 30 Mar 2005 Posts: 156 Location: Ash Vale (Hannington)
perl had the same problem so i think it was OS related. I got round it by dealing with STDIN which meant instead of changing bytes on-the-fly I had to rewrite the entire file then delete the original. A bit slower, but an acceptable workaround (but then I have a 160Gb disk attached rather tahn a little memory stick).
View user's profile Send private message
captain747480
Posted: Sat Jun 21, 2008 10:51 am Reply with quote
Frequent contributor Joined: 25 Jun 2005 Posts: 499 Location: London Transmitter: Crystal Palace
Ok, it's definitely the 2GB problem I've managed to run the PHP Script Ok on files below 2GB but it fails with the 'Failed to Open' message if they're over 2GB.

I'm running with PHP 5.2.4.

_________________
TF5800 HD103SI 1Tb HDD, TS On,F/W: MS6 Recommended F/W 12/9/2009 -Sy+Pe
TAPs: MyStuff 6.4; TF5000 Display v1.53; MHEG Control A2f; EPG2MEI v0.96; TAP Commander 1.0.3; MyInfo B5.5; AccurateBM v0.3; SecCache (UK) v0.4; Font Manager 1.0d
Other Kit:LG 37LE5900 TV, Zotac ND-22 HTPC running XMBC, Sky+ HD, Panasonic HT-520 Home Cinema, Harmony 885, Asus WL-500GX with Oleg's, 2Tb NAS (Mirrored), Flirc USB Keyboard Emulator
View user's profile Send private message MSN Messenger
richie
Posted: Sat Jun 21, 2008 5:02 pm Reply with quote
Frequent contributor Joined: 30 Mar 2005 Posts: 156 Location: Ash Vale (Hannington)
Don't know if you're proficient at editing php but in perl the trick was
1. Don't try to modify the file in-place - with >2GB, better to output to a new file. Slower, but it works.
2. Don't open a filename, but instead use STDIN and STDOUT
This involves changing the input and output file handles within the php script to STDIN and STDOUT, and then something like ...
cat FILENAME.rec | rec2ts.php > FILENAME.ts

I had a look to see if I could release even snippets of my stuff, but it's all a mess at the mo ...
View user's profile Send private message
R2-D2
Posted: Sat Jun 21, 2008 5:36 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
richie wrote:
1. Don't try to modify the file in-place - with >2GB, better to output to a new file. Slower, but it works.
Then it would be a "complicated and slow .REC conversion". Smile And bdb has a rec2ts that does that (and I think it's a fairly portable C program).

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website
richie
Posted: Sat Jun 21, 2008 5:45 pm Reply with quote
Frequent contributor Joined: 30 Mar 2005 Posts: 156 Location: Ash Vale (Hannington)
Except it doesn't work on the asus for file sizes greater than 2GB. Which is why I use my method for such files!

Would love to hear of an alternative method which does work (a) on the asus (b) for 2gb files and (c) Using inplace editing!

Have just re-read a bit more carefully. If the C progam does that then that would be great ... but as the PHP and Perl both failed in a similar way, even using an up-to-date PHP, I've feared it is an underlying OS restriction for such languages ...
View user's profile Send private message
R2-D2
Posted: Sat Jun 21, 2008 6:06 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
richie wrote:
Except it doesn't work on the asus for file sizes greater than 2GB.
Have you compiled it for the Asus?

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website
richie
Posted: Sun Jun 22, 2008 2:49 pm Reply with quote
Frequent contributor Joined: 30 Mar 2005 Posts: 156 Location: Ash Vale (Hannington)
Yes. It doesn't work - more andd more it looks like an underlyng OS limitation in the way C, PHP and perl use it. The same restriction does not seem to apply to other applications such as mencoder generating large files on the fly.

But in any case, rec2ts.c doesn't modify files in place, so is just as "complicated and slow" as my method! But at least mine works Laughing
View user's profile Send private message
R2-D2
Posted: Sun Jun 22, 2008 4:07 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
richie wrote:
But in any case, rec2ts.c doesn't modify files in place
I thought I'd clearly mentioned that it didn't. Confused You're probably right about a basic limitation in the C library used on the Asus, which I suppose is not completely unreasonable (although a little short-sighted). So the previous suggestion of a TAP that does the job starts to make a little more sense.

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT + 1 Hour
Page 2 of 3
Goto page Previous  1, 2, 3  Next

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum