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 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th May 2006, 14:51   #21  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Quote:
Originally Posted by 3ngel
@berriman
x264 produces VFR output if you use more than 1b frame.
Is for this reason, that if you use VDub to generate a VFW encoded x264 you'll get a "modulated out of sync" mkv.
Actually VFW x264 is not usable with any program (until Vdub mod or official will update to the latest matroska source).
Please explain how using more than one b-frame changes the length of time a frame is displayed, resulting in a variable frame rate stream.
squid_80 is offline   Reply With Quote
Old 6th May 2006, 15:01   #22  |  Link
unmei
frying subs
 
unmei's Avatar
 
Join Date: Jan 2003
Location: ch-2500
Posts: 891
b-frames don't imply VFR, packed b-frames would (but that is only required in AVI, where dummy frames are inserted to compensate)

[edit]ok the sentence above is *bulls*, but i leave it in for amusement/to keeps what godofagap refers to. What i was probably thinking there is that a certain "frame" in the VfW sense also contains data that doesn't belong to the timespan corresponding to the index of that frame. Of course that is not VFR as it can't be since such a concept simply is not present in a framerate-and-frameindex setting like VfW/AVI.[/edit]

On the other hand, i guess skip frames can (could?) produce VFR in the sense that a VFR capable container could drop them entirely (as they can be easily reconstructed if required)
__________________
-nyo

Last edited by unmei; 12th May 2006 at 14:59.
unmei is offline   Reply With Quote
Old 7th May 2006, 02:20   #23  |  Link
GodofaGap
Registered User
 
Join Date: Feb 2006
Posts: 823
Packed bitstream has nothing to do with the display time of a frame either... it just makes sure frames are decoded + displayed in the right order. It's not VFR.

It's seems the VFW myths are getting weirder and weirder...
GodofaGap is offline   Reply With Quote
Old 7th May 2006, 02:39   #24  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
LOL, i should add this one to my list of myths...
Sharktooth is offline   Reply With Quote
Old 7th May 2006, 08:07   #25  |  Link
Alizar
Registered User
 
Join Date: Jan 2006
Posts: 17
Quote:
Originally Posted by 3ngel
@berriman
x264 produces VFR output if you use more than 1b frame.
Is for this reason, that if you use VDub to generate a VFW encoded x264 you'll get a "modulated out of sync" mkv.
Actually VFW x264 is not usable with any program (until Vdub mod or official will update to the latest matroska source).
Actually, no. x264 will not produce a variable frame-rate file. The problem lies in the ordering of the frames within the stream. AVI (not being designed to actually hold h264) is not particulary compatible.

But as far as 'VFR' to get that out of h264 you have to use an MKV with a timecodes file.

Edit: Beaten like a baby seal -- forgot I had this window open for a while >_>
Alizar is offline   Reply With Quote
Old 8th May 2006, 08:31   #26  |  Link
thuongshoo
Registered User
 
Join Date: Mar 2006
Posts: 197
foxyshadis! I try to send you a PM but not success.
I read your guide
http://www.avisynth.org/mediawiki/wi...FrameRateVideo
Can you give a sample AVIsynth script which can open vfr video ?
*First ,I try to write 09.avs
DirectShowSource("c:\09.wnmv", fps=30.25, convertfps=true)
TFM(mode=0,pp=0)
TDecimate(mode=4,input="stats.txt")

and open this file by Megui. Run. Messagebox says that "it can't open stats.txt"
and I correct this file
DirectShowSource("c:\09.wnmv", fps=30.25, convertfps=true)
TFM(mode=0,pp=0)
TDecimate(mode=4,output="stats.txt")
Ok !
*Sencond, I re-edit 09.avs as following :
DirectShowSource("c:\09.wnmv", fps=30.25, convertfps=true)
TFM(mode=0,pp=0)
TDecimate(mode=6,hybrid=2,input="stats.txt",mkvout="timecodes.txt")
Messagebox says that "... CRC .... "
I dont know AVIsynth at all. Can you give a scripts sample ?
I haven't understand TFM and TDecimate's arguments. I search at Doom but there are many result
Bye!
thuongshoo is offline   Reply With Quote
Old 8th May 2006, 09:54   #27  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,175
Should be mode=5 in the second part, and you can get rid of the crc warning by opening up stats.txt and removing "crc=0xbbbbbb" or whatever from the top. It won't hurt it. Otherwise, it looks good.

