DABDig Forums
register | my profile | my bookmarks | my notifications | search | faqs
Show topics:     
   All Forums
    Nebula DigiTV
        Post processing files
 
  Jump to:     
Bookmark This Topic | E-mail This Topic To A Friend   Previous Topic   Next Topic
Author Topic
James Heath
Posts: 30
From:
Registered: 28/12/2004 18:39
Show this author's profile    Email the author of this post
Posted: Saturday, January 15, 2005 - 13:15 Edit this message  Reply to this message with quotes  (IP Logged)

OK - not sure whether this should really post here, as this applies to more than just the Nebula.

I'd like to set up auto processing of my files as recorded by my Nebula as follows:

radio: mp2 to mp3

video: mpeg to divX

I'm fairly sure people have already done this, and I won't need very detailed instuctions - I just don't want to re-invent the wheel.

Ta,

James

Paul Webster
Posts: 371
From: UK
Registered: 22/05/2004 19:27
Show this author's profile    Email the author of this post    Visit the author
Posted: Saturday, January 15, 2005 - 17:44 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

I tend to leave my recordings "as is" since the players I use can handle the native formats.

One problem that you might face is that the Nebula DigiTv software sometimes holds on to the last recorded file (despite them making various fixes to stop this behaviour) - so opening it for read (which is the minimum demanded by the conversion software) does not always work.

Anyway ... http://www.doom9.org has some good instructions for converting to Divx - which you can simplify if you set the DigiTv software to record in "DVD Authoring Ready" (or similar name) format.

LAME can do the conversion of MP2 to MP3.

The DABDig post-process function can be passed the name of the file that DigiTV will create (minus the extension).

(e.g. dabdig.ini settings of

PostProcessRecord=myconvert.bat

PostProcessRecordParam=$FP

)

So a batch file that did something like

If Exist "c:\myrecordings\%1.mp2" goto tomp3

If Exist "c:\myrecordings\%1.mpg" goto todivx

goto end

:tomp3

lame someparameter or other %1.mp2 %1.mp3

goto end

:todivx

execute somethings to convert to DIVX %1.mpg

goto end

:end

When I get back (I am abroad right now) I'll dig through the files I have at home to be a bit more precise unless someone else comes up with something more comprehensive.

I know that at least one person runs his conversions outside of the normal recording schedule since conversion hits the CPU/disk hard and can compromise the PC usage for other things.

You could get more sophisticated by adding a few extra parameters into the PostProcessRecordParam field and then use them to pass data into the conversion software (where supported) to, for exmaple, create tags like recording date, show title, summary)


Paul Webster

DABDig creator

(link corrected)

Edited by Paul Webster on Monday, January 24, 2005 - 10:43:08 AM

James Heath
Posts: 30
From:
Registered: 28/12/2004 18:39
Show this author's profile    Email the author of this post
Posted: Monday, January 24, 2005 - 13:17 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Paul,

Thanks for that - I hadn't checked the forum for a while & forgot to tick the email notification!

I'll give this a go as soon as I get some time, though I fear that if the nebula hangs on to the file, I could be stuffed.

one minor thing - the website www.doom9.com doesn't seem to have much to do with divx?

ta,

James

James Heath
Posts: 30
From:
Registered: 28/12/2004 18:39
Show this author's profile    Email the author of this post
Posted: Monday, January 24, 2005 - 22:13 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Sorry - shoot me! I've just spotted that it's doom9.org not .com

Ignore me!

James

Paul Webster
Posts: 371
From: UK
Registered: 22/05/2004 19:27
Show this author's profile    Email the author of this post    Visit the author
Posted: Tuesday, January 25, 2005 - 08:56 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

I cheated and went back and edited the link (see the note at the foot of the my previous message)

Feel free to edit yours Wink


Paul Webster

DABDig creator

James Heath
Posts: 30
From:
Registered: 28/12/2004 18:39
Show this author's profile    Email the author of this post
Posted: Sunday, February 6, 2005 - 18:39 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

hmm,

Thought I'd start with the 'easy' stuff - getting the radio stuff into mp3.

Used winlame to get all the historic stuff sorted - seems to have done a great job - used the 'winLame:Portable player' switch after some trials, as for spoken word stuff on my mp3 player it seemed absolutly fine.

