digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG vs FFVFW vs Mencoder ? (http://www.digitalfaq.com/archives/encode/8159-ffmpeg-vs-ffvfw.html)

audioslave 04-05-2004 05:01 PM

Thank you for your help! Now - FINALLY - I'm able to use Mencoder! :D
On the downside I'm not really impressed with the quality I got from the intro scene from the Abyss :cry: . I'll look into the tweaking parameters to see if I'll get better results...

audioslave 04-05-2004 05:06 PM

Hmmm, I'm getting a buffer underflow message the line before the encoding start. What can be causing this :?:

bilu 04-05-2004 05:18 PM

Quote:

Originally Posted by audioslave
Hmmm, I'm getting a buffer underflow message the line before the encoding start. What can be causing this :?:

We all get that message at the beginning, it means that the buffer isn't full yet :wink:

Bilu

audioslave 04-05-2004 05:34 PM

:imstupid:
Alrighty then! :D
Any idea on why the encoded video look so bad? The frames look almost as if I have encoded an interlaced source without a deinterlacing filter - which I haven't :roll: .

EDIT:
Maybe you wanna see some screenshots, to better understand what I'm talking about :?:

bilu 04-05-2004 05:37 PM

What was your command-line?

Try lmin=1 and no scplx_mask for the greatest quality.

Bilu

incredible 04-05-2004 05:45 PM

@Digi.Doc

Did you CHECK your stream in Bitrateviewer???
When setting lmin the Q curve sometimes plays crazy! Means sometimes it rises with bitrate (as wanted) and still keeps that high Q like constant! for about a minute (but no needing to keep that for a minute) even if already no compelx scenes/very low bitrate do happen!. 8O

That risky bitrate rise (now 12000kbit) scene in "K19" is a scene where a man jumps over from the submarine into the ocean = complex water rumble scene! A hell!

audioslave 04-05-2004 05:51 PM

@bilu
8O WOW 8O Amazing quality!!! But (here we go again :roll: ) now I noticed the colors seems washed out. Once again the intro scene from the Abyss: The first cut to the interior of the submarine where the room is lit up by red lights - they aren't so red anymore. Look much more orange to me :!: Any tweaks for that?

bilu 04-05-2004 06:06 PM

@audioslave

Try removing the intra_matrix and inter_matrix settings.

Bilu

audioslave 04-05-2004 06:07 PM

@bilu
That would be the Notch matrix, right?

audioslave 04-05-2004 06:12 PM

Damn, this encoder is faaaast :!: I'm getting between 25-30 fps encoding speed on my AMD 2000+ :!:

@bilu
Removing the matrix didn't help with the color issues :cry: .

bilu 04-05-2004 06:29 PM

try trell:mbd=2

audioslave 04-05-2004 06:38 PM

No difference. Wierd! :?

bilu 04-05-2004 06:43 PM

Remove vf=yuvcsp.

audioslave 04-05-2004 06:46 PM

I just ran my encoded video stream through ReStream and couldn't find any B-frames 8O :!: This surely can't be right, can it?

@bilu
Testing your latest tip right now... :wink:

bilu 04-05-2004 06:50 PM

add vmax_b_frames=2.

audioslave 04-05-2004 06:52 PM

:lol:
You poor thing. Helping an idiot like me all night long :wink: . Don't get me wrong, I'm sooo grateful :!: :D

EDIT:
I really think this color problem is an important thing to solve as fast as possible so we don't get these washed out looking movies. Don't you agree?

bilu 04-05-2004 07:08 PM

@Incredible

Quote:

of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835:preme =2:precmp=2:ildct=1
:ilme=1:vstrict=-1:autoaspect=1:vqblur=0:vrc_minrate=300:vbitrate=3 000
:vrc_maxrate=9800:vrc_eq=avgTex:vqmin=1:mbqmin=1:l min=2.49

#Inc
#:intra_matrix=8,13,18,23,28,33,38,43,13,18,23,28, 33,38,43,48,18,23,28,33,38,
43,48,53,23,28,33,38,43,48,53,58,28,33,38,43,48,53 ,58,63,33,38,43,48,53,58,63,
68,38,43,48,53,58,63,68,73,43,48,53,58,63,68,73,79 :inter_matrix=16,18,20,22,24,
26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30 ,32,34,22,24,26,28,30,32,34,
36,24,26,28,30,32,34,36,38,26,28,30,32,34,36,38,40 ,28,30,32,34,36,38,40,42,30,
32,34,36,38,40,42,44

#Notch
#:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27 ,29,34,37,12,14,18,27,29,34,37,
38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48 ,27,29,34,37,38,40,48,58,29,34,
37,38,40,48,58,69,34,37,38,40,48,58,69,79:inter_ma trix=16,18,20,22,24,26,28,30,18,
20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24 ,26,30,32,32,34,36,24,26,28,32,
34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36 ,38,42,42,30,32,34,36,38,40,42,44
Tried your matrix in comparison with Notch.

Inc
===
3815 KB
avg 875/2.30
peak 2639/3.68

Notch
====
4005 KB
avg 919/2.32
peak 2682/3.68

In BV they looked almost equal.
Looking at it I like Notch a bit more, more natual it seems.
But very difficult to distinguish between the two.


Bilu

bilu 04-05-2004 07:09 PM

Quote:

Originally Posted by audioslave
I really think this color problem is an important thing to solve as fast as possible so we don't get these washed out looking movies. Don't you agree?

Not right now, I still have other priorities. Others can walk this path ;)

