Quantcast FFmpeg vs FFvfw vs Mencoder ? - Page 16 - digitalFAQ.com Forums [Archives]
  #301  
03-17-2004, 10:16 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
I've never used dvdunatuthor and spuunmux, but dvdauthor and spumux are very good. This thread was created in dvdrhelp when baldrick did the first windows compile, you really should take a look:

http://www.dvdrhelp.com/forum/viewtopic.php?t=180017

There's a multiplataform GUI for dvdauthor called DVDStyler:
http://dvdstyler.sourceforge.net/
I haven't tested yet, but it looks nice.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #302  
03-17-2004, 11:44 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Hi all,
sorry if I change back again to mencoding (BTW vmesquita, I took a look at dvdstyle screenshots and features, and looks nice. When I have this mencoder working the way I want, it will be a nice tool to test ).
Just to post my last test. It was with last command/settings posted by bilu, this is:
Quote:
BATCH
====
PAL: mencoder -include settings.ini -lavcopts keyint=15 movie.vob -o movie.m2v
NTSC: mencoder -include settings.ini -vf-pre softpulldown -lavcopts keyint=18 movie.vob -o movie.m2v

SETTINGS.INI
========
of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
lavcopts=vcodec=mpeg2video:ildct=1:ilme=1:vstrict=-1:
vrc_buf_size=1835:vqblur=0reme=2:ildctcmp=2rec mp=2:
vrc_minrate=300:intra_matrix=(...):inter_matrix=(. ..):
vrc_maxrate=9800:autoaspect=1:vqcomp=0:
vbitrate=300:scplx_mask=0.3:naq=1:
trell=1:cbp=1:mbd=2:mv0=1

vf=il=d,hqdn3d,il=i,yuvcsp
Modifications I did:
-didn't use interlaced and NTSC settings (ildct, ilme, vstrict), neither il=i/d, nor hqdn3d
-I used vmax_b_frames=2

Encoded twice the same sample, first with this settings (CBR), and second changed to CQ (vqcomp=1). But as I said in my previous post, I think is better for CQ-VBR to have a higher vbitrate (to keep Q low and as constant as possible, and bitrate changing freely. Opposite to CBR where bitrate tends to a low constant value, and Q changes freely between limits). So I set vrc_maxrate=5000 (with notch-matrix don't need else) and vbitrate=4000.

Results:
vqcomp=0:vbitrate=300:vrc_maxrate=9800
--------------------------------------------------------
file size: 43593 kB
bitrate: max 5473 / avg 2114
Q value: max 8.29 / avg 3.10
bitrate viewer graphics: Q varies between 2-4 and in demanding scenes raises at 8. Bitrate tends to be kept low
visual quality: in fast scenes appear some blocks; sometimes looks "blured"; washed colours

vqcomp=1:vbitrate=4000:vrc_maxrate=5000
---------------------------------------------------------
file size: 44097 kB
bitrate: max 5446 / avg 2139
Q value: max 4.20 / avg 2.39
bitrate viewer graphics: Q is kept between 2-3 and raised just once in a complex scene, with high bitrate
visual quality: no blocks, no "bluring"; washed colors just in some scenes

Don't know if washed colors are in my eyes, or in my mind, since for quality I just can add trellis (that is supposed to be related with quantization, don't think that has nothing to do with colors).
Speed was the same (about 7 fps) for both settings.
Nice results for both (I still prefer CQ), but this filesizes for 2% of film are a little big (trellis also lowers filesize, but at a encoding time cost). I'm still looking for a way to keep this quality and reduce filesize (scplx_mask maybe also helps, but you said bilu that little).
Any suggestion appreciated (I think we're gwtting closer, and we're understanding better how this encoder works).
Reply With Quote
  #303  
03-17-2004, 01:27 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Can you repeat the test on your stream without B-frames?

Bilu
Reply With Quote
  #304  
03-17-2004, 03:20 PM
neturmel neturmel is offline
Free Member
 