Then moved on to trying to get lame to do the recordings automatically.

Took a sample recording:

tsi.mp2 - 20mb, 48khz, 160kbps

winlame handles it fine

tried lame using recommended basic settings:

Lame -h tsi.mp2

got:

Input file is freeformat.

LAME version 3.96.1 (http://lame.sourceforge.net/)

CPU features: MMX (ASM used), SSE, SSE2

Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz

Encoding tsi.mp2 to tsi.mp2.mp3

Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=2

Frame / CPU time/estim / REAL time/estim / play/CPU / ETA

bitstream problem: resyncing... : / 0:00/ : / x/ :

bitstream problem: resyncing... 0:00/ 0:00/ 0:00/ 0.0000x/ 0:00

bitstream problem: resyncing... 0:00/ 0:00/ 0:00/ 0.0000x/ 0:00

0/3728272 ( 0%)/ 0:00/ 0:00/ 0:00/ 0:00/ 0.0000x/ 0:00 bit

stream problem: resyncing...

bitstream problem: resyncing...

bitstream problem: resyncing...

bitstream problem: resyncing...

bitstream problem: resyncing...

bitstream problem: resyncing...

bitstream problem: resyncing...

bitstream problem: resyncing...

plus a lot more lines the same, and an 8kb resultant file

tried with

Lame -h --mp2input tsi.mp2

got exactly the same results.

tried fiddling with lots of other settings, but recognised that I didn't really understand why it wasn't working - any ideas what I've done wrong anyone?

Paul Webster
Posts: 371
From: UK
Registered: 22/05/2004 19:27
Show this author's profile    Email the author of this post    Visit the author
Posted: Sunday, February 6, 2005 - 18:55 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

My guess is that the WinLame that you had success with was built with a different (older?) set of libraries and that the MP2 broadcast stream format saved by the Nebula card has foxed the version of Lame (in particular underlying decoding routines).

If Lame is still being actively worked on - then a trip to their forums and offering a sample file that fails might get some interest from them.

Although not scriptable ... I use CDEX to convert here - and it can do a batch of files.


Paul Webster

DABDig creator

James Heath
Posts: 30
From:
Registered: 28/12/2004 18:39
Show this author's profile    Email the author of this post
Posted: Tuesday, February 8, 2005 - 23:42 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

I guess the stream is fooling it. I've no idea what version win lame is based on, but I'm having difficulties finding older versions of lame.exe

I've tried posting to another users topic here who says they're doing it succesfully

James

Paul Webster
Posts: 371
From: UK
Registered: 22/05/2004 19:27
Show this author's profile    Email the author of this post    Visit the author
Posted: Wednesday, February 9, 2005 - 07:18 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

As an extra thought ... have you tried configuing DigiTV to store as "DVD Authoring Format Compatible"?

(Settings/Recording) - introduced in 3.12 I think.

I know that it changes the way that video is stored - but perhaps ir also removes the transport stream stuff from MP2 as well.

My CDEX (which has no problem with the MP2 from DigiTV) reports it is using Lame encoder 1.30, engine 3.92 MMX)


Paul Webster

DABDig creator

Squire
Posts: 8
From:
Registered: 09/02/2005 14:35
Show this author's profile    Email the author of this post
Posted: Wednesday, February 9, 2005 - 14:46 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Hi,

Here is how to convert a DigiTV .mp2 file using Lame:

1) Right click on DigiTV screen, select Tools, and in the Mpeg Tools window, select the "Demultiplex" tab.

2) Select your input file

3) Ensure the "Remove PES Header Information" checkbox is ticked. This is the stuff that causes all those bitstream / resyncing errors in LAME.

4) Click "Start Demux"

DigiTV will then create a file called <filename>(00c0).mp2

5) Run Lame: lame -h <filename>(00c0).mp2 <filename>.mp3

You should get a nice display like this (where my input file was a.mp2 and my output file is a.mp3):

Input file is freeformat.