Bilu

bilu 04-06-2004 04:11 AM

My own compile, this one solves the B-frames issue.

http://clientes.netvisao.pt/bilu/bru...er20040405.zip

The last mplayerhq.hu compile was March 26th after all :roll:


Bilu

digitall.doc 04-06-2004 04:22 AM

Quote:

Originally Posted by incredible
@Digi.Doc

Did you CHECK your stream in Bitrateviewer???
When setting lmin the Q curve sometimes plays crazy! Means sometimes it rises with bitrate (as wanted) and still keeps that high Q like constant! for about a minute (but no needing to keep that for a minute) even if already no compelx scenes/very low bitrate do happen!. 8O

That risky bitrate rise (now 12000kbit) scene in "K19" is a scene where a man jumps over from the submarine into the ocean = complex water rumble scene! A hell!

Inc, I did check my streams in BitrateViewer, this is the way I take my bitrate/Q values. And didn't notice the behaviour you refer, in my tests Q raises and falls fast, and if keeps constant (it really doesn't keep much constant, but when I used vqmin=2:lmin=1) it's at a low value.
And I tested mencoder with several bitrate-demanding scenes, and never get a too high bitrate (max about 10000 when used vqmin=1:lmin=0.5, but never again). Ahain, don't know if it's a matter of different mencoder compilation/version, or that I use vbitrate=9800 (differnet settings, I mean).
bilu, in your last test, when testing inc matrix (I still didn't :oops: , sorry inc), I see you get nice quantizers (avg about 2.3 is not that bad) but really low avg bitrate: is it related to the source you used, or to your settings?. Did you compare this same slice with vrc_eq=tex vs avgTex?. I don't know if this same sample couldn't be encoded at lower quantizers and higher bitrate (that would mean of course bigger file size)... I can't forget we are encoding KDVD and we can use higher bitrates... Because we're encoding/talking about KDVD, don't we?
I find your results with inc matrix interesting, maybe he can tweak it more. And as I posted in the other thread, I'll also test vrc_eq=avgTex and see how it goes.
Cheers :wink:

digitall.doc 04-06-2004 04:24 AM

bilu,
is your last compilation working with vobs also?. I guess yes.

incredible 04-06-2004 06:24 AM

@ Digi.Doc

Could you try this one ... it filters more but I could get less average Q values and it made the movie seen in motion more calm and gave less "gibbs" around objects.
(Don't know if its already the one u used)
Code:

intra_matrix=8,13,18,23,28,33,38,43,13,18,23,28,
33,38,43,48,18,23,28,33,38,43,48,53,23,28,33,38,43,48,
53,58,28,33,38,43,48,53,58,63,33,38,43,48,53,58,63,68,
38,43,48,53,58,63,68,73,43,48,53,58,63,68,73,79

inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,
30,32,20,22,24,26,28,30,32,34,22,24,26,28,30,32,34,36,
24,26,28,30,32,34,36,38,26,28,30,32,34,36,38,40,28,30,
32,34,36,38,40,42,30,32,34,36,38,40,42,44

It works linear not that exponential-like so it already filters mid/low frequencies more than Notch

audioslave 04-06-2004 07:03 AM

@bilu
I downloaded your latest compile and now I get errors again 8O . This is what I see in the DOS window:
Code:

D:\Hea\Video\mencoder20040405>mencoder -include settings.ini -lavcopts keyint=24
 video.avi -o video.m2v
MEncoder dev-CVS-040406-02:29-3.2.3 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino 1659 MHz (Family: 6,
 Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with Runtime CPU Detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading D:/Hea/Video/mencoder20040405/mplayer/codecs.conf: 61 audio & 170 video
codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file D:/Hea/Video/mencoder20040405/mplayer/mencoder: No such file
 or directory
Reading config file settings.ini
Font D:/Hea/Video/mencoder20040405/mplayer/font/font.desc loaded successfully! (
206 chars)
success: format: 0  data: 0x0 - 0x4F7A00
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO:  [AVIS]  480x576  16bpp  25.000 fps    0.8 kbps ( 0.1 kbyte/s)
[V] filefmt:3  fourcc:0x53495641  size:480x576  fps:25.00  ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [yuvcsp]
==========================================================================
Requested video codec family [makeavis] (vfm=vfw) not available.
Enable it at compilation.
Cannot find codec matching selected -vo and video format 0x53495641.
Read DOCS/HTML/en/codecs.html!
==========================================================================
Exiting...

:?: :?: :?:

bilu 04-06-2004 08:11 AM

Quote:

Originally Posted by audioslave
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO: [AVIS] 480x576 16bpp 25.000 fps 0.8 kbps ( 0.1 kbyte/s)
[V] filefmt:3 fourcc:0x53495641 size:480x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
Opening video filter: [yuvcsp]
================================================== ========================
Requested video codec family [makeavis] (vfm=vfw) not available.
Enable it at compilation.
Cannot find codec matching selected -vo and video format 0x53495641.
Read DOCS/HTML/en/codecs.html!
================================================== ========================
Exiting...

You still need http://www.jltoca.uaivip.com.br/files/mencoder_avs.zip as usual, if you want to use AVS files.


Bilu

bilu 04-06-2004 10:46 AM

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
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835:preme =2
:precmp=2:ildct=1:ilme=1:vstrict=-1
:autoaspect=1:vqblur=0:vrc_minrate=300:vrc_maxrate =9800:vrc_eq=avgTex
:vqmin=1:mbqmin=1:lmin=2.49:scplx_mask=0.24:naq=1: vmax_b_frames=2
:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27, 29,34,37,12,14,18,27,29,34,37,38,
22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27 ,29,34,37,38,40,48,58,29,34,37,38,
40,48,58,69,34,37,38,40,48,58,69,79:inter_matrix=1 6,18,20,22,24,26,28,30,18,20,22,24,
26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32 ,32,34,36,24,26,28,32,34,34,36,38,
26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30 ,32,34,36,38,40,42,44
:vbitrate=3000
Bold settings should be adjusted to your needs.
I have reasons to believe these are my final settings for KDVD.
Performance: 6/8 fps in a PIII-500

:driveby:


Bilu

incredible 04-06-2004 11:04 AM

Bilu,

First: ... I did/do enjoy your permanent testings along the last weeks! And for shure also to digi.doc and all others which do participate in here.

Second: I give that script-baby a try this evening on my "sensible" source - K19. :)

bilu 04-06-2004 11:25 AM

Quote:

Originally Posted by incredible
Second: I give that script-baby a try this evening on my "sensible" source - K19. :)

I sure am going to need your help now. And from others too, of course ;)

