PDA

View Full Version : NTSC DVD Rip Video Converted to H.264 Has 19.181 FPS


MachThree
15th March 2009, 07:02
As the title suggests, I am trying to convert MPEG-2 video from a DVD to H.264, but the frames per second always gets set to 19.181 FPS. What's weird about this is that I'm converting a whole season of a TV show, and about 75% of the episodes convert just fine into 23.976 FPS H.264 files, but the other 25% convert to 19.181. I searched "19.181" and only found something about IVTC lowering the frame rate by 80% twice, but I don't believe this is what's happening.

Here's the script.
DGDecode_mpeg2source("09.d2v", info=3)
ColorMatrix(hints=true, threads=0)
#deinterlace
crop( 6, 0, -4, 0)

LanczosResize(640,360) # Lanczos (Sharp)
#denoise


Here's some information about the VOB file being converted.
General
Complete name : VTS_01_1.VOB
Format : MPEG-PS
File size : 1.96 GiB

Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, Matrix : Default
Bit rate mode : Variable
Bit rate : 9 800 Kbps
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16/9
Frame rate : 29.970 fps
Standard : Component
Colorimetry : 4:2:0
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.946

Audio
ID : 128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Format profile : Dolby Digital
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz

Text #1
ID : 32 (0x20)
Format : RLE
Format/Info : Run-length encoding
Video delay : 2s 69ms

Text #2
ID : 34 (0x22)
Format : RLE
Format/Info : Run-length encoding
Video delay : 2s 69ms

Menu
Format : DVD-Video

What's going on?

neuron2
15th March 2009, 07:18
What is your field operation in DGIndex? What is your x264 command line?

Load the script into VirtualDub and do File Information. What is the reported frame rate?

setarip_old
15th March 2009, 07:28
@MachThree

Hi!
I am trying to convert MPEG-2 video from a DVD to H.264


Complete name : VTS_01_1.VOB
Format : MPEG-PS
File size : 1.96 GiBLooks like you've got a really fouled up DVD - I've never seen a DVD that has a single .VOB greater than 1Gig.

What's the Title and Region number of your DVD?

MachThree
15th March 2009, 07:30
What is your field operation in DGIndex? What is your x264 command line?

Load the script into VirtualDub and do File Information. What is the reported frame rate?

DGIndex
Stream_Type=1
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x480
Field_Operation=1
Frame_Rate=23976 (24000/1001)
Location=0,0,0,fb801

x264 Command Line
program --pass 2 --bitrate 1408 --stats ".stats" --level 4.1 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --weightb --direct auto --subme 7 --trellis 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct
--ipratio 1.1 --pbratio 1.1 --vbv-bufsize 24000 --vbv-maxrate 24000 --qcomp 0.5 --me umh --merange 12 --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

VirtualDub File Information gives me 23.976 FPS.

MachThree
15th March 2009, 07:31
@MachThree

Hi!


Looks like you've got a really fouled up DVD - I've never seen a DVD that has a single .VOB greater than 1Gig.

What's the Title and Region number of your DVD?

I use DVD Shrink and told it not to separate the video into 1GB chunks, thus each VOB is one episode.

Also, it's the first season of 24, bought in the US, so I assume it's region one.

setarip_old
15th March 2009, 09:22
I use DVD Shrink and told it not to separate the video into 1GB chunks, thus each VOB is one episode.Sorry to go off on a tangent, but that's intriguing.

Were you able to accomplish that in "Full Disc" mode, or "Re-author" mode?

Who Am I ?
15th March 2009, 14:52
dvd sample too suggest the right interlacing ?

Inspector.Gadget
15th March 2009, 15:40
I did this before by accident when I used "Force Film" IN DGIndex to make a d2v AND did field matching / blend decimation with Avisynth.

neuron2
15th March 2009, 16:45
Loading the script into VirtualDub gives the right frame rate, so assuming you haven't goofed as described by Inspecter.Gadget (because the script you posted doesn't show any IVTC filtering), then there's no explanation.

You could try forcing the frame rate with the --fps option for x264. Maybe somehow x264 doesn't read it right from the script.

Or maybe you're not giving us a fully accurate description of the claimed error case.

MachThree
15th March 2009, 16:54
I did this before by accident when I used "Force Film" IN DGIndex to make a d2v AND did field matching / blend decimation with Avisynth.