LAME version 3.95 MMX (http://www.mp3dev.org/)

CPU features: MMX (ASM used), SSE

Using polyphase lowpass filter, transition band: 17226 Hz - 17806 Hz

Encoding mp2\a.mp2 to a.mp3

Encoding as 48 kHz 128 kbps j-stereo MPEG-1 Layer III (12x) qval=2

Frame / CPU time/estim / REAL time/estim / play/CPU / ETA

5700/87335 ( 7%)/ 0:41/ 10:30/ 0:41/ 10:30/ 3.3226x/ 9:49

I am looking into automating the removal of the PES Header Information to allow a fully automated batch conversion, and will post back here when done.

Regards,

Squire.

Squire
Posts: 8
From:
Registered: 09/02/2005 14:35
Show this author's profile    Email the author of this post
Posted: Wednesday, February 9, 2005 - 16:24 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Hi again,

I now have a working batch process that takes an .mp2 DigiTV file (Recorded in DVD authoring format, if that matters..), passes it through PVAInstrumento, then through LAME all automatically to output an MP3 file, then (optionally) deletes the source MP2.

Just finished processing "Just a minute" from Radio 4 at the weekend, and the quality is lovely.

What's the best way to post up the batch file and supporting tools?

Squire.

Paul Webster
Posts: 371
From: UK
Registered: 22/05/2004 19:27
Show this author's profile    Email the author of this post    Visit the author
Posted: Wednesday, February 9, 2005 - 18:42 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

If you send it to me I will make a version to stick on the DABDig web site or even in the ZIP file.


Paul Webster

DABDig creator

Squire
Posts: 8
From:
Registered: 09/02/2005 14:35
Show this author's profile    Email the author of this post
Posted: Thursday, February 10, 2005 - 14:38 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Hi,

E-mailed the MP2MP3 source to you Paul, and happy to answer any queries / comments / problems through the forums.

Kind regards,

Squire.

James Heath
Posts: 30
From:
Registered: 28/12/2004 18:39
Show this author's profile    Email the author of this post
Posted: Tuesday, April 19, 2005 - 08:23 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Squire,

thanks for sending me your code.

In the end I've used it pretty much as is - I tried to make it a job that would be run by dabdig at the end of recording, but the Nebula holds on to the file until it exits / makes another recording, so that's fairly useless.

the one mod that was needed is that because the Nebula does hang on to the files, if you make it record straight in to the mp2 directory, PVAS spits an error on screen when it tries to process it.

THe solution is to record elsewhere & copy to the mp2 directory - the copy routine handles the file holding errors OK, so I added the following to your neat little cmd:

Echo Checking for incoming files....

if not exist ..\..\Recordings\*.mp2 goto begin

echo File found. Attempting to move.....

REM ***Try & move the file - if we can Nebula has finished with it***

for /F "Tokens=1* delims=." %%a in ('dir ..\..\Recordings\*.mp2 /b') do move "..\..\Recordings\%%a.mp2" "mp2\%%a.mp2"

if not exist mp2\*.mp2 goto begin

echo File moved. Processing....

goto :eof

Thanks once again!

James

Paul Webster
Posts: 371
From: UK
Registered: 22/05/2004 19:27
Show this author's profile    Email the author of this post    Visit the author
Posted: Tuesday, April 19, 2005 - 08:36 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Re Nebula holding onto files ... (I should really put this in the Nebula part .. maybe I'll copy it there later.

This bug wiht the Nebula code changes from release to release ... the best I have seen is it holding open just the first opened file. In that case - leaving it running just means that one file gets stuck.

If you delete the file after you successfully copy it then I presume that the delete will fail for open files. This means that you might be able to keep the disk space usage down.


Paul Webster

DABDig creator

Squire
Posts: 8
From:
Registered: 09/02/2005 14:35
Show this author's profile    Email the author of this post
Posted: Tuesday, April 19, 2005 - 11:29 Edit this message  Reply to this message with quotes  Delete this message  (IP Logged)

Thanks James, looks good.

Has anyone done any work on the same automatic conversion for MPG to DIVX / XVID?

I can manually do the conversion from DVD format MPG to Divx using VirtualDub/MPeg2. Not sure about scripting that though...

If someone can give me some pointers, I'll happily have a stab at this.

Squire.

Topic is 3 Pages Long:  1  2  3     Previous Topic   Next Topic

Admin/Moderator: Thread Management