All I can say is, wow... I think I'd heard of and run into ProjectX before, but as a general rule I don't like to run programs written in either Java or perl. They both tend to be very difficult to install, and extremely fragile to paths/versioning changes.

I finally bit the bullet today and got it to install, and I can reiterate the success of others. It does a very good job of cleaning up errors in MPEG2 captures. Even though it requires demuxing to enable all the checks, the resulting files mux together nicely with mplex. Basically, ProjectX parses through the PS, determines when sync changes due to bad frames, and then throws out the bad frames. Here's some of the logfile from my chunk of bad sync 8mm capture:

-> Input File 0:  /home/scratch/VID/sync.nuv (819200000 bytes)
-> File is MPEG-2 PS/SS (Video/Audio PES)
-> demux
-> found PES-ID 0xE0 (MPEG Video) @ 38
-> found PES-ID 0xC0 (MPEG Audio) @ 2062
-> video basics: 704*480 @ 29.97fps @ 0.6735 (4:3) @ 5000000bps, vbvBuffer 112
-> starting export of video data @ GOP# 0
!> dropping useless B-Frames @ GOP# 0 / new Timecode 00:00:00.000
!> dropping GOP# 8 @ orig.PTS 00:00:04.337 (390402)
-> Pics exp/cnt 15/15, inGOP PTS diff. 143ms, new Timecode 00:00:03.937
!> PTS difference of 58174 (00:00:00.646) to last exported GOP detected
!> dropping useless B-Frames @ GOP# 9 / new Timecode 00:00:03.937
!> PTS difference of 4252 (00:00:00.047) to last exported GOP detected
!> dropping useless B-Frames @ GOP# 16 / new Timecode 00:00:07.374
!> dropping GOP# 1157 @ orig.PTS 00:09:39.633 (52167044)
-> Pics exp/cnt 15/15, inGOP PTS diff. 233ms, new Timecode 00:09:38.378
!> PTS difference of 66061 (00:00:00.734) to last exported GOP detected
!> dropping useless B-Frames @ GOP# 1158 / new Timecode 00:09:38.378
!> dropping GOP# 1609 @ orig.PTS 00:13:26.098 (72548898)
-> Pics exp/cnt 15/15, inGOP PTS diff. 50ms, new Timecode 00:13:24.037
!> PTS difference of 49550 (00:00:00.550) to last exported GOP detected
!> dropping useless B-Frames @ GOP# 1610 / new Timecode 00:13:24.037
!> PTS difference of 21017 (00:00:00.233) to last exported GOP detected
!> dropping useless B-Frames @ GOP# 2382 / new Timecode 00:19:50.357

On Fri, 6 May 2005, John Kondis wrote:

The 0.550 + 0.233 second variation by the end of the file is about what I was seeing with avidemux. Now, it loads up fine. Basically, this is the first tool I've found that appears to not only function properly, but also clean up the output file.

Even better news is that it has cutting and command-line capability. It will take a cutlist generated by its own editing widget, or a simple ascii file of cutpoints. The cutpoints can be by a number of different methods... byte offset, frame count, GOP number, etc. Since the video component may change, I think that the byte offset is the most reliable. Should be able to convert a Mythtv cutlist into byte offsets pretty easily. Then the result could be processed as follows (assuming ProjectX is a script that runs 'java -jar <wherever>/ProjectX.jar $*')

ProjectX -p cutlist file.nuv
Zzzzzz....
mplex -f 8 -o file.mpg file.m2v file.mpa

Anyway, rather exciting, I think. I don't know how much of the speed problem is because it's Java, and how much is that it has to do a lot of file parsing. It appears to check all the frames as it writes to make sure they're valid.

-Cory

>
--- "Michael T. Dean" <[EMAIL PROTECTED]> wrote:
[...]
So, as suggested by Nick in this thread, I tried
Project X.  I just
opened the video and demux'ed with default settings.
 It threw away a
ton of broken video (11.278 seconds total!  Started
at 2:05:55.422 and
ended at 2:05:44.144).  Afterwards, I could open the
video in Avidemux2,
specify an external MPEG audio stream, and the
recording was in sync.

You and Nick rock.

So now I have done the same thing.  Figuring out
ProjectX wasn't as easy as I thought since most of the
docs are in Dutch.  In any case, I installed it,
compiled, ran it (requires a GUI, at least the first
time), opened a .nuv file with "Add..." and clicked on
"demux" with default options.  And off it went.

Actually, on my Duron 1.6 (not the actual mythbox,
just my general purpose server) it didn't take long to
process at all - just a few minutes.  The nice touch
is at the end, where it says "Synchronizing audio with
video..." or something.

The output is demultiplexed audio and video streams
(.mp2 and .mpv), so I fed these directly into

mplex -f 8 -V -o $MPGFIFO <.mp2> <.mpv> &

where $MPGFIFO is a FIFO I made with mkfifo.  Then I
ran

dvdauthor -o <temp_dvd_directory> -f $MPGFIFO

and

dvdauthor -o <temp_dvd_directory> -T

and finally used growisofs to burn to DVD.  I played
the DVD and...

It works great!  No sync problems or anything.


So now onto how to do this in command line: It turns out ProjectX has a CLI (command line interface). It's a little tricky to figure out, but this now works great for me:

java -jar <compiled_projectX_file> -c
<projectX_ini_file> -n <output_stream_basename> -o
<dir_to_put_streams> <input_nuv_file>

The "X.ini" file that it needs was, for me, in the
original src directory where I compiled ProjectX.  A
couple of notes: first, it apparently requires you to
run it as GUI at least the first time so that you can
click on "accept" for the license agreement.  (It's
GPLed but author expressly forbids commercial use???
WTF?)  Also, when I ssh'ed into my box without "-X",
projectX failed to start, apparently because it needs
to feel like it's accessing an X server even when it
isn't going to use one.  (Go figure.)  So if you don't
have an X display defined it may not work from the
command line.

HTH.

It did, but I'm not sure I owe you the beer, since you didn't tell me about the commandline interface. ;) Next project: to scriptify this whole mess.



*************************************************************************
* Cory Papenfuss                                                        *
* Electrical Engineering candidate Ph.D. graduate student               *
* Virginia Polytechnic Institute and State University                   *
*************************************************************************

_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to