#83612 - spinal_cord - Wed May 17, 2006 10:37 am
What is the fastest way to convert a DVD to play in moonchell? At the moment Im' using DVDx to convert the DVD to avi/mpg, then DGPtools to convert the avi/mpg to DGP. Sometimes I need to rip the dvd to my harddrive first else I end up with green crap allover the screen. This all takes about 2-3 hours, depending on the length of the movie.
Is there a quicker way?
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage
#83628 - Xtreme - Wed May 17, 2006 2:20 pm
There are my friend's EasyDivX interface.
1)
EasyDivX:
DVD -> DivX/XviD (+ extracting subtitles)
Encode DVD to AVI file and subtitle to sub/idx file.
2)
VirtualDub (video editing) + VobSub filter (adding subtitles) + Avisynth (for frameserving video)
Install stuff.
Open AVI with VirtualDub.
Add Subtitles with VobSub plug-in.
Start frameserving with Virtualdub (name it to Movie.vdr).
Make Movie.avs file and add text:
Code: |
Avisource("C:\Movie.vdr") |
3)
Open Movie.avs file with DPG Encoder and encode it to DPG. You can also try to pass using the AviSynth and try to open Movie.vdr first (tough, usually recycling via avisynth is more stable).
EDIT: It takes some time as others. Hard or not, you decide. If it's too hard, just don't do it. Cooking also takes a lot of time, and ppl love to eat some good food.
_________________
My Theme
DS Lite (FM_V8a) ** R4 Revolution (2GB Transcend) ** SuperCard Lite (2x 2GB Transcend)
#83651 - The 9th Sage - Wed May 17, 2006 6:04 pm
Xtreme wrote: |
2)
VirtualDub (video editing) + VobSub filter (adding subtitles) + Avisynth (for frameserving video)
Install stuff.
Open AVI with VirtualDub.
Add Subtitles with VobSub plug-in.
Start frameserving with Virtualdub (name it to Movie.vdr).
Make Movie.avs file and add text:
Code: | Avisource("C:\Movie.vdr") |
|
I was going to suggest re-encoding it to an AVI first, but I forgot about using a frameserver...I'll have to try this. Also, doesn't VDub have it's own frameserver? I think you have to specify that you want it to install it when you install the program, but I seem to remember something like that.
_________________
Now with 20% More Old Man from Zelda 1 than ever before!
#83657 - LS5 - Wed May 17, 2006 6:38 pm
Unfortunately, dpgenc doesn't support frameserving.
#83670 - Xtreme - Wed May 17, 2006 7:54 pm
LS5 wrote: |
Unfortunately, dpgenc doesn't support frameserving. |
Ok, that's a shame. Then files must be converted from DVD to AVI and then threated with DPG encoder.
Or DVD -> AVI -> AVI (if you need subtitles).
_________________
My Theme
DS Lite (FM_V8a) ** R4 Revolution (2GB Transcend) ** SuperCard Lite (2x 2GB Transcend)
#83672 - tepples - Wed May 17, 2006 8:02 pm
If you're worried about quality loss when doing AVI->AVI, you can use the lossless Huffyuv codec if you have a lot of disk to spare.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#83687 - sdjp - Wed May 17, 2006 9:41 pm
If you look at http://forum.gbadev.org/viewtopic.php?t=7897, there's a description of how to set up a DPG encoding pipeline under linux.
This is relevant, because most of the hard work is done by tools that are perfectly able to operate on a DVD. At least, mencoder certainly can, and a windows binary is supplied with the windows dpgenc tools.
If my recollection of mencoder settings is correct, the command to encode the video will be something like:
mencoder dvd://$TITLE -o $VTMP -ovc lavc -lavcopts vcodec=mpeg1video:vstrict=-1:vbitrate=160000 -nosound -ofps $FPS -vf scale=256:19
where $TITLE is the title number of the actual film, $VTMP is a temporary file for the video, and $FPS is the frame speed to encode to. 12 works great for anime, and plays back beautifully, else, well, dpgenc seems to default to 18 (but that's nonstandard; some codecs won't do that).
Similarly, if you pull the audio out with mplayer, you can do something like:
mplayer dvd://$TITLE -ao pcm:file=$ATMP -vc dummy -vo null && sox -twav $ATMP -tgsm -c1 - | sox -V -tgsm - -twav $AO
$ATMP is a temporary file, not relevant after. $AO is the final audio output.
You'll need some way to generate the header; something that I'm afraid I can't help with.
Admittedly, if you've got that, you can use whatever method you like to encode the video / audio. Which is probably better.
#83703 - Lazy1 - Wed May 17, 2006 11:08 pm
I don't know about using mencoder directly, whenever I tried it and set dpgenc not to re-encode the video stream it would create the dpg but only write the audio.
#83751 - Xtreme - Thu May 18, 2006 8:44 am
tepples wrote: |
If you're worried about quality loss when doing AVI->AVI, you can use the lossless Huffyuv codec if you have a lot of disk to spare. |
Yes, but I don't think you could see the difference in quality: 720x576 MPEG-2 >> 640x480 DivX >> 256x192 DPG
I personally use Huffyuv, but only when using same resolution and when I'm making HQ conversions.
_________________
My Theme
DS Lite (FM_V8a) ** R4 Revolution (2GB Transcend) ** SuperCard Lite (2x 2GB Transcend)
#83984 - tepples - Sat May 20, 2006 12:27 am
Xtreme wrote: |
I don't think you could see the difference in quality: 720x576 MPEG-2 >> 640x480 DivX >> 256x192 DPG |
It'd be faster to do 720x576 MPEG-2 >> 256x192 Huffyuv than 720x576 MPEG-2 >> 640x480 DivX, right?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#84047 - Xtreme - Sat May 20, 2006 9:49 am
tepples wrote: |
It'd be faster to do 720x576 MPEG-2 >> 256x192 Huffyuv than 720x576 MPEG-2 >> 640x480 DivX, right? |
Yes, like twice, but I prefer something compressed to save disk space.. considering that you/me/he might have those DVD files already on the HDD eating up the free space. So if you have fast computer and enough space for that, then that huffy method would be a great choice (DVD files ~6GB + Huffyuv file 20-40GB + DPG file ~100-400MB). :-)
_________________
My Theme
DS Lite (FM_V8a) ** R4 Revolution (2GB Transcend) ** SuperCard Lite (2x 2GB Transcend)
#84054 - LS5 - Sat May 20, 2006 10:27 am
256x192 15fps Huffyuv files are more like 1GB per 30 minutes, definitely not 20-40GB for one movie.
#84067 - SteveH - Sat May 20, 2006 12:21 pm
I'm trying to download that EasyDivX application, but apparently it's a dead project...
#84083 - daninski - Sat May 20, 2006 1:44 pm
so is there anyway to convert files to .dgp using a mac? (i know i know)
i'd never actually heard of that video file format before moonshell and can't find any information about it. what's the actual codec?
#84084 - JaJa - Sat May 20, 2006 1:58 pm
Yes, there is.
I worked on this at the beginning of the year. (Actually end of last year O_O it's been a while.)
I worked out the header structure and codecs, and then Jhuees wrote a short application that writes out the header to a file.
You then cat your converted video, audio and header together to form a dpg. (cat header audio.gsm.wav foo.mpg > foo.dpg).
This thread has details about the header, the header app, commands to convert the video and some ruby/shell scripts that semi automate this procedure.
As far as I can tell my method is pretty close to what DPGenc is actually doing, at least we use the same tools (mencoder, sox, mplayer, although DPGenc seems to use ffmpeg too).
Have fun.
_________________
LAWL HOOGE
My Blog
#84085 - Xtreme - Sat May 20, 2006 1:59 pm
SteveH wrote: |
I'm trying to download that EasyDivX application, but apparently it's a dead project... |
Just look for mirror servers.
I have closed the EasyDivX site because it's development has stopped.
_________________
My Theme
DS Lite (FM_V8a) ** R4 Revolution (2GB Transcend) ** SuperCard Lite (2x 2GB Transcend)
#84087 - LS5 - Sat May 20, 2006 2:02 pm
daninski wrote: |
i'd never actually heard of that video file format before moonshell and can't find any information about it. what's the actual codec? |
DPG is a custom container created by Moonlight for MoonShell. It uses MPEG-1 for the video and MP2 (MPEG-1 Part 3 Layer 2) for the audio. I'm guessing DPG is used instead of the MPG container because MPEG-1 can normally only be one of the following framerates: 23.976, 24, 25, 29.97, 30, 50, 59.94 and 60. Since at fullscreen (256x192), the DS can't handle even the lowest of those, dpgenc seems to feed mencoder a sped up (by 24 / target fps) version of the original video, and a the fps value in the DPG header tells MoonShell how much it has to slow the video down on playback. It's a bit of a hack, but it works.
#84091 - daninski - Sat May 20, 2006 2:56 pm
that is a bit of a hack, the play-yan must use a hardware solution to playback it mpg4 i guess. did anyone ever manage to get the play-yan working as anything other than a media player in the end?
#84119 - tepples - Sat May 20, 2006 5:02 pm
LS5 wrote: |
MPEG-1 can normally only be one of the following framerates: 23.976, 24, 25, 29.97, 30, 50, 59.94 and 60. Since at fullscreen (256x192), the DS can't handle even the lowest of those |
Not if you use empty B-frames. MPEG-1 B-frames with no motion vectors can in theory be decoded very cheaply. So if you encode 12fps video as 24fps with a group of pictures shaped like IBPBPBPB, and all the B-frames say copy the previous frame verbatim, then you're staying within the MPEG-1 spec while still using only as much CPU time as 12fps. Is it possible to efficiently detect a motionless P- or B-frame?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#84166 - JaJa - Sat May 20, 2006 9:17 pm
LS5 wrote: |
daninski wrote: | i'd never actually heard of that video file format before moonshell and can't find any information about it. what's the actual codec? |
...MP2 (MPEG-1 Part 3 Layer 2) for the audio.... |
The first DPGs (and i still use this codec) used GSM Wav files for audio (or WAV 49 as it's also called).
_________________
LAWL HOOGE
My Blog
#84375 - Xtreme - Mon May 22, 2006 6:44 am
LS5 wrote: |
256x192 15fps Huffyuv files are more like 1GB per 30 minutes, definitely not 20-40GB for one movie. |
True. I was mixing results with 720x576 pixel resolution outputted with huffyuv, sorry.
_________________
My Theme
DS Lite (FM_V8a) ** R4 Revolution (2GB Transcend) ** SuperCard Lite (2x 2GB Transcend)