I have a 720p H.264 MKV with a frame rate of 23.976 fps (only video) that I want to downscale to 480p using MeGUI. Normally, I would use Handbrake, but Handbrake stops encoding this particular video partway through (I wouldn't mind getting a solution to that problem, either, but that's another topic).
So, when I opened this video in MeGUI, the video player that automatically opens showed that the video has 25244 frames, which is equivalent to a frame rate of 17.843 fps -- but every other video player I've opened it with shows a frame rate of 23.976 fps, which is so much more logical anyway. I looked for frame rate options in the AviSynth script creator, and this is what I found:
The FPS option is greyed out no matter what. What's the issue here? Thanks in advance!
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 10 of 10
Thread
-
-
Here's the MediaInfo output from the video in my first post:
Code:General Unique ID : 176241134147725643450174896860604446584 (0x8496CEC9EF6C0552999A9388B750B778) Complete name : G:\2.mkv Format : Matroska Format version : Version 2 File size : 201 MiB Duration : 23mn 44s Overall bit rate : 1 183 Kbps Movie name : Spice & Wolf OVA Encoded date : UTC 2012-03-20 05:23:33 Writing application : mkvmerge v5.3.0 ('I could have danced') built on Feb 9 2012 10:38:07 Writing library : libebml v1.2.3 + libmatroska v1.3.0 Attachment : Yes Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.0 Format settings, CABAC : Yes Format settings, ReFrames : 8 frames Muxing mode : Header stripping Codec ID : V_MPEG4/ISO/AVC Duration : 23mn 44s Bit rate : 1 181 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.053 Stream size : 197 MiB (98%) Title : Video (H.264) Writing library : x264 core 68 r1195 5d75a9b Encoding settings : cabac=1 / ref=8 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=9 / psy_rd=0.7:0.0 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=1 / nr=0 / decimate=1 / mbaff=0 / bframes=6 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=1181 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=0 Language : Japanese Default : Yes Forced : No
And MediaInfo says all of these videos have frame rates of 23.976, too. -
Code:
#deinterlaceLoadPlugin("G:\MeGUI\tools\ffms\ffms2.dll") FFVideoSource("G:\2.mkv", threads=1)#deinterlaceLoadPlugin("G:\MeGUI\tools\ffms\ffms2.dll") FFVideoSource("G:\2.mkv", threads=1) #deinterlace #crop LanczosResize(848,480) # Lanczos (Sharp) #denoise
-
Add AssumeFPS(24000,1001)
Code:LoadPlugin("G:\MeGUI\tools\ffms\ffms2.dll") FFVideoSource("G:\2.mkv", threads=1) AssumeFPS(24000,1001) LanczosResize(848,480) # Lanczos (Sharp) #denoise
-
With the old script, the video output was 23:45 long (the correct length) and had a frame rate of 17.843 fps. With the script you recommended, poisondeathray, the video output was 17:40 long and had a frame rate of 23.976 fps (the correct frame rate). MeGUI still treated the video input as though it had 25424 frames, so the video output ran faster than it should when it was forced to 23.976 fps. In reality, the video should have 34162 frames, but I don't know where these missing frames are -- the video input is 200 MB large, which is the same size as the video stream in the original MKV that I demuxed the video from, so I feel like the frames are there. Is this file corrupt somehow?
Thank you again for your time. -
Source may be VFR.....
Open the video directly through AVS Creator, script should be using DirectShowSource.
The duration of the video should be correct now. -
Anonymous847344Guest
Create a script like this in a notepad changing .txt to .avs:
DirectShowSource("2.mkv", fps=23.976, video=true, convertfps=true)
save
and the script must be in the same directory of the video file.
Later, you must to open this script in Megui in AVS Script Creator...
If you continue having problems, you must to extract the h264 file from the MKV with MKV extract.
Regards -
MeGUI doesn't add frame rate conversion when you open a video for indexing/decoding with ffmsindex, hence the option being greyed out. It only adds it when opening a video via DirectShowSource (and maybe AVISource). I asked the developer at one stage why it doesn't because to me it'd be a good idea if it did. I can't remember why he said he wouldn't add it for ffmsindex. Apparently it had the potential to cause some sort of problem. Anyway.... after you open the video in the usual manner and set up the encoding job you can add the frame rate conversion stuff to the script manually. To get ffmsindex to do the frame rate conversion you'd change the script to look something like this:
LoadPlugin("G:\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("G:\2.mkv", threads=1, fpsnum=24000, fpsden=1001)
LanczosResize(848,480) # Lanczos (Sharp) #denoise
The above should convert the video to a 23.976 fps constant frame rate.
Another option might be to encode it "as-is" (as you've been doing). That should effectively encode the same number of frames as the original video using a constant frame rate, but if the frame rate of the original video varies, the duration will be wrong or the audio sync will drift in places etc. To fix that you can use MKVCleaver to extract the video timecodes from the original MKV as a text file. You can then remux the MKV which MeGUI produces while adding the extracted timecodes file which should change the encoded video to the same variable frame rate as the original.
On the odd occasion I've had similar frame rate issues where the video appears to be constant frame rate but duplicate frames (or frames with twice the normal duration) effectively make the video variable frame rate. For some reason those duplicate frames don't get encoded. Adding the frame rate conversion to the script should fix that. If you extract the video timecodes from the original MKV and open it with notepad, every frame should have the same duration if the video is constant frame rate.
Similar Threads
-
Changing audio frame rate?
By architectofpain in forum AudioReplies: 22Last Post: 5th Apr 2013, 10:27 -
Changing DVD Frame rate
By ArtOfLosingMFZB in forum Newbie / General discussionsReplies: 7Last Post: 28th Dec 2011, 19:58 -
Changing FPS of .h264 loaded in MeGUI w/Avisynth
By karpodiem in forum Video ConversionReplies: 8Last Post: 6th Apr 2009, 10:27 -
changing frame rate, making a better dvd picture
By motleycool in forum Newbie / General discussionsReplies: 3Last Post: 25th Aug 2007, 02:30 -
Frame rate conversion by changing frame count
By asmaa in forum Video ConversionReplies: 2Last Post: 1st Aug 2007, 10:15