I came from the MPEG-4 world and haven't authored a single DVD yet.
Experienced words aiming for quality are now more appreciated than ever :)

I came to lmin=2.49:scplx_mask=0.24 by trying to get to the (lowest bitrate possible & lowest acceptable quality) factor. I knew naq would protect the stream from such behaviour (quantize as much as possible), and now I also know it aims to the average bitrate as well.But I needed to test a worst case scenario for the parameters.

About avgTex, I feel it may be better than the default tex^0.5 (square root of tex) in terms of quality, since higher bitrates will only be that much lowered if it's only a peak, not an entire region of the movie. This may be the bitrate delay we wanted :)


Bilu

incredible 04-06-2004 11:35 AM

Bilu, ...

Try once the matrix posted here: http://www.kvcd.net/forum/viewtopic....=asc&start=461 and tell me if you still need to go till 9800kbit at max! Where when using Notch you also dont have to set Bitrate as max that much .... we should try to end up on 7000 (16:9/anamorph) or even 5000kbit (4:3/non anamorph) as max ... as that would give the average bitrate more space which would mean less quantisation on average movietreatment and only higher Qs at veeeery complex parts.

But enough of theory ... in a few minutes Ill leave my desk in the office to get home for testing. :wink:

Quote:

Originally Posted by Bilu
.... and haven't authored a single DVD yet.