Join Date: Dec 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

as a long time linux mencoder user, I'd like to point you to some other interesting features of mencoder (which work well in cygwin too)

I hope, at least some of you didn't know this already...

1) You can do an audio conversion pass like:

Code:
mencoder -ovc frameno -oac lavc -lavcopts acodec=mp2:abitrate=224 -o frameno.avi FILENAME
which in turn can be used to be muxed inline with the video like in:

Code:
mencoder ...lots-of-options... -oac copy ....  (instead of -nosound)
But even if you don't use this (maybe because you are using an AC3 stream), in the end,
the audio encoding pass (which is very fast indeed) gives you a prediction
of the filesize and hints on the needed bitrate for certain filesizes like:
Code:
Writing AVI index...
Fixing AVI header...
Recommended video bitrate for 650MB CD: 9005
Recommended video bitrate for 700MB CD: 9716
Recommended video bitrate for 800MB CD: 11138
Recommended video bitrate for 2 x 650MB CD: 18248
Recommended video bitrate for 2 x 700MB CD: 19670
Recommended video bitrate for 2 x 800MB CD: 22514
( that was a rather short video )

This was meant for divx encoding but can be used for kvcd/kdvd too, I used the predicted value for two 700MB CDs to get a 1.4G KDVD Movie
which hit the target very close.

This value can be inserted as average bitrate (vbitrate=value), that is, if you don't use CQ (with vqscale=x)

2) it also has a builtin crop-detection, used like this:


Code:
mencoder -vf cropdetect,scale=$WID:-3,expand=$WID:$HEI -nosound  -ovc lavc  "$FILE" -frames 50
Use more frames if you want to be sure you get the crop value correct.

You get something like that:

Code:
crop area: X: 1..507  Y: 0..383  (-vf crop=506:384:2:0)V:0.000 [1100:223]
crop area: X: 1..507  Y: 0..383  (-vf crop=506:384:2:0)V:0.000 [1095:223]
crop area: X: 1..507  Y: 0..383  (-vf crop=506:384:2:0)V:0.000 [1095:223]
crop area: X: 1..507  Y: 0..383  (-vf crop=506:384:2:0)V:0.000 [1093:223]
crop area: X: 1..507  Y: 0..383  (-vf crop=506:384:2:0)V:0.000 [1094:224]
Pos:   3.9s    100f ( 0%)  86fps Trem:   3min 108mb  A-V:0.000 [1096:224]
Writing AVI index...
Fixing AVI header...

Video stream: 1096.616 kbit/s  (137077 bps)  size: 537342 bytes  3.920 secs  100 frames

Audio stream:  224.000 kbit/s  (28000 bps)  size: 134400 bytes  4.800 secs
if you have cygwin installed with fileutils, you can get it
automatically with (if you wrote the output to /tmp/f):

Code:
CROP=`cat /tmp/f | grep vf | tail -n 1 | cut -d "=" -f 2 | tr -d ')'`
This would set CROP to "506:384:2:0"

You get the vf value which you can insert and use with scale and expand like so (CROP is the Variable above):

Code:
mencoder ... -vf ... crop=$CROP,scale=$WID:-3,expand=$WID:$HEI ...
Note: scale=..:-3 means scale according to original aspect ratio

You can build really nice scripts with this options...

Also have a look at this thread: http://www.kvcd.net/forum/viewtopic.php?t=7771