I don't think I did this. I use MeGUI, and I never checked a box telling it to do this.

Sorry to go off on a tangent, but that's intriguing.

Were you able to accomplish that in "Full Disc" mode, or "Re-author" mode?

Re-author mode.

dvd sample too suggest the right interlacing ?

I'm not sure what you're saying here.

Loading the script into VirtualDub gives the right frame rate, so assuming you haven't goofed as described by Inspecter.Gadget (because the script you posted doesn't show any IVTC filtering), then there's no explanation.

You could try forcing the frame rate with the --fps option for x264. Maybe somehow x264 doesn't read it right from the script.

Or maybe you're not giving us a fully accurate description of the claimed error case.

Well I'm not lying to you.

neuron2
15th March 2009, 16:58
Pal, I didn't say you were lying. And if you want my help, you won't make comments like that.

You're saying now that you don't "think" you made the suggested mistake. Well, don't rely on what you did. Can you make this happen again right now? Try the whole process again and see if it is duplicatable. I doubt you can make this happen with the settings and things you reported. And that doesn't mean I think you're a liar. It means you may have remembered wrong.

MachThree
15th March 2009, 17:05
Pal, I didn't say you were lying. And if you want my help, you won't make comments like that.

You're saying now that you don't "think" you made the suggested mistake. Well, don't rely on what you did. Can you make this happen again right now? Try the whole process again and see if it is duplicatable. I doubt you can make this happen with the settings and things you reported. And that doesn't mean I think you're a liar. It means you may have remembered wrong.

Okay. I have done this several times and have indeed duplicated my results. What I do is use DGIndex and create a D2V file using the above-described VOB. Then I use MeGUI's built-in AVS Creator to make the AVS, which I then I use to encode to x264, using the above-described x264 command line. There's nothing else going on.

neuron2
15th March 2009, 17:17
OK, assuming that is all accurate, then we have either:

1. x264 got confused about the frame rate, or

2. Your method for examining the frame rate of the raw encoded AVC stream is inaccurate.

To decide between the two, you can use --fps 23.976 on your x264 command line to test 1 above.

For 2, please upload a fragment of your encode that you claim has 19.181 fps. I can check what is actually encoded in the stream.

What tool do you use to get 19.181 for a raw AVC stream?

laserfan
15th March 2009, 18:26
In the first post the vid is shown as 29.97 interlaced tff, then DGindex with Force Film "on" (the default iirc) is used, resulting in 23.976. Isn't that wrong? Why isn't that the problem i.e. just go back & try again w/FO=0?

p.s. @DG every time this comes up, in my old tired head I have to review the DGindex manual, and the Field Operation discussion doesn't show the codes (0, 1, 2) so I have to look for those separately below. Then the codes and the description paragraphs are ordered differently too. Might be nice in a future rev of the manual that the codes are included up in the FO description, and/or the paras are ordered in 0, 1, 2 order anyway; I always confuse myself. :)

p.p.s. I think I mis-remember the default, that it's Ignore pulldown (sorry).

setarip_old
15th March 2009, 19:01
@MachThree

As an experiment, instead of using DVDShrink, try using DVD Decrypter in "IFO mode" - and select the individual PGCs for each episode...

neuron2
15th March 2009, 20:37
@laserfan

That is not the problem. It doesn't explain the reduction to 19 fps.

@setarip_old

That's just obfuscating the issue because there is no cogent reason to think that can change anything related to framerates. His script when served to VirtualDub gives 23.976, so the problem comes after the ripping. You're just muddying the waters.

unskinnyboy
16th March 2009, 01:12
MachThree, can you post a sample of this VOB? If this is repeatable by you, it should be repeatable by us.

MachThree
16th March 2009, 01:38
OK, assuming that is all accurate, then we have either:

1. x264 got confused about the frame rate, or

2. Your method for examining the frame rate of the raw encoded AVC stream is inaccurate.

To decide between the two, you can use --fps 23.976 on your x264 command line to test 1 above.

For 2, please upload a fragment of your encode that you claim has 19.181 fps. I can check what is actually encoded in the stream.

What tool do you use to get 19.181 for a raw AVC stream?

I'm using MediaInfo to get the FPS. I'm pretty sure it's lower than 23.976, though, because it's obvious when watching the video (it seems to flicker).