Try DVDlab Pro Beta Version as it seems promissssssing!
8 possible Audio Tracks, a wonderful menue generator (incl. Previewing of buttons etc.), .. etc etc etc.
http://www.kvcd.net/forum/viewtopic.php?t=10007

But If you just want to burn Single Audio DVD Streams on one DVD, go and have a look at DVD author as it also comes as commandline appl. incl. a GUI - Nice!
http://users.adelphia.net/~liquid64/dvdauthorgui.html

bilu 04-06-2004 11:44 AM

Quote:

Originally Posted by incredible
But If you just want to burn Single Audio DVD Streams on one DVD, go and have a look at DVD author as it also comes as commandline appl. incl. a GUI - Nice!
http://users.adelphia.net/~liquid64/dvdauthorgui.html

I'll start the hard way: http://dvdauthor.sourceforge.net/
Remember I want to keep the cross-platform advantage ;)

Quote:

Where when using Notch you also dont have to set Bitrate as max that much .... we should try to end up on 7000 (16:9/anamorph) or even 5000kbit (4:3/non anamorph) as max ... as that would give the average bitrate more space which would mean less quantisation on average movietreatment and only higher Qs at veeeery complex parts.
I want the complex parts to look good as well ;)
And I trust avgTex, lmin and scplx_mask to help with the rest :D

I really think avgTex may work beautifully here: not a killer like vrc_eq=1, not as aggressive as tex^0.5, but something that keeps in mind the average complexity of the movie. If the movie is complex it won't affect it as much. If there are only some small peaks it will know how to behave :)


Bilu

incredible 04-06-2004 11:49 AM

Thats the one I posted as second choice above ... but it does include a simple GUI so you can easely author also on windows ...

bilu 04-06-2004 11:50 AM

I want to go the command-line way because I can automate it better ;)


Bilu

bilu 04-06-2004 01:59 PM

Changed my mind about avgTex: vrc_eq=tex is indeed the better option.

Difference is filesize:

avgtex - 42634 KB
tex - 42636 KB

The bitrate peaks look much better with vrc_eq=tex (same as vqcomp=1) and the rest looks good as well.


Bilu

audioslave 04-06-2004 02:29 PM

bilu wrote:
You still need http://www.jltoca.uaivip.com.br/files/mencoder_avs.zip as usual, if you want to use AVS files.

I have those files already installed in the same directory as MEncoder... :!: :? Exactly the same way as before.

incredible 04-06-2004 03:07 PM

I found the following very importand out....

IF using the latest in here offered mencoder build and setting then vrc_minrate=300:Vbitrate=XXXX ...... I cant control the avgbitrate anymore!!!