You got me some ideas (haven't had time to test all mencoder filters myself )

Happy mencoding,

Neturmel
Reply With Quote
  #305  
03-17-2004, 03:22 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
bilu,
I already did, was my first test, encoding both tests without b-frames.
File size was bigger for both, and I had the problem I described some posts before with PowerDVD: it doesn't play smoothly, it plays aprox 3/4 second and suddenly makes a little jump forward.
This way it was very difficult for me to evaluate quality, but without b-frames is supposed to be better... but also for both tests (vqcomp=0 or =1)

Now I wanted to encode directly from vob file, and try mencoder internal filters, instead of using avisynth and makeavis.
How do I tell mencoder to encode several vobs files and output just 1 stream (sorry, too lazy to read man_page)?
And in my first test mencoder hung: it gives a VDec error and says encoder is not compatible with output format. What am I supposed to do to make mencoder encode from a vob file (if any thing is to be done)?.
Thanx bilu.
Reply With Quote
  #306  
03-17-2004, 04:05 PM
neturmel neturmel is offline
Free Member
 
Join Date: Dec 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
@digitall.doc

This should work out of the box, vob files should be encoded without any problem.

Maybe a bug in the/your win32 version ?
Have you installed all mplayer codecs ?


To do several vobs: Just pipe the file names to mencoder:

Code:
cat *.vob | mencoder ...options.... -of encoded_file_name  -
("-" at the end instead of a filename)

Greetings,

Neturmel
Reply With Quote
  #307  
03-17-2004, 04:19 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
neturmel, thanx for the support.
I'm using bilu compiled version, and is working for him.
I suppose I have all mplayer codecs needed, since he encodes directly form vobs.
Now that I remember, I encoded with previous versions directly from vobs. Maybe you're right, and I've got something missing.

Quote:
Originally Posted by neturmel
To do several vobs: Just pipe the file names to mencoder:

Code:
Code:
cat *.vob | mencoder ...options.... -of encoded_file_name  -
("-" at the end instead of a filename)
What's "cat" for?, Do I substitute "*" with vob file name, or is it to feed mencoder with all *.vob files in a folder?.
Reply With Quote
  #308  
03-17-2004, 04:38 PM
neturmel neturmel is offline
Free Member
 
Join Date: Dec 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
@digitall.doc

"cat *.vob" would feed all VOB files in the current directory to output which is the input for mencoder via "|".

If you just did a plain "cat *.vob" without the pipe and the following mencoder command, you
would be presented with a nice ascii printout of all vob files in your command shell ( which is quite lengthy and unreadable )

You can use all kinds of wildcard there e.g. "cat VTS_02_*. vob" which would
feed all vobs of VTS_02.

Hope this helps...

Neturmel
Reply With Quote
  #309  
03-17-2004, 05:22 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Now got it .
Still didn't test since I'm waiting bilu feedback, to see how he manages to encode from vob with his compile (the one I use).
Reply With Quote
  #310  
03-18-2004, 06:53 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by digitall.doc
bilu,
I already did, was my first test, encoding both tests without b-frames.
File size was bigger for both, and I had the problem I described some posts before with PowerDVD: it doesn't play smoothly, it plays aprox 3/4 second and suddenly makes a little jump forward.
This way it was very difficult for me to evaluate quality, but without b-frames is supposed to be better... but also for both tests (vqcomp=0 or =1)
I think my method only works without B-frames, tried with them and it sucked
Have you tried other players than PowerDVD?

Quote:
Now I wanted to encode directly from vob file, and try mencoder internal filters, instead of using avisynth and makeavis.
How do I tell mencoder to encode several vobs files and output just 1 stream (sorry, too lazy to read man_page)?
And in my first test mencoder hung: it gives a VDec error and says encoder is not compatible with output format. What am I supposed to do to make mencoder encode from a vob file (if any thing is to be done)?.
Thanx bilu.
You've already posted my method it's the one I post whenever I post my settings. About multiple files, the Windows equivalent should be "type *.vob | mencoder ..." although I think that not all Windows versions support "type *.*" and you have to specify a filename on these


Bilu
Reply With Quote
  #311  
03-18-2004, 08:46 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
================================================== ========================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 480 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
================================================== ========================
Writing AVI header...
VDec: vo config request - 720 x 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
@digitall.doc
I get this everytime, but it works.
This is because the first driver in the built-in codecs.conf is MPEG-2 PES and not libmpeg2. So the first one has to fail.


Bilu
Reply With Quote
  #312  
03-18-2004, 08:58 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
@digitall.doc

Remade the test with a NTSC telecined source, using vmax_b_frames=2.
One using vrc_maxrate=5000/vbitrate=1500 and the other using vrc_maxrate=9800/vbitrate=300 using vqcomp=0. Both sucked.

Made the same test with vqcomp=1. Both sucked too.
I'll continue to avoid B-frames.

Will now test using your method but without B-frames.


Bilu
Reply With Quote
  #313  
03-18-2004, 09:27 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Without B-frames both look good. But using vbitrate=vrc_minrate worked much more VBR and yours much more CBR

My method:
6837 KB
avg 3143/3.55
peak 4240/4.85

Your method:
6424 KB
avg 2952/4.85
peak 3875/9.70

Both using vqcomp=1, the same as vrc_eq=tex.
The one made with your method looked blurrier and in BV it looked much more CBR: from some point it started quantizing between 4.5 and 6.5 .The bitrate didn't get much lower than using my method, but it sure seems like it was trying.

Maybe that's the Mencoder behaviour: when it thinks it can actually achieve that average bitrate it tries harder, while such a lower vbitrate ends up being ignored.

My tests were made with interlaced samples, that was the main difference from yours. I'll make now the same tests over progressive PAL, but for NTSC I already have my conclusions


Bilu
Reply With Quote
  #314  
03-18-2004, 12:42 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bilu
You've already posted my method it's the one I post whenever I post my settings.
I know bilu, but it's not working for me.
Don't know if I've got anything missing, but I was able with vmesquita compilation to encode from vob, and now I can't. Maybe I'll try and test again with previous version, to see if there's something wrong in my system...
Quote:
Originally Posted by bilu
About multiple files, the Windows equivalent should be "type *.vob | mencoder ..." although I think that not all Windows versions support "type *.*" and you have to specify a filename on these
Still didn't test either since it's not encoding from vobs. Hope I'll solve this issue.
I get the same messages you posted from mencoder, but then a windows message appear and crashes...
Reply With Quote
  #315  
03-18-2004, 12:57 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Try the builds from Amnon82 at Doom9.

http://forum.doom9.org/showthread.php?s=&threadid=72559

Bilu
Reply With Quote
  #316  
03-18-2004, 01:02 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bilu
I think my method only works without B-frames, tried with them and it sucked
Have you tried other players than PowerDVD?
Yes, I think I posted earlier, with mediaplayer 8 didn't happen. Anyway, my gold standard will be burn on DVD+RW and test on my standalone. But now I'm very concerned in finding the best way to make mencoder work.

And now, as I was afraid, I don't really understand a single word...
Quote:
Originally Posted by bilu
Without B-frames both look good. But using vbitrate=vrc_minrate worked much more VBR and yours much more CBR

My method:
6837 KB
avg 3143/3.55
peak 4240/4.85

Your method:
6424 KB
avg 2952/4.85
peak 3875/9.70

Both using vqcomp=1, the same as vrc_eq=tex.
The one made with your method looked blurrier and in BV it looked much more CBR: from some point it started quantizing between 4.5 and 6.5 .The bitrate didn't get much lower than using my method, but it sure seems like it was trying.

Maybe that's the Mencoder behaviour: when it thinks it can actually achieve that average bitrate it tries harder, while such a lower vbitrate ends up being ignored.
Well bilu, your results are just opposite to mine. Before analysing them: did you encode (my method) with vbitrate=1500 or vbitrate/4000?. Since I tried vbitrate=1500 before in order to get the smaller filesize, but the comparison I did with your method was done with vbitrate=4000. I ask you since I see that vqcomp=1 gives a smaller filesize, and in my test was bigger.

But your results keep me astonished. They're just opposite to mine. I don't know if it's a question of vbitrate I stated before, or NTSC interlaced source, or is due to different sources (you vob internally filtered in mencoder, and I avisynth script), but I say again, just opposite.
It's not just visual quality (it depends upon everybody's eyes and test, subjective 100%, at least for me), but bitrateviewer give opposite results.
As I told you, in my tests avg and max Q were far big for vqcomp=0 (I prefer this to "my" vs "your" method, since "my" is already yours, and feels like a contest...), and made lots of spikes, varying a lot, while BR was more stable. And in my tests, vqcomp=1 gave a far steady Q curve, with low avg and max Q value, and oscillating bitrate...
Again, don't know if is due to different source, or if you used vbitrate=1500 instead =4000, but they're too different. I would like to send you, or post here, the encoded tests and bitrateviewer screencaptures so you could see what I'm not able to explain to my poor english
Even, from a theoretical point of view, and from man_page, vqcomp=0 means CBR and vqcomp=1 means CQ, taht is in line with my results, but opposite to yours.
Don't know if I did anything wrong in my tests. Anyway, I'll redo my tests, since I want to understand how this encoder behave.
Reply With Quote
  #317  
