Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th November 2015, 22:24   #1  |  Link
doomleox999
Registered User
 
Join Date: Nov 2015
Posts: 81
MeGUI (fps cannot be determined)

Hi everyone, first of all english is not my native language so I'm sorry if you see some mistakes in my writing.

My problem is very simple, I have some mkv files (with audio and video) that I want to encode with MeGUI, mainly to reduce their size, the thing is that when I drag any file to the program and I queue it and then I click "start" I get this error:




The program cannot determine the frame rate of the file.

When I check the properties of the file WHILE I'm playing it with MEDIA PLAYER CLASSIC, it clearly tells me that the frame rate is 30fps:




BUT when I go to the MediaInfo tab, it tells me the frame rate is VARIABLE:



How can I fix this problem? Is there a way to correct this or I have to manually change the fps when I encode it later?

Thanks!
doomleox999 is offline   Reply With Quote
Old 29th November 2015, 09:55   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,881
The frame rate variable (VFR) is a common problem, mainly with anime video.

To solve the problem you need mkvtoolnix installed in your system and:

1) Extract the timecodes of video track from your source mkv file:

"...megui\tools\mkvmerge\mkvextract.exe" timecodes_v2 "source.mkv" 0:"timecodes.txt"

Or use some GUI for mkvextract, for instance with UsEac3to:
- Load your source.mkv
- Click over Auxiliary Tools -> 'MkvExtract/Mux'
- Select 'Extract Timecodes of Track'
- Select the video Track and 'Run'
You obtain a "source.mkv_0.txt" file at same folder than "source.mkv"

2) Recode your source.mkv with MeGUI to output.mkv

3) Open output.mkv in MkvToolnix-gui.
- Select the video track
- Load the timecodes.txt in Properties -> Timecode file
- Start muxing
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 1st December 2015, 21:59   #3  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,821
Sometimes MediaInfo gets it wrong though, and MeGUI uses MediaInfo to obtain the frame rate. And MeGUI adds frame rate conversion to the script when indexing with ffms2 or opening a video via DirectShow, in which case the timecodes trick won't work because MeGUI will be converting to a constant frame rate by adding or dropping frames. I'm not 100% sure if MeGUI always offers up that warning no matter how the video is being opened.

If it was me I'd first try to get MeGUI to output the "correct" constant frame rate. I'm not sure how doomleox999 is opening the video but if it's via the Script Creator and after indexing with ffmsindex, MeGUI should open the video with frame rate conversion in the script something like this:

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\test.mkv", cachefile="D:\test.mkv.ffindex", fpsnum=24000, fpsden=1001, threads=1)

Manually changing the frame rate added to the script will often fix the problem. If it's 30fps like this:

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\test.mkv", cachefile="D:\test.mkv.ffindex", fpsnum=30, fpsden=1, threads=1)

If it's 29.970fps, like this:

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\test.mkv", cachefile="D:\test.mkv.ffindex", fpsnum=30000, fpsden=1001, threads=1)

I've come across the occasional video that was no doubt originally constant frame rate, but re-encoded as variable frame rate (probably via a GUI such as Handbrake) so repeated frames are only encoded once.... that sort of thing.... in which case converting back to a constant frame rate using the above method tends to work quite well. If it doesn't, generally because the source really is variable frame rate, then using the timescodes as tebasuna51 would be the better way to do it, but index with L-Smash rather than ffmsindex as currently MeGUI doesn't add frame rate conversion to the script when L-Smash is used.

Or use Handbrake/Vidcoder instead. They handle variable frame rate video quite well and can output variable frame rate without a need to mess with timecodes.

Last edited by hello_hello; 1st December 2015 at 22:21.
hello_hello is offline   Reply With Quote
Old 2nd December 2015, 12:12   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,881
Like hello_hello say, the encode can't include changes in number of output frames.
Use the timecodes is only allowed when the output frames is the same than input frames.

Then it's not allowed:
- Changes in decoder like FFVideoSource(..., fpsnum=30000, fpsden=1001,...) and/or DirectShowSource
- AviSynth functions like: Changefps(), Convertfps(), Trim(), decimates, etc.

@doomleox999

Can you upload a sample of your VFR source?
Maybe Zathor can include functions to MeGUI to extract and mux timecodes.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Reply

Tags
error, fps, fps cannot be determined, megui, mkv

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.