Log in

View Full Version : ffmpeg pal to ntsc


anatase
30th April 2007, 15:50
trying to make a backup of a pal widescreen movie that was region 2 encoded. I used ripit4me and it appears that converted the region to region 1 vob just fine.

Now trying to convert the vob to mpg but I'm concerned about the bitrate. Trying to retain the highest quality the bitrate here states it's 200kb/s where I thought I'd expect the original bitrate of 9250. Are my setting incorrect? Also unlike my other backups - the end file appears to be 1gb. I'd expect more like 2gb to 3gb.


c:\windows\system32>h:\ffmpeg_new\ffmpeg.exe -i h:\TheMovei\VTS_02_1.VOB h:\TheMovei\TheMovei.mpg -map 0:0 -map 0:1 -
aspect 16:9 -target ntsc-svcd -vcodec copy -acodec copy
FFmpeg version SVN-r7166, Copyright (c) 2000-2006 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --enable-avisynth --enable-amr_nb --enable-amr_wb --enable-vorbis --disable-sha
red --enable-mp3lame --enable-libogg --enable-faad --enable-gpl --enable-xvid --enable-faac --enable-dts --enable-a52 --
enable-mingw32 --enable-pp --enable-swscaler --enable-x264 --extra-ldflags=-static
libavutil version: 49.1.0
libavcodec version: 51.25.0
libavformat version: 51.6.0
built on Nov 24 2006 19:12:20, gcc: 4.1.1 [Sherpya]
Input #0, mpeg, from 'h:\TheMovei\VTS_02_1.VOB':
Duration: 01:31:50.9, start: 0.287267, bitrate: 5520 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 9250 kb/s, 25.00 fps(r)
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5:1, 448 kb/s
Stream #0.2[0x82]: Audio: ac3, 48000 Hz, stereo, 192 kb/s
Stream #0.3[0x81]: Audio: ac3, 48000 Hz, stereo, 192 kb/s
Output #0, mpeg, to 'h:\TheMovei\TheMovei.mpg':
Stream #0.0: Video: mpeg1video, yuv420p, 720x576, q=2-31, 200 kb/s, 25.00 fps(c)
Stream #0.1: Audio: mp2, 48000 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=137776 q=31.0 Lsize= 297298kB time=5511.0 bitrate= 441.9kbits/s
video:251496kB audio:43055kB global headers:0kB muxing overhead 0.932688%

Blue_MiSfit
30th April 2007, 17:21
Well, I'm no ffmpeg expert, but judging by this:

Output #0, mpeg, to 'h:\TheMovei\TheMovei.mpg':
Stream #0.0: Video: mpeg1video, yuv420p, 720x576, q=2-31, 200 kb/s, 25.00 fps(c)
Stream #0.1: Audio: mp2, 48000 Hz, stereo, 64 kb/s


I'd say that things aren't set up correctly. You're outputting MPEG-1 at full resolution, but at 200kbit, along with 64kbit stereo MP2, which will sound and look like shite :)

I dont see anything in your command line about re-encoding, it just looks like you're trying to remux to an MPG.

Odd. Maybe someone else with ffmpeg experience knows what's going on ..

~MiSfit

ilovejedd
30th April 2007, 20:56
I haven't tried doing this but it seems the command line options you've specified are at odds with each other. You're trying to convert it into SVCD compliant video, but you also want to retain the DVD's original audio and video streams. Have you used the command line above previously? What were the results? Also, are the sources you used before NTSC or PAL?

Anyhow, since I'm pretty sure your commandline won't work, try this:
ffmpeg.exe -i h:\TheMovei\VTS_02_1.VOB -map 0:0 -map 0:1 -aspect 16:9 -target ntsc-svcd -f svcd h:\TheMovei\TheMovei.mpg

If that works, then you can add bitrate options. From Wikipedia:
Video

* Codec: MPEG-2
* Resolution:
o NTSC: 480x480
o PAL/SECAM: 480x576
* Aspect Ratio: 4:3
* Framerate:
o NTSC: 29.97 or 23.976 frames per second
o PAL/SECAM: 25 frames per second
* Bitrate: Up to 2.6 Megabits (2,600 kilobits) per second
o Rate Control: Constant or variable bitrate
Audio

* Codec: MPEG-1 Audio Layer II
* Frequency: 44,100 hertz (44.1 kHz)
* Output: Monaural, dual channel, or stereo
* Bitrate: Certain bitrates between 32 and 384 kilobits per second, inclusive
o Rate Control: Constant bitrate

anatase
30th April 2007, 21:18
actually doesn't need to be svcd -

-target ntsc-svcd

was just the only option that suggestion changing the source pal to ntsc.

I'll try your suggestion now.

setarip_old
30th April 2007, 23:44
@anatase

If, in fact, you actually would prefer to convert from PAL to NTSC AS DVD, click on the following link, and after reading that post, click on the additional link contained in it:

http://forum.doom9.org/showpost.php?p=898860&postcount=13

anatase
1st May 2007, 16:08
much better there were a few things that changed the behavior that I didn't know...

placement of the arguments... appears that they must precede the target path and at least be following the source path... also the -sameq and the -target value of ntsc-dvd was a big contributor I had to google for a long time till I found that one existed. All the examples showed ntsc-svcd so now I know...

ffmpeg.exe -i h:\TheMovei\VTS_02_1.VOB -sameq -map 0:0 -map 0:1 -target ntsc-dvd -ac
odec copy h:\TheMovei\TheMovei.mpg


Output #0, dvd, to 'h:\TheMovei\TheMovei.mpg':
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 6000 kb/s, 29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, 5:1, 448 kb/s




I'm concerned about the q=2-31 actually more like interested in what it means.

Overall the quality of the video is awesome.

ilovejedd
1st May 2007, 22:38
q=2-31 is just the range of quantizer values that is allowed. The lower the value, the better the quality. Since you're doing -sameq and since you seem to be happy with the output, just ignore it.