03-18-2004, 01:03 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bilu
Try the builds from Amnon82 at Doom9.

http://forum.doom9.org/showthread.php?s=&threadid=72559

Bilu
Won't it be dangerous?

Don't take serious, just joking . I will give a try.

Thanx
Reply With Quote
  #318  
03-18-2004, 01:07 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
I did your method with vbitrate=1500 and vrc_maxrate=5000.
Will now try with vbitrate=4000 and vrc_maxrate=5000.

Bilu
Reply With Quote
  #319  
03-18-2004, 01:53 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Again with B-frames, both sucked

Without B-frames, vbitrate=4000, vrc_maxrate=5000

vqcomp=0
=======
6801 KB
avg 3127/2.19
peak 4271/3.82

vqcomp=1
=======
6806 KB
avg 3129/2.17
peak 4271/3.48

The bitrate and quant curves look just.... equal

Tests were again made with the same NTSC telecined source.
I wouldn't want something that just works on progressive sources.

Will now test vbitrate=vrc_minrate vs vbitrate=vrc_maxrate, seems they both provide good results


Bilu

Bilu
Reply With Quote
  #320  
03-18-2004, 02:25 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Without B-frames, same telecine source:

vq1-> vqcomp=1
vbmin -> vbitrate=vrc_minrate
vq0-> vqcomp=0
vbmax -> vbitrate=vrc_maxrate