Here's a sample of my own usage:
Code:
#x=x.tfm(mode=0,pp=0,slow=0,mchroma=false,mi=256,output="beboppin.tfm.txt")
#return x.tdecimate(mode=4,output="beboppin.tdec.txt").crop(0,0,4,4)
#return x.tdecimate(mode=5,hybrid=2,dupthresh=1.1,concycletp=3,input="beboppin.tdec.txt",mkvout="beboppin.mkvtmp.txt",ovr="beboppin.tdecovr.txt",display=true)
x=x.tdecimate(mode=5,hybrid=2,dupthresh=1.1,concycletp=3,input="beboppin.tdec.txt",ovr="beboppin.tdecovr.txt",mkvout="nul")

x=x.Dup(threshold=.4,chroma=false,maxcopies=20,copy=true,blend=true)
#return x.DupMC(log="beboppin.dup.txt").crop(0,0,4,4)
x=x.DeDup(threshold=.7,threshold2=1.0,range2=4,maxcopies=20,maxdrops=20,decwhich=1,dec=true,show=false,
        \ log="beboppin.dup.txt",ovr="beboppin.dupovr.txt",times="beboppin.mkv.txt",timesin="beboppin.mkvtmp.txt",debug="dupdbg.txt")
Some of it's a bit dated - you don't need tfmin anymore (I'll just remove that) - and the dedup was just extra vfr icing on top. And it obviously required a lot of overrides... most stuff doesn't need to be this complicated.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis is offline   Reply With Quote
Old 8th May 2006, 10:08   #28  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Just to clarify a bit :
- x264, the encoding library, perfectly handles vfr.
- x264, the encoding application, assumes the input stream to be cfr ( since input timestamps are equal to frame index / frame rate ).

So x264 in mencoder handles vfr, but x264 cli doesn't.
__________________
Manao is offline   Reply With Quote
Old 8th May 2006, 10:19   #29  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Friendly warning: there's a bug in dedup that stops maxdrops being overridden.
squid_80 is offline   Reply With Quote
Old 9th May 2006, 05:07   #30  |  Link
thuongshoo
Registered User
 
Join Date: Mar 2006
Posts: 197
Thank foxyshadis!
Quote:
Just to clarify a bit :
- x264, the encoding library, perfectly handles vfr.
- x264, the encoding application, assumes the input stream to be cfr ( since input timestamps are equal to frame index / frame rate ).

So x264 in mencoder handles vfr, but x264 cli doesn't.
Really ? So If I uses Mencoder to convert video , will I have a better video ? because VFR is more optimizer than CFR ?
I'm not a programmer. I haven't read x264's source. There are so many claims about VFR. So who can I believe in ?
I downloaded Mencoder but it's difficult to use Mencoder, more difficult than x264 CLI. I have no guide which help convering video with h264. Mencoder's site only say about DivX. Can you help me? Do you know a such site ?
Thank you !

Last edited by thuongshoo; 9th May 2006 at 05:10.
thuongshoo is offline   Reply With Quote
Old 9th May 2006, 05:23   #31  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
You'll find a documenation on http://mplayerhq.hu
__________________
Manao is offline   Reply With Quote
Old 9th May 2006, 06:06   #32  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,175
VFR's big thing is letting you have 24p, 30p, and 60p (or other framerates) in the same file, without telecining or judder, which is a lot more noticeable on progressive video, so it looks smoother. A surprising number of shows mix several base framerates. If you can cut out enough near-duplicate frames you might notice a small efficiency gain, but the codec is pretty good about that already, so it isn't terribly useful.

The lib doesn't have to care about cfr/vfr, all it sees is groups of frames. It's entirely up to the output module to deal with framing and timestamping of what the lib hands back, and since mencoder controls the entire operation I guess it can output vfr directly. I should ask akupenguin about adding a timecode file input to x264 though, purely for the output stamping (mainly for mp4, since I think mp4box will copy timecodes like mkvmerge, but has no way of inputting them).
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis is offline   Reply With Quote
Old 9th May 2006, 06:24   #33  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
A skipped frame takes ~7 bytes. If you blow the framerate up to 60 fps from a 24 fps, it means you raise the bitrate by roughly 36*7*8= 2kbits. That's not a lot.
__________________
Manao is offline   Reply With Quote
Old 11th May 2006, 08:26   #34  |  Link
thuongshoo
Registered User
 
Join Date: Mar 2006
Posts: 197
Thanks Manao and foxyshadis !
I can't still use Mencoder.
Code:
mencoder infile -o out.avi -nosound -ovc x264 -x264opts ....
Code:
 mencoder infile -o out.avi -nosound -ovc x264enc -x264encopts ....
it still says error , it says "Couldn't find video filter 'x264'...." ,or " .. x264opts isn't a vaild option" ,..etc
I don't seem to have x264's lib which Mencoder want
Code:
 mencoder -ovc help
a list appear but there is no x264 in this list.What must I do ?
Thanks!
thuongshoo is offline   Reply With Quote
Old 11th May 2006, 08:37   #35  |  Link
GodofaGap
Registered User
 
Join Date: Feb 2006
Posts: 823
Hmmm... people have not helped you if they made you believe it is possible to create a VFR AVI with Mencoder.

You will need an Mencoder build with x264lib compiled with it. Don't know where you can get one, but shouldn't be too hard to find, or even make yourself.

Although, I'm not so sure Mencoder handles VFR output. Will try though.
GodofaGap is offline   Reply With Quote
Old 11th May 2006, 08:55   #36  |  Link
thuongshoo
Registered User
 
Join Date: Mar 2006
Posts: 197
my intention :
- mencoder ---> rawvideo. Mencoder uses AVI as default container and is designed for AVI. Yes ! There is still a opportunity to have a H264 file which is made by Mencoder
- mux rawvideo and AAC by YAMb or MKVmerge

I have Mencoder from http://mplayerhq.hu/ . Guide which is on this site says that Mencoder can encode video with x264 http://www.mplayerhq.hu/DOCS/HTML/en...ing-codec.html
Quote:
Although, I'm not so sure Mencoder handles VFR output. Will try though.
yes ! you're right!
thuongshoo is offline   Reply With Quote
Old 11th May 2006, 09:12   #37  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Rawvideo doesn't have timestamps, so you mustn't output rawvideo. You have to output to a container that handles vfr ( i.e mkv or mp4. I don't know whether mencoder supports mkv as output ).
__________________
Manao is offline   Reply With Quote
Old 11th May 2006, 10:40   #38  |  Link
celtic_druid
Registered User
 
celtic_druid's Avatar
 
Join Date: Oct 2001
Location: Melbourne, Australia
Posts: 2,173
All my mencoder builds have x264 enabled.

mencoder doesn't have mkv output and only has mp4 output via lavf which is still kinda broken.
celtic_druid is offline   Reply With Quote
Old 12th May 2006, 13:11   #39  |  Link
thuongshoo
Registered User
 
Join Date: Mar 2006
Posts: 197
I'm sorry! there aren't many thread disscuss about Mencoder. Please help me!
Code:
C:\mencoder>mencoder "d:\ha ji won - oppa [live].mpeg" -of lavf -o d:\oppa.mp4 -nosound -ovc x264 -x264encopts:vcod
ec=mp4 subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight
MEncoder dev-CVS-050928-16:38-3.4.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
-x264encopts:vcodec=mp4 is not an MEncoder option

Exiting... (error parsing cmdline)

C:\mencoder>mencoder "d:\ha ji won - oppa [live].mpeg" -of lavf -o d:\oppa.mp4 -nosound -ovc x264 -x264encopts: sub
q=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight
MEncoder dev-CVS-050928-16:38-3.4.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
-x264encopts: is not an MEncoder option

Exiting... (error parsing cmdline)

C:\mencoder>mencoder "d:\ha ji won - oppa [live].mpeg" -of lavf -o d:\oppa.mp4 -nosound -ovc x264 -x264encopts subq
=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight
MEncoder dev-CVS-050928-16:38-3.4.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
-x264encopts is not an MEncoder option

Exiting... (error parsing cmdline)

Last edited by thuongshoo; 12th May 2006 at 13:20.
thuongshoo is offline   Reply With Quote
Old 12th May 2006, 13:47   #40  |  Link
GodofaGap
Registered User
 
Join Date: Feb 2006
Posts: 823
If you type mencoder -ovc help, x264 shows up as option?
GodofaGap is offline   Reply With Quote
Reply

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 13:53.


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