Then I changed back to my old mencoder build and ..... everything works well again, means the Vbitrate is respected!

keeping you informed ... actually testing ....

audioslave 04-06-2004 03:14 PM

@all
This is what my MEncoder folder looks like:
Code:

mencoder/mplayer/font/font.desc
mencoder/mplayer/font/iso-8859-1-a.raw
mencoder/mplayer/font/iso-8859-1-b.raw
mencoder/mplayer/font/osd-mplayer-a.raw
mencoder/mplayer/font/osd-mplayer-b.raw

mencoder/mplayer/codecs.conf
mencoder/mplayer/encode2.bat
mencoder/mplayer/makeavis.reg

mencoder/mencoder.exe
mencoder/mplayer.htm
mencoder/settings.ini
mencoder/video.avi > My fake *.avi
mencoder/video.bat
mencoder/video.m2v > The final/encoded MPEG-2 video

Do I need any other files than these :?: I can't understand why it doesn't work.
BTW It's "mencoder20040405"...

Off-topic: How can I change "Code:" to "AudioSlave wrote:" for example?

EDIT:
Yes I know, I did the slashes in the wrong direction but I hope you still understand :wink: .

rds_correia 04-06-2004 03:38 PM

@Audioslave,
I'm having the same problems as you buddy.
Will post if I find a way to it.
BTW to have Audioslave wrote: instead of Code: use quote="audioslave" between square brackets
In the end use /quote between square brackets again.
Don't forget the slash before the quote!
Cheers

audioslave 04-06-2004 03:43 PM

Thank you rds_correia :D ! I was starting to think I was the only one who couldn't run MEncoder (mencoder20040405). The previous version was no problem to use but this one is giving me a headache! :wink:
I will do the same thing as you:
Quote:

Originally Posted by rds_correia
Will post if I find a way to it.

Hey, it worked - the quoting that is :lol: .

audioslave 04-06-2004 03:53 PM

Most of the commands in the DOS window works just fine, so my guess is that these following lines has something to do with our problem:

File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file C:/Documents and Settings/Hea/Skrivbord/MEncoder20040405/MEn
coder/mplayer/mencoder: No such file or directory


The thing is I don't know what kind of files these are or where I can find them. Anyone :?:

P.S. All other commands are okay...

digitall.doc 04-06-2004 04:09 PM

Pleeeaaase, could someone explain me, in single words a "knowledgeless" person like me can understand, why is there any interest in encoding with lowest bitrate possible, apart from avoiding too high bitrate peaks, and making smaller files?. And if the aim is to get smaller files, why is it better to get lower bitrate peaks than raise all quantizers a little?.

@inc,
I tested your matrix. It do give me smaller file sizes with a little decrease in quantizers and bitrate, comparing with notch matrix. But there's something, when you see the film, that's not good. I cannot explain, I'm not an expert. It's like "false" colors, not they are washed, look poor,... sorry, don't find the words. Didn't compare with original, but notch looks more natural.
And I wouldn't worry too much about mencoder respecting vbitrate in 1pass: it will in some fims, and won't in other ones. In the end, you'll have to make prediction.
Related to notch matrix and maxrate, you're right that with notch matrix you need much less maxrate. I even have been testing long time with maxrate=5000 (as with CCE), but I then realised that is better let mencoder raise when it needs at 9800, to encode well bitrate demandin scenes.

@bilu,
I don't remember if I asked before, but did you compare vqmin=2:lmin=2.49 vs vqmin=1:lmin=2.49?. Because in my tests it didn't make a difference. In theory, with vqmin=1:lmin=2.49, quantizers can go down at 1 (isn't it?), but in practice, with lmin=2.49, quantizers keep always above 2.5.
And, as I posted in rate control thread, my settings are quite similar to yours (apart from vbitrate being 9800), but I don't get a difference between vrc_eq values :(

digitall.doc 04-06-2004 04:11 PM

audioslave,
no, I think we all get this same error messages, but mencoder encodes well anyway.


All times are GMT -5. The time now is 11:03 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.