View Full Version : MeGUI: Encoded video longer than original
dialsc
23rd August 2010, 16:08
hello all,
some time ago i reported that i was unable to convert the avatar video ripped from a bluray into h264, the thread can be found here (http://forum.doom9.org/showthread.php?p=1398587). after following the tip form here (http://forum.doom9.org/showthread.php?t=154274) telling to extract the video stream as mkv and then use FFMSIndex to index the video and to use as input for conversion things went well.
two days ago i wanted to reencode the video stream using the same procedure (mkv + FFMSIndex) but suddenlty the resulting video file (mp4) becomes longer than the original. it's playtime is about 1 1/2 minutes longer than the original video.
i do not know if this i megui related or not. but the only change in my setup since i succeeded with the conversion was the update of megui to version 0.3.5.8.
anyone got an idea what could be wrong?
Sharktooth
23rd August 2010, 17:17
FFMS2 rev325. it seems there are problems with FPS detection (hence different movie lenght).
Ensure to set FPS to the correct value in the AVS script.
dialsc
23rd August 2010, 20:12
first of all i have to declare that i'm realy a novice in the area of video encoding/transcoding/... so if there are questions that sound stupid, please forgive me... ;)
k, i do not know which ffms version comes with the current megui and i do not know how to figure out. the only thing i've found was the verison 2.13 in the change log of ffms in the tools directory of the megui install root. ffms2 i haven't found at all.
this is what i did to have megui's AviSynth script creator producing the avs file:
select the ffindex file as video input file
manualy set crop to 2, 2, -2, -2
switch to tab filters and click to the button Analyse...
finally save the whole thing
after that i get the following script:
LoadPlugin("C:\Program Files (x86)\megui\tools\ffms\ffms2.dll")
FFVideoSource("D:\tmp\tsmuxer\avater_new\tmp\avater_track_00002.demuxed.mkv")
#deinterlace
crop( 2, 2, -2, -2)
#resize
#denoise
following your hint i figured out that mediainfo reports a fps value of 23.976 for the source mkv and the result mp4 has 23,809. as the frames per second are lower it needs more time to play all frames, doesn't it? the only thing i found regarding fps in the AviSynth script creator dialog is under the Filters tab when i select the AVI Source /DSSource sub tab. nowhere else i see a possibility to set the fps config but this one is disabled.
can you plz give me a hint how to set the correct fps rate in the avs script?
and one more question if you do not mind. i see a lot of present settings available in the drop down list of megui's main window under Encoder Settings. i would like to create a mp4 video file that will be muxed into a mkv. i would like to have a very good quality but up to now the resulting mp4 becomes up to 15gb what is a wee bit very large. what setting do you think is a good one if i intend to watch the resulting mkv at pcs and my popcorn hour? Unristricted with High Quality or BlueRay XY? for me it doesn't matter if the pc is working one or two hours more if the result is smaller but the quality is very high.
thank you very much!
nurbs
23rd August 2010, 20:50
Add
AssumeFPS(24000, 1001)
to your script. Watch out for updates of ffmpegsource. The bug will hopefully be fixed soon.
About the presets:
The Blu-Ray preset is for when you intend to but the file on a standard blu-ray. There is no reason to use it in any other case since there are some options that decrease the quality at a given bitrate (short GOP, restricted b-pyramid,...). Since you want the result to play on a popcornhour I'd recommend the DXVA preset. Use "high def" or "standard def" depending on the resolution you are encoding at. In the codec configuration you can change the preset, tuning and quality number to find the compromise between encoding speed, filesize and quality you want. Keep in mind that in presets faster than "normal" the psy optimizations not fully used, if at all. For tuning you'll probably want "film" or "animation" depending on the source. Experiment with the quality number until you find something that suits you. 20 to 23 is a good range to start looking. Higher number means lower quality and filesize.
Zathor
23rd August 2010, 22:11
Watch out for updates of ffmpegsource. The bug will hopefully be fixed soon.
The bug has been fixed two hours ago:
http://code.google.com/p/ffmpegsource/source/detail?r=327
But we have to wait for a compiled build.
AMED
24th August 2010, 00:52
you mean like this :)
http://www.mod16.org/ffms2/ffms2-r327.7z
Sharktooth
24th August 2010, 01:03
good :)
uploading to auto-update server... ;)
edit: r327 uploaded. still no MT or 64 bit version. however, if the fix works (and it should) there's no longer the need to specify the correct FPS in the .AVS
dialsc
24th August 2010, 14:34
first of all, thank you very much for your quick and competent help.
there are still one or two questions i would like to ask.
Since you want the result to play on a popcornhour I'd recommend the DXVA preset.
i read a bit about DXVA and the question came up if this is a wide compatible kind of encoding. i would like to be able to play the final mkvs on every pc that has the power to decode it as well as on other stand alone players and on tvs that support it. in general i want the mkvs to be compatible with a lot of possible players. is DXVA really a good idea considering my intents?
For tuning you'll probably want "film" or "animation" depending on the source.
i'm not quiet sure when to use animation. is e.g. a simsons episode also animation? would i use animation or film for e.g. avatar?
again, thank's a lot!
nurbs
24th August 2010, 14:52
Playback on PCs isn't a problem as long as you do it in software. If you use hardware, either GPU or a standalone player, some is restricted to level 4.1 and some can do more. The DXVA profile is restricted to level 4.1 so it's a safe bet for wide compatibility. Portable devices might have further restrictions.
--tune animation is for stuff that looks like The Simpsons (flat surfaces, outlines,...). For CG that's supposed to look real, like Avatar or Shrek, use film.
dialsc
24th August 2010, 14:53
ok, think i got it now. thank you very much!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.