I added --fps 23.976 to my command line and I'm going to see if that does anything. I'll let you know as soon as it's done.

EDIT: Okay, I just tried encoding a 30 second clip of the video, and it seems to be working! I'll encode the whole thing and let you know how that goes.

MachThree, can you post a sample of this VOB? If this is repeatable by you, it should be repeatable by us.

Isn't this against the rules? It's copyrighted material.

Ajax_Undone
16th March 2009, 02:10
I don't think its against the rules cause its a sample not the whole episode...

*Edit Plus it will help them figure out this problem for you... If you feel that it might violate something upload it and send the link through a PM to skinny.

http://www.softpedia.com/get/System/File-Management/CutFile.shtml

Use this...

neuron2
16th March 2009, 02:21
Isn't this against the rules? It's copyrighted material. Small samples fall under the fair use exemption.

It would be useful for you to post a sample that causes this, so that the relevant software can be repaired. Your contribution in that regard will help our community and would be appreciated.

MachThree
16th March 2009, 22:41
I don't think its against the rules cause its a sample not the whole episode...

*Edit Plus it will help them figure out this problem for you... If you feel that it might violate something upload it and send the link through a PM to skinny.

http://www.softpedia.com/get/System/File-Management/CutFile.shtml

Use this...

Small samples fall under the fair use exemption.

It would be useful for you to post a sample that causes this, so that the relevant software can be repaired. Your contribution in that regard will help our community and would be appreciated.

http://files.filefront.com/VTS+01+1+CUTzip/;13478218;/fileinfo.html

That's part of the DVD file I was converting. Let me know if you want the H.264 stream.

unskinnyboy
16th March 2009, 23:04
http://files.filefront.com/VTS+01+1+CUTzip/;13478218;/fileinfo.html

That's part of the DVD file I was converting. Let me know if you want the H.264 stream.Sorry for not specifying this clearly before, but could you post a bigger sample for effective analysis - at least 2-3 minutes long, and from the middle of the actual show, and not include credits in it? This sample is just 14 seconds long, and has credits as part of it - the reason I am asking you to exclude credits, is because sometimes the nature of the credits maybe differ from the actual content (i.e. credits could be interlaced, whilst the actual content could be film), and could thus be misleading.

MachThree
17th March 2009, 00:54
Sorry for not specifying this clearly before, but could you post a bigger sample for effective analysis - at least 2-3 minutes long, and from the middle of the actual show, and not include credits in it? This sample is just 14 seconds long, and has credits as part of it - the reason I am asking you to exclude credits, is because sometimes the nature of the credits maybe differ from the actual content (i.e. credits could be interlaced, whilst the actual content could be film), and could thus be misleading.

I'm having trouble getting CutFile to work with me. What should I enter in for Initial Block, End Block, and Block Size in order to get a 2-3 minute sample of a 42 minute episode?

unskinnyboy
17th March 2009, 15:52
I'm having trouble getting CutFile to work with me. What should I enter in for Initial Block, End Block, and Block Size in order to get a 2-3 minute sample of a 42 minute episode?CutFile is not a very user-friendly tool for cutting VOBs. For a 0.99 GB VOB, something like Initial Block = 167936, End Block = 257024 & Block size = 2048, should give you around 3 minutes worth of video. If this doesn't work for you, try ChopperXP, which is more visual, and easier to work with.

buzzqw
17th March 2009, 16:00
better use DGSplit! a very excellent cutter

BHH

MachThree
18th March 2009, 02:52
better use DGSplit! a very excellent cutter

BHH

That did the trick. The video is 2 minutes and 31 seconds long.

http://files.filefront.com/VTS+01+1+CUTzip/;13485105;/fileinfo.html

Thanks for all the help, you guys!

neuron2
18th March 2009, 04:53
So are you saying that you can create the problem with the file you uploaded?

MachThree
18th March 2009, 05:18
So are you saying that you can create the problem with the file you uploaded?

Well, I could with the 42-minute VOB file. I'm not sure if it will replicate with the 2-minute VOB cut-out from it.

neuron2
18th March 2009, 13:53
Before you ask a bunch of people to go through the process, please verify that it fails *with the sample you uploaded*.

Personally, I won't try to encode it until you do that.

The video is soft pulled-down but hybrid, i.e., there are sections without pulldown. Still, Force Film mode makes it 23.976 and looks fine.