With respect to the difference between PAL and NTSC:
The primary differences between PAL and NTSC are the supported frame rates and
resolutions. PAL, for example, supports greater vertical resolution while NTSC
supports a higher frame rate.
There is in fact no difference between aspect ratios. Both are appropriate for popular
ratios such as 4:3 and 16:9.
Quote:
|
would I be rightin saying that the difference between PAL and NTSC is simply the aspect ratio?
|
With respect to the original question about converting from PAL DVD to NTSC DVD:
vobcopy is an appropriate tool to extract the MPEG2 program stream from
the DVD.
mount /dev/dvd /mnt/cdrom # modify as appropriate
vobcopy -l # that is the lowercase L
mjpegtools are appropriate for adjusting the framerate and resolution.
First use
mplayer to demux the program stream yielding the video elementary stream.
You can either background mplayer and start the `cat` line in the foreground or
simply run these commands in different windows. The `cat` line reads from the
named-pipe output of mplayer, so don't wait for mplayer to terminate before
invoking `cat`.
mkfifo stream.yuv
mplayer -ao null -noframedrop -vo yuv4mpeg /path/to/vobcopy-
pr/path/to/vobcopy-produced-VOB-file &
cat stream.yuv | yuvfps -r 30000:1001 | yuvscaler -n n -O DVD | mpeg2enc -n -n -f 8 -F 4 -o out.m2v
Now go back to the original vobcopy-produced program stream (VOB file) and grab the
audio.
mplayer -ao pcm -vo null -vc dummy /path/to/vobcopy-produced-VOB-file
Then encode it as AC3 audio.
ffmpeg -ab 224 -ac 2 -ar 48000 -i audiodump.wav audiodump.ac3
Then remux the new video and audio programs.
mplex -f 8 -o ready-to-master.mpg out.m2v audiodump.ac3
Then use
dvdauthor to master the DVD filesystem.
cat << EOF > dvdauthor.xml
<dvdauthor dest="/home/decourl/target-dir-for-dvd-filesystem-image">
<vmgm>
</vmgm>
<titleset>
<titles>
<video />
<pgc>
<vob file="ready-to-master.mpg" />
</pgc>
</titles>
</titleset>
</dvdauthor>
EOF
dvdauthor -x dvdauthor.xml
Then use
growisofs to generate the ISO and burn directly to DVD in one step.
growisofs is part of dvd+rw-tools.
growisofs -Z /dev/dvd -dvd-video /target-dir-for-dvd-filesystem-image
Welcome to the world of Linux-based video processing. Most everything is
possible, but don't expect a foo2bar-style program to exist for your exact
problem.
Instead, understand the properties that your source video has,
and also understand the properties that the desired destination video has.
Use the appropriate tools to generate a filter-chain from one format to another.
mplayer is your friend. It can read anything and render it not just to the screen, but
to "raw" formats that you can then filter and recode however you like.
dvdauthor is a
must for generating consumer-compatible DVDs in Linux, but it
still requires properly formatted input (ie: not some MPEG4 AVI that you got off the
net).
transcode is a set of tools that can be used in place of mjpegtools. It relies upon
libraries from many different Linux video processing efforts and attempts to internalize
the complicated pipelines that are necessary within one executable. It also provides
simple tools to accomplish different tasks, such as muxing and demuxing.
One downside is that it has a complicated command-line. In my example, transcode is not
used.
Another tool that can do filtering and MPEG2 encoding is mencoder. I do not believe
that mencoder currently produces dvdauthor-compliant output (at least not as shipped)
so I would not recommend using the MPEG2 encoding feature of mencoder for generating
DVDs. mencoder does a good job of outputting to an AVI container but not to an MPEG
container.
ffmpeg is another MPEG encoder that competes with mpeg2enc. There are various
opinions as to which works better under which circumstances. Because you are talking
about wedding videos (the classic example where high quality is a must), you will
want to try both and compare your output. An obvious parameter that you will need
to jack up (not shown in the example) is the target bitrate. ffmpeg also has a two-pass
encoding option that can be used to increase quality. I don't recall exactly, but I believe
that the desire for a second pass may have something to do with generating Huffman
encoding trees that you might have learned about if you are/were a computer science
student.
Anyhow, these are the tools that need to be used. Either use the technique that I
suggested above (using mplayer to decode the video, mjpegtools to filter it, and
mpeg2enc to re-encode it) or use transcode to accomplish all three of those steps
in one.
Good luck to you. There are excellent HOWTOs about DVD burning using Linux. One is
hosted on Gentoo forums. Remember that you need to accomplish appropriate frame-rate
and resolution adjustments to get from PAL to NTSC. Otherwise, it's just like unpackaging
something from one box and repackaging it in another.
If by chance you are not familiar with the concepts of audio and video codecs and container
formats, look for that information first.
There are quite a few shared library dependencies you need to get started with this stuff.
Most distros don't ship this stuff - especially commercial distros that don't want the
perceived liability of providing software capable of DVD duplication. As such, a Linux
box for this type of work is something of a custom machine. Find a distro that has
dvdauthor, mjpegtools, transcode, mplayer, ffmpeg, and vobcopy under package management.
Be aware that this stuff is CPU and disk intensive. As a rule of thumb, expect it to take
longer to process a video than it would to watch it. Exactly how many times longer, that
depends on your system, which tools you use, and how you invoke them. Basically,
expect that processing each DVD will be an 'overnighter' - especially if you opt for
the mpeg2enc route.
Also be aware that complications can arise from issues such as interlacing. It can be
extremely difficult to wrap your mind around these issues, and it is possible that you
can discard video quality if you don't use the right filters and switches. I won't say
more about this topic for fear of demonstrating that I don't know much about its
intricacies.
Another approach to the frame rate conversion would involve forcing the frame-rate
conversion tool to pretend that the input has a frame rate of 23.976 fps instead of
25 fps. This will cause your video to slow down by about 4%. You will probably notice the
4% speed difference less than you would notice the artifacts from converting directly.
The fps-adjusting tools have switches that will cause them to disregard the information in the
header and run with user-supplied parameters such as this. These switches are designed for
use when the header contains incorrect information, but can be used here to our advantage.
The reason that you might want to do this is because there is a process called telecine
that can be used to convert from film (24 fps) to NTSC video (30 fps) that works by
accomplishing something called a 3:2 pulldown.
If you convert directly from 25 to 30 frames per second, the frame-rate adjuster is forced
to find some way to add 5 frames to every second. It is likely to accomplish this simply
by repeating every Nth frame, which will cause your video to appear to be 'paused' 5 times
per second.
Of course, if you lie to your fps-converter about the input frame rate, the actual length
of your video will change slightly. You will therefore have to modify the audio track
similarly so as to maintain A/V sync. A good tool for this would be sox, which you can
run against the wav file generated by mplayer before re-encoding the audio. Honestly,
realigning audio and video is always a pain in the butt. If you do your calculations correctly,
it might "just plain work". The multiplexers (mplex and tcmplex) both have switches that
(supposedly) allow you to introduce an offset.
It is also possible to encode a DVD using a technique called soft-telecine. Here, the video
is encoded on the disc in the film frame rate, and the player itself is instructed to perform
the pulldown. This has some advantages, such as the ability to increase run-time or bit-rate
without requiring extra storage capacity. I would not recommend the soft-telecine technique
because it is advanced, and because I do not believe that Linux support for it is mature
across all of the different tools.
If you don't have any luck, consider a professional service. I see some ads on google
that offer this service at $20/disc. Or, get a PAL or dual-standard DVD player.
Converting from PAL to NTSC will necessarily discard information (due to downscaling),
and will also necessarily require a decode-recode cycle for the video. Even though we're
dealing with "ones and zeroes", applying a lossy encoding algorithm such as MPEG2
does cause distortion - especially when the source data is itself the rendering of an
existing MPEG2. It's like "copying from a copy" on your VCR. Quality decreases with
every generation.
If your source DVD contains menus, you can convert the video and/or audio components
of them just as you would convert the main title. But, to generate actual working menus,
you will have to learn how to work with a subtitler (such as spumux) and mask images.
This is outside of the scope of this document, but there are dvdauthor-related illustrations
of how to accomplish this task.
Pretty much all of the man pages are easy to understand with the exception of transcode
and mplayer. These apps are mammoth beasts, so trying to understand their man pages is
like trying to code a universal Turing machine in sed.
-Lincoln
Quote:
I have some movies of my wedding in PAL format on multipls DVD-Rs
I'd like to do two things with these DVD-Rs:
1) Copy the PAL DVD and create a backup so I can lend out the backups to family instead of the original wedding DVD
2) I'd like to convert the PAL DVD to a NTSC DVD
|