Hello
I would like to deinterlace a NTSC source to double framerate and save it as mpeg4. Unfortunately the aspect ratio gets wrong during the conversion because the pixel aspect ratio is set to 1. I could resize the video to 4:3 but I wonder if there is a way to set the correct pixel aspect ratio in my mpeg output file.
Thank you in advance for your advices.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 36
Thread
-
-
mp4 container? It's not that simple but https://forum.videohelp.com/threads/301849-Change-Aspect-Ratio-of-mp4-without-re-encoding
-
Normally the aspect ratio is automatically set while encoding using some sort of anamorphic encoding option. Which program are you using for encoding?
Alternatively you could try remuxing/resaving the MP4 you've already created using the correct aspect ratio with something like YAMB. I don't use it much but I think you need to specify the pixel aspect ratio, not the display aspect ratio.
Display aspect ratio/storage aspect ratio (resolution)=pixel aspect ratio.
There's two ways the aspect ratio is saved. At the container level and within the video stream. Remuxing the video while changing the aspect ratio changes it at the container level. Most, but not all players, will obey the container aspect ratio. I'm pretty sure my Sony Bluray player ignores the container aspect ratio and follows the aspect ratio written to the video stream. It can also be changed using this command line tool. http://forum.doom9.org/showthread.php?t=152419 -
MeGui encoder has SAR option box, it can give SAR to videostream, Config/Misc/ Force SAR,
you can find your value here: https://forum.videohelp.com/threads/323384-MeGUI-x264-Aspect-Ratio-Tag
I prefer to resize, to get rid of any possible aspect ratio conflicts for good in the future and also to get rid of interlace. -
ntsc dvd to square pixel video - 4:3 is 640x480 16/9 is 854x480 or 848x480 if you need mod16.
--
"a lot of people are better dead" - prisoner KSC2-303 -
I use xvid mpeg-4 codec... but I could use anything else if there are some more suitable encoders. I just want to save it deinterlaced to 59.94fps and keep a correct aspect ratio. What would be the best format for my conversion?
I tried to change the PAR using mp4box GUI, but it didn't turn out to work finally.. I'll try with YAMB, but I wonder if these 2 options can't be set in the encoder directly..
Thank you, I'll have a try with MeGui encoder. Do you think it's better to directly resize before encoding? I was afraid it could cause some quality loss rather than keeping the original pixels places and shapes. -
If you have good deintelacer, such as QTGMC, you have better material to work with. So you can resize (640x480). I tried to compare resized DV avi and not resized (both QTGMC deinterlaced), both encoded into H.264 with MeGui (CQ, CRF=18), watching on full HD screen, my nose sticked to screen, hardly see any differences. I'm sure there are differences, such as some lines at certain angle while moving, maybe some textures, that can make some visual effect, but hard to notice at all. I use a good DV avi source, from VX2000 camcorder, not sure if it would make any difference. I decided to resize, I sleep better somehow .
-
-
good double frame rate resize
This is the situation you can easily try yourself, to have some samples and to compare them. I did and choose to resize as oppose to keep original size. 720 is more than 640, understood, and original. I decided not to resize to 720x540 because upscale introduces artifacts. Maybe I was wrong. DV avi is always upscaled quite heavily, mostly to full HD so who cares if you start from 640 or 720 etc., it always look "heavily upscaled" on full HD . As I said, test it , it is 5 minutes. Original DV avi I keep anyway so no permanent loss is happening anyway ...
Upscale to 720p does not make sense, it is not worthy an effort. Just to store lots of data that were created out of thin air anyway. Not realy I know but think of it. Upscale will not make original look better. TV or players can upscale too.Last edited by _Al_; 27th Mar 2012 at 15:21.
-
Yes I agree with upscale to 720p.. it's only longer to process on avisynth and I could notice it stores lots of data for almost no visible difference finally.
Is it a common practice to resize to 720x540?
I understand you prefer to resize and not to worry about the pixel aspect ratio implementations... but isn't to the detriment of some quality loss (even if very small)?
For playing on computer, that should be the same since it would translate the pixel aspect ratio to resizing.. but how does the player process? Would it first resize to 640*480 (or 720*540) and then upscale to fit the screen? -
I encode all my 720x480 sources at 720x480 (unless I crop black borders) and use aspect ratio flags. Let the player do the scaling.
-
-
It depends on the encoder. I usually use x264 directy these days. With that you just set the command lines options for the SAR:
--sar=8:9 (4:3 NTSC)
--sar=32:27 (16:9 NTSC)
For example: x264 --preset=slow --crf=18 --sar=8:9 Output.MKV Input.AVS
In Xvid you use the PAR/DAR settings:
Try the attached files in your player. Do they play 16:9? The ring of stars around the Paramount logo should be a circle, not an oval.Last edited by jagabo; 27th Mar 2012 at 19:23.
-
I watched the samples that you made. They all play 16:9 in VLC
The avi files have more compression artifacts for higher file size. Are they encoded with x264?
Which is better: To set the pixel aspect ratio or to set the display aspect ratio?
What did you set for the other two files ? PAR or DAR?
Which encoder did you use for the mkv? -
The AVI files are Xvid, target quantizer 3.
PAR is easier to use. If you crop away black borders or junk at the edges of the frame the PAR does not change, the DAR does.
I used the x264 command line encoder for the MKV file. -
-
-
I just tried the command line you posted above. It works fine except there is no sound. My avisynth script is just a avisource(). Should I set any additional parameters for the audio?
Which settings should I use to get DVD quality ?Last edited by mathmax; 30th Mar 2012 at 16:01.
-
x264 doesn't handle the audio. After encoding I mux the audio and video together with mmg.
That's hard to answer because the two codecs differ a lot in the way they handle video. And there is no single "DVD quality". CRF=18 is better image quality than your average DVD. Except for retaining grain (usually visible as blocking or posterization artifacts in dark areas). If you want to retain that grain better you can lower the CRF value to 15 or even 12. Or add "--aq-mode=2 --aq-strength=1.5" to the command line. Vary the strength between 1.0 (the default) and 2.0, to your liking. The higher the value, the more grain you retain in dark areas, and the bigger the file will be. There's also a --tune=grain option you can try using. Examples:
x264 --preset=slow --crf=12 --sar=8:9 Output.MKV Input.AVS
x264 --preset=slow --crf=18 --aq-mode=2 --aq-strength=1.5 --sar=8:9 Output.MKV Input.AVS
x264 --preset=slow --crf=18 --tune=grain --sar=8:9 Output.MKV Input.AVSLast edited by jagabo; 30th Mar 2012 at 17:57.
-
well.. there is not much grain on that video. So I think I'll go with the third example. My video is a concert.. should I specify tune=film or let the default value?
I just don't want any compression artifacts. Is crf=18 ok? Or should I be perfectionist and lower it to 16?
There are many other parameters like --level (which I saw in quite examples on the web) but I don't know if they are needed in my case:
http://mewiki.project357.com/wiki/X264_Settings
Thank you for the advice about audio. Can I directly mux the AC3 of the DVD without reencoding? -
It depends on your perferences. Watch the dark background when there's only a little motion. Or maybe a shot with smoke/fog effects. You may see posterization with the film option, less with the grain option.
I suggest you try encoding some difficult shots (where it's easiest to see differences) at different settings and watch the results. Then decide what's appropriate for you. All settings except CRF=0 (lossless) will result in some degradation. But it's almost impossible to see any differences below CRF=12.
You probably don't need to worry about them. Most are set by the preset and tuning you select. Or x264 will calculate an appropriate value (--level, for example). Sometimes you might need to override some of the presets. Like when encoding for Blu-ray compatibility, or for a cell phone.
When working with DVD sources I use DgIndex to build the index file (for Mpeg2Source() in AviSynth) and demux the audio. After encoding I use mmg to mux the x264 video and AC3 audio together. -
I tried to render some tests as you advised, but I have a problem..
When playing the encoded video with windows media player (VLC is fine). The video get highly pixelated like it can't read well the format.
Here are the settings I use:
x264 input.avs -o output.mp4 --preset=slower --tune=film --crf=18 --sar=8:9
and here is a short sample:
http://www.mediafire.com/file/5tfxp7...ypf/Output.mp4
Any idea of the problem?Last edited by mathmax; 30th Mar 2012 at 20:51.
-
I encoded the video... but it's a bit slow to read on my PC (core I5 - 4gb RAM). I wonder if that is because of the double framerate
You can download the video here:
http://www.mediafire.com/?22w6x81vusdcslz
http://www.mediafire.com/?968om1x458lki4f -
Last edited by jagabo; 1st Apr 2012 at 19:24.
Similar Threads
-
MPEG Streamclip MPEG-TS to MPEG4/H264 (file size & aspect ratio query)
By Heathy65 in forum Video ConversionReplies: 5Last Post: 4th Apr 2012, 11:31 -
NTSC DV to H264 MP4: Vegas renders wrong aspect ratio
By zigmond in forum EditingReplies: 30Last Post: 16th May 2011, 01:54 -
Aspect Ratio
By jackowens in forum Video ConversionReplies: 2Last Post: 18th Mar 2009, 17:40 -
PAL aspect ratio 2.35 format to 16:9 NTSC
By chowa in forum Video ConversionReplies: 7Last Post: 2nd Feb 2008, 17:16