In AviSynth RGB can be any frame size. In YUY2 the width must be even. In YV12 the width and height must be even. Cropping or adding an odd number of scan lines off the top of an interlaced frame will result in a field order reversal. I'd recommend sticking with even numbers all the time.
Be sure the frames are progressive before scaling them.
Assuming takearushfan's numbers are right, and using even numbers:
- crop to 700x448 (offset from top left - 12px across, 99px down)
- scale 649x463
- pad 36px left, 6px top, 35px right, 11px bottom
You can perform the crop and resize in a single step:Code:# make video progressive, then: Crop(12,100,700,448) BilinearResize(648,464) AddBorders(36,8,36,8)
And for better compression, make the black borders mod 8 instead of mod 4:Code:# make video progressive, then: BilinearResize(648,464,12,100,700,448) AddBorders(36,8,36,8)
Code:# make video progressive, then: BilinearResize(648,464,12,100,700,448) AddBorders(32,8,40,8)
+ Reply to Thread
Results 31 to 60 of 62
-
Last edited by jagabo; 27th Feb 2012 at 07:17. Reason: fixed the frame height values
-
I was wondering if that would be an issue. Here's the values adjusted to be mod2:
- crop 700x448 (offset from top left - 12px across, 100px down)
- scale 648x464
- pad 36px left, 6px top, 36px right, 10px bottom
The width is cropped fro 720 to 700 to discard the thin black bars at the side (they don't form part of the 4:3 image), the height is cropped down to 448 so the same amount of content in the frame is visible when compared to the NTSC version.
By default, some tools crop equal amounts from all sides if not instructed to do otherwise. Thats what the 12px and 98px values are for - the area to be cropped needs to be displaced marginally to the right and also towards the bottom of the frame.
Doing the cropping changes the viewable image area from 4:3(1.33:1) to 1.714:1.
The (1.714) image is scaled to 648x464* to fit properly within the (1.78 - 720x480) NTSC frame - taking into account that the NTSC frame has small black bars at the top/bottom, which I think is best to keep.
*mathematically this number could/should? be 666x464, but it depends on whether the NTSC DVD's 16:9 image is contained within a 704x480 area of the 720x480 frame.
The last point is complex. There's a lack of clarity in the DVD spec regarding the usable image area of the digital frame. Some sources say the whole 720x480 are can be used to contain an image, other sources say only a 704x480 (or 714x480) region should contain usable image.
DV/Digibeta/D1 and much of the (digital) broadcast industry follow the latter standard, which forms part of the Rec.601 spec. The DVD spec is not so clearly defined. Well, not publicly defined anyway. Over $6,800 for a copy of it... -
-
In one thread around here someone with the DVD spec reported that it refers to the MPEG 2 spec for aspect ratios. The MPEG 2 spec is very clear: the full frame contains the indicated display aspect ratio. But with DVDs sourced from video tape, the MPEG 2 spec is usually ignored and the rec.601 spec is used. Ie, the industry professionals don't care (or don't know?) about the slight difference.
-
Well, as if things aren't bad enough when I'm wide awake, attached is a sleep-deprived sample. However, it does show where I need to make the cut.
You can see how the fullscreen's borders suddenly appear where the cut takes place.
I accidentally "colourliked" in reverse, making the clean NTSC starting clip match the dirty PAL colors.
The clip also points out the noticeable shift in the sound.
Nonetheless, I thought I'd show you something since I haven't posted in a bit. -
I had a quick search to see if I could dig up that thread, but I don't know what to search for other than; dvd aspect ratio mpeg specification. Ideally, I'd like to see a scan or word-for-word copy of the relevant section from the spec with my own eyes. I don't disbelieve what you're saying, but I'd like to see the context of this thread.
Of course, even if it's confirmed that the DVD spec doesn't follow Rec.601 - there's still the separate argument on what the spec *should* have been
takearushfan; The PAL section in your latest attachment has some regular frame duplication going on - every five frames. It also looks like there's some dropped frames as well.
Are you attempting to slow the PAL bits to 23.976fps and adjust the audio accordingly - or something else? -
-
... I'm trying to follow all the advice here but I still end up with duped and dropped frames from the PAL clips.
Yep, I'm trying to slow the PAL audio to match the lower pitch of the NTSC.
I'm also not sure how to handle to borders. I understand how the manipulation helps to match the AR, but even though the top/bottom bars are the same, it's a little too obvious that side bars suddenly appear. -
I believe this was the thread
https://forum.videohelp.com/threads/327702-Is-704x480-with-a-16-9-DAR-valid-for-DVD
The person with the offical dvd & blu-ray specs is "shon3i" . You can pm him at doom9 -
No, that wasn't the thread. It was a later thread where someone claimed to have access to the DVD spec at work. He verified that the DVD spec refers to the MPEG 2 spec for aspect ratio information.
The MPEG 2 spec: http://www.comp.nus.edu.sg/~cs5248/l03/IEC-13818-2_Specs.pdf -
-
That's an interesting thread.
I've always stuck with 704...
http://forum.doom9.org/showthread.php?t=44977&page=2
http://forum.doom9.org/showthread.php?p=1525105#post1525105
...because otherwise you'll get one aspect ratio on most stand-alone DVD players, and a different aspect ratio on most PC software DVD players...
http://forum.doom9.org/showthread.php?p=1072530#post1072530
...but 704 isn't legal for anamorphic 16x9 on DVD...
http://forum.doom9.org/showthread.php?p=1549376#post1549376
As for what PAR is used on commercial DVDs, you can find examples of both. Usually it's not obvious which has been used. I suspect SD studio cameras have always used ITU PAR (unless they've drifted out of alignment), and many 16x9 Hollywood movie transfers have used Generic PAR (the calibration sequences on many DVDs do!). Then there's some Bollywood releases, which get things so wrong that you have to guess the "correct" PAR by inventing a unique one for each DVD!
Cheers,
David. -
According to shon3i (who apparently has the DVD spec) it is legal.
https://forum.videohelp.com/threads/327702-Is-704x480-with-a-16-9-DAR-valid-for-DVD?p=2...=1#post2029895
Just because one (or a few) player has problems with it doesn't mean it's not legal. Many players have problems with many different legal features. -
Post the complete script you're using to convert the PAL video. Maybe someone will spot an error.
I'm also not sure how to handle to borders. I understand how the manipulation helps to match the AR, but even though the top/bottom bars are the same, it's a little too obvious that side bars suddenly appear. -
I gave you ways of doing that in this post:
https://forum.videohelp.com/threads/343911-Using-NTSC-%2816-9%29-and-PAL-%284-3%29-sour...=1#post2143969
Then use this:
Originally Posted by jagabo -
-
-
More expansion (smaller borders at the sides):
- crop 700x431 (offset from top left - 12px across, 100px down)
- scale 684x464
- pad 18px left, 6px top, 18px right, 10px bottom
Code:BilinearResize(684,464,12,100,700,431) AddBorders(18,6,18,10)
Full expansion (no borders at the sides):
- crop 700x408 (offset from top left - 12px across, 100px down)
- scale 720x464
- pad 0px left, 6px top, 0px right, 10px bottom
Code:BilinearResize(720,464,0,100,700,408) AddBorders(0,6,0,10)
-
Okay jagabo, and all you guys, I'm really sorry but for the life of me I cannot get the audio to match the NTSC pitch. And yes, I obviously tried the code you posted. I've looked up documentations, tried rearranging steps and scripts, etc... nothing works. What are the exact steps to be taken and in what order do you perform them?
Thanks. -
-
AssumeFPS(), ChangeFPS(), etc. don't change the audio. You have to use AssumeSampleRate() and ResampleAudio() to change the pitch and length. Since you are changing the frame rate from 25 to 24000/1001 you need to stretch the audio by the same amount. That means reducing the sample rate to 24000 / 1001 / 25 (0.959041) times the original sample rate. So mulitply the sample rate by that, 48000 * 0.959041 = 46034. Since DVDs can't play 46034 Hz audio you then need to resample it to 48 KHz.
Code:#starting 25 FPS PAL video with 48000 Hz audio AssumeFPS(24000,1001) # time stretch the video AssumeSampleRate(46034) #time stretch the audio ResampleAudio(48000) #back to 48000 Hz samples
Last edited by jagabo; 1st Mar 2012 at 07:01.
-
-
Long-winded update:
For now I'm just going to stick with the audio issue I'm having.
I figure it might help if I provide the steps I use, as well as the scripts involved. I'm doing this because despite jagabo's generous, repeated outlining and providing code samples, I just can't get the PAL audio the lower to the NTSC pitch.
I have one folder with the NTSC VOBs and another folder with the PAL VOBs.
I use one script for working on the NTSC and another separate one for the PAL clips.
Again, for the time being I'm scrapping the cropping, borders and resizing. I'll focus on that once I figure out what's wrong with the audio nightmare.
Here's what I've tried:
1. Use DGIndex on a portion of the NTSC version using "forced film", since the application reports it as pure film. Therefore, I DO NOT incorporate TFM and Decimate into this portion's script.
2. Use DGIndex on the same portion of the PAL version, "honoring" the pulldown flags. Therefore I obviously DO use TFM and Decimate in this version's script.
-
The NTSC script:
MPEG2Source("VTS_01_1.d2v")
# for the sake of this issue, there's nothing else to do here, right?
-
The PAL script:
MPEG2Source("VTS_01_1.d2v").TFM().TDecimate()
AssumeFPS(24000, 1001, sync_audio=true)
-
For the NTSC clip:
Open the NTSC clip (via the script) in VDub
Video > Direct stream processing
Audio > Direct stream processing, using "Audio from other file". The file chosen is the NTSC one that's a result of the DGIndex's demuxing. Save.
For the PAL clip:
Open the PAL clip (via the script) in VDub
Video > Direct stream processing
Audio > Direct stream processing, using "Audio from other file". The file chosen is the PAL one that's a result of the DGIndex's demuxing. Save.
I then view/listen to both and notice that the PAL pitch is still higher than the NTSC -
There is no audio loaded in the script, so if you choose the DGIndex demuxed file, it's the same as the original
You need to load audio into the script for the assumefps and sync_audio=true to work, also it looks like you are IVTCing the PAL video = bad . You don't need TFM().TDecimate() for PAL - telecine only refers to NTSC
PAL
Code:vid = MPEG2Source("VTS_01_1.d2v").TFM() aud = NICAC3Source("PALaudio.ac3") audiodub(vid,aud) AssumeFPS(24000, 1001, sync_audio=true)
-
-
-
Similar Threads
-
NTSC/PAL but exact film length: How so?
By Anonymous5394 in forum Newbie / General discussionsReplies: 2Last Post: 5th Mar 2010, 11:42 -
NTSC video with a film-like/PAL to NTSC conversion type of look that shouldn't
By Bix in forum RestorationReplies: 34Last Post: 8th Feb 2010, 15:17 -
FPS NTSC & PAL Film/Digital
By flamingo in forum Newbie / General discussionsReplies: 5Last Post: 13th Nov 2007, 13:21 -
FPS..NTSC & PAL Standard Cinema Film/Digital
By flamingo in forum TestReplies: 0Last Post: 9th Nov 2007, 08:30 -
29.976 to 25fps (removing pulldown from a NTSC converted PAL film transfer)
By ecc in forum Video ConversionReplies: 25Last Post: 15th Jul 2007, 22:31