For discussions about development of TAPs, patches and other software for the Toppy

Moderator: Technical

richie
Frequent contributor
Posts: 156
Joined: Wed Mar 30, 2005 1:05 pm
Location: Ash Vale (Hannington)

Post by richie »

I misunderstood your post, I was thinking "And bdb has a rec2ts that does that (and I think it's a fairly portable C program)." was referring to the 2GB file limit rather than the non in-place editing. Ah well!
birdman
Frequent contributor
Posts: 1765
Joined: Wed Dec 13, 2006 4:03 pm
Location: Hitchin, HERTS Tx: Sandy Heath

Post by birdman »

R2-D2 wrote: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.
The C library has LFS entrypoints:
[admin@Asus /lib]$ strings -a libc.so.0 | grep open64
fopen64
freopen64
__libc_open64
The issue is whether particular software is build to use it.

Toppy: TF5800PVR/250 - Black, now 1TB WD10EURX
F/W: MS6 Recommended F/W 12/9/2009 -FmVrXp+BmC0CbFsIPsUUuWfZXl,
Loader: C5.14, Hardware: 1.01
TAPs: SecCache (UK) v0.4; EPG2MEI v0.96; FontManager 1.0d; QuickJump 1.71; MhegOnOff(Now1) A3; EIT Sub v0.6; MyStuff 6.6
USB connected: SheevaPlug with Debian wheezy
Sig mostly from MyInfo on 26/10/09
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

birdman wrote:The issue is whether particular software is build to use it.
Well, the issue may be more what those functions do on the Asus, but it's worth a try to explicit build, say, rec2ts.c using _LARGEFILE_SOURCE.
Loggy
Posts: 5
Joined: Mon Sep 04, 2006 4:06 pm
Location: Mamchester

Post by Loggy »

This sounds more like a file system or kernel issue on the editing computer. Earlier 32 bit file systems had a maximum size of 2^31-1 bytes.

There are (in Linux) configuration options for the kernel but the file system still has to be able to cope - maybe by using an external drive.

This is not to be confused with running an executable of >2GB.
jof
Regular contributor
Posts: 26
Joined: Tue Mar 03, 2009 12:00 am

Re: Simple and fast .REC conversion

Post by jof »

R2-D2 wrote:Hi,

I've been looking at the Toppy's .rec format and I've found that all I need to do to turn a .rec file into something that is generally usable is to remove the (roughly) 4KB header (to the first 0x47 sync byte). This leaves a normal MPEG Transport Stream (.ts) file which lots of things can play and manipulate.