minrate=300
maxrate=9800

vq1_vbmin
=======
6837 KB
avg 3143/3.55
peak 4240/4.85

vq1_vbmax
=======
6843 KB
avg 3146/2.15
peak 4281/3.10

vq0_vbmin
=======
6807 KB
avg 3129/3.54
peak 4240/4.85

vq0_vbmax
=======
6843 KB
avg 3146/2.15
peak 4281/3.10

The *_vbmin curves seem the same, and the *_vbmax curves also seem the same. The vqcomp parameter seems completely irrelevant.

The vbmin curves are different from the vbmax ones. Bitrates don't change that much but quantizer are much higher in vbmin.

I'll make other tests but I feel that vbitrate=vrc_maxrate will be my favorite from now on: little difference on the bitrate with much smaller quantizers


Bilu
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG: Ffvfw VIDEO CODEC kwag Video Encoding and Conversion 364 08-12-2005 07:49 AM
FFMPEG: Curious about H.263 in ffvfw poerschr Video Encoding and Conversion 14 02-25-2004 07:54 PM
FFMPEG: Observation about ffvfw poerschr Video Encoding and Conversion 28 02-24-2004 05:50 PM
FFMPEG: Do ffvfw and mencoder/ffmpeg give the same results? Razorblade2000 Video Encoding and Conversion 4 02-06-2004 04:23 PM
FFMPEG: XMPEG 5.03 and ffvfw kwag Video Encoding and Conversion 2 02-05-2004 10:57 AM

Thread Tools



 
All times are GMT -5. The time now is 07:49 PM  —  vBulletin © Jelsoft Enterprises Ltd