However, it's desperately inefficient to chop the top off a file since (on most filesystems I've been exposed to) you end up having to basically copy the whole file. So it struck me that a much better idea might be to rewrite the 4KB header part. So I tried inserting 0x47 sync bytes starting from the beginning and at 188 byte intervals (as if it were part of a TS file). This worked perfectly and lined up exactly with the first real 0x47 sync byte. And the file then played perfectly in Media Player Classic (which it didn't if just one of those 0x47 sync bytes was missing).

Now, after the last inserted 0x47 sync byte in the header is invariably a big chunk of zero bytes, which I reckon could be used to store the bytes that had been changed so you could actually change the file back to the original Toppy .rec format just as easily. In fact, in the examples I've looked at there was only one byte that was changed that was variable (i.e. part of the text of the recording description) and couldn't otherwise be easily replaced.

So, it strikes me that it would be fairly easy to write a TAP and/or computer (PC/Mac/Linux) program to do this update (and maybe change the file extension at the same time to .TS to signal the change).

Silly idea or not?
Hi all,
I was looking for something to allow Media Player Classic to play my transferred .rec files and happened across this forum thread.

Now I hope I'm not treading on anyone elses toes...
Based on all the information here (thanks to all), I've written a small Windows command line program for the sole purpose of instantaneously (nearly) converting my .rec files to TS so that I can play them in Media Player Classic and then convert back again if needed.
The conversion direction is simply based on the file extension.

The TS file retains all information overwritten by sync bytes in the zero padding so that the second conversion produces the exact same file as the original. It works with files > 2GB on my WinXPPro.

Can anyone suggest a good place to host it?
SonicLife
Frequent contributor
Posts: 1262
Joined: Mon Oct 24, 2005 12:43 pm
Contact:

Post by SonicLife »

When you convert back to .rec do you get the original header info back, or is it lost?

What flavour of MPC are you using, and how did you get it to play TS files properly, mine won't play TS.

I would be happy to host your program if you don't get a better offer.
Toppy conversion scripts to convert toppy recordings to other formats.
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

SonicLife wrote:What flavour of MPC are you using, and how did you get it to play TS files properly, mine won't play TS.
You'll need the DirectShow plugin HDTV Pump.
jof
Regular contributor
Posts: 26
Joined: Tue Mar 03, 2009 12:00 am

Post by jof »

Now I hope I'm not treading on anyone elses toes...
Based on all the information here (thanks to all), I've written a small Windows command line program for the sole purpose of instantaneously (nearly) converting my .rec files to TS so that I can play them in Media Player Classic and then convert back again if needed.
The conversion direction is simply based on the file extension.

The TS file retains all information overwritten by sync bytes in the zero padding so that the second conversion produces the exact same file as the original. It works with files > 2GB on my WinXPPro.
I've updated my website to host the program TFRecToTS.
If it's of use to anyone, you can download it from HERE.
stuaxo
Regular contributor
Posts: 26
Joined: Sun Feb 10, 2008 4:54 am

Post by stuaxo »

jof wrote:
Now I hope I'm not treading on anyone elses toes...
Based on all the information here (thanks to all), I've written a small Windows command line program for the sole purpose of instantaneously (nearly) converting my .rec files to TS so that I can play them in Media Player Classic and then convert back again if needed.
The conversion direction is simply based on the file extension.

The TS file retains all information overwritten by sync bytes in the zero padding so that the second conversion produces the exact same file as the original. It works with files > 2GB on my WinXPPro.
I've updated my website to host the program TFRecToTS.
If it's of use to anyone, you can download it from HERE.
This looks quite interesting, any chance of putting the source up (preferanly under MIT/LGPL license or somesuch) - it would be nice to run see if this compiles under linux (yes fairly lazy of me to not just reimplement myself, but still).
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

stuaxo wrote:any chance of putting the source up
Based on the PHP code here, if I'm not mistaken.
kermit
Frequent contributor
Posts: 972
Joined: Wed Jun 01, 2005 5:21 am
Location: Brisbane, Australia

Post by kermit »

matt wrote:I've converted the above script to a droplet for Mac OS X.

Drag and drop a REC or TS file onto it to do a quick conversion back and forth.

notes: only supports one file at a time. doesn't have a fancy icon.

download: http://www.gingerbeardman.com/toppy-rec2ts.zip (58kb)

if you find it useful please let me know.

matt
I've just read this post, downloaded the app and yes Matt it is very useful.
Cheers Simon
>8-]

TF5000PVRt 500GB March '09 f/w
DrGreg
Regular contributor
Posts: 77
Joined: Fri Oct 29, 2010 2:37 pm

Post by DrGreg »

"matt wrote:
I've converted the above script to a droplet for Mac OS X.

Drag and drop a REC or TS file onto it to do a quick conversion back and forth.

notes: only supports one file at a time. doesn't have a fancy icon.

download: http://www.gingerbeardman.com/toppy-rec2ts.zip (58kb)

if you find it useful please let me know.

matt"
Many thanks Matt. rec2ts worked perfectly and the .ts files play flawlessly over my network. :D
TF5810, TS On, F/W: MS6 Recommended F/W 12/9/2009
TAPs: MyStuff 6.3; EPG2MEI v0.96; Font Manager 1.0d; Extend v1.7; MyInfo B5.5; EIT Sub (Game) v0.6; SecCache (UK) v0.4;
Sig generated by MyInfo on 16/5/11
MyInfo on 21/1/11[/size]
Post Reply