digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG: Ffvfw VIDEO CODEC (http://www.digitalfaq.com/archives/encode/7913-ffmpeg-ffvfw-video.html)

kwag 01-28-2004 01:31 PM

Quote:

Originally Posted by Dano
Hey Kwag, I don't know about Milan but I do know Athos (he did the more recent builds) is active at doom9. Cheers. :D

Thanks Dano.
I'm really looking for Milan, the developer, because he's the one that can answer the questions I've E-Mailed related to the bitrate constraints and options :D
Still, no reply :(

-kwag

Hydeus 01-28-2004 04:32 PM

@Testers
Do you use scripts (with filters) in encoding process, or pure source file (just resized, croped, etc) :?:
I see that quality even without any filters is quite good.

And what about the quality with processing set to fastest? Do you agree with Vmesquita.

Any noticable speed (and quality) difference with build proposed by Dano?

I know tha a lot of questions :oops: I just come back home, and I do test by my own, but I want to read others opinions. I'm very looking forward to this encoder.

A ... almost forgot. Phil, you to get error when prcessing ffvfw (avi mode) in TMPG?

Edit: From small manual included with package:
Quote:

EPZS diamond sizes:

-3 shape adaptive diamond with size 3
-2 shape adaptive diamond with size 2
-1 experimental
1 normal size=1 diamond (default) =EPZS type diamond
2 normal size=2 diamond
...
Tip: the shape adaptive stuff seems to be faster at the same quality

I'm try it right now.

nicksteel 01-28-2004 05:09 PM

Kwag,
 
I'm going to start testing ffmpeg tomorrow. I'm going to experiment with PVR250 captures encoded with KDVD at 704x480. I get pretty good results with the MA script and TMPGEnc at present. I need to know if you have found any better settings than those shown in your examples.

:?: Do you have any further suggestions to the steps you used posted earlier in this thread? I'm going to use your example as a guideline.

:?: Not having used PullDown.exe and DVDPatcher before, is there anything in particular I need to know?

incredible 01-28-2004 05:21 PM

Kwag!
Which ffvfw build do you got?
I got "ffvfw-20031117.exe".

Well I still CAN'T get rid of those blocks on fast moving objects and plain dark gray surfaces, even if Quality is set to 99! Also something strange happens when opening that sample of ffvfw in Bitrateviewer. Bitrateviewer shows a avg. Q of 5.78! and crashes imideately. Same stream opened in BRV encoded by tmpgEnc gives me and Q of 4.2 and no problem scrolling on it etc.!

I did a lot of testings and found out a lot, but to me it seems that it doesn't make sense to do further reports as I do got these problems mentioned above. Maybe I have a ffvfw wrong build installed? Who knows.

:cry:

digitall.doc 01-28-2004 05:22 PM

Here results from my tests (sorry, just two encodes)
First: I'm not very used to employ VirtualDub, but I guess is normal that, after selecting save as AVI, and giving the file a name (fake.avi), two files are generated: the .mpg file and a fake.avi file.
Second: encoding speed at 5-8 fps, still have to compare with CCE
Third: the film I'm testing, the PAL version of Star Wars II. Selected an scene with an airplane landing (lot of flat surfaces) and after an explosion. Buf, lots of macroblocks in the fire, nothing to do comparing with kwag samples of Red Planet (I remember also an explosion there, with no blocks). Am I doing anything wrong, or is it the PAL issue?. I can't believe that!. Well, sure you'll solve this, also. I'll post further testing, and will try to upload a screen capture.

Hydeus 01-28-2004 05:24 PM

Hi Nicksteel :) Welcome to the party :lol:
I use pure source without filters, for ffvfw and TMPG for quality and speed comparition. Kwag use ( i gues) MA script. I don't use pulldown (I'm with PAL).

From my test ... hmmm ... actualy size2 i 5% slower, and size3 is 10% slower than default :roll: I might get false result. Some other test please.

Edit: @Incredible
I also noticed wrong bitrate issue with VD. MPEG2 (ffvfw) larger size file have smaller bitrate than MPEG1(TMPG) smaller file. Strange

incredible 01-28-2004 05:43 PM

Quote:

Originally Posted by digitall.doc
Am I doing anything wrong, or is it the PAL issue?. I can't believe that!. Well, sure you'll solve this, also. I'll post further testing, and will try to upload a screen capture.

Nope thats not a PAL issue as I did all my last encodings at 23.976 and 704x480 resolution! And no matter if encoding the samples at PAL specs or NTSC specs ..... the mentioned "over" quantisation on fast moving and plain surface parts within a frame do occur.

kwag 01-28-2004 05:50 PM

Quote:

Originally Posted by incredible
Kwag!
Which ffvfw build do you got?
I got "ffvfw-20031117.exe".

ffvfw-20041301.exe
Quote:

Also something strange happens when opening that sample of ffvfw in Bitrateviewer. Bitrateviewer shows a avg. Q of 5.78! and crashes imideately. Same stream opened in BRV encoded by tmpgEnc gives me and Q of 4.2 and no problem scrolling on it etc.!
Because you MUST demux, before dragging the file to bitrate viewer. You can't drop the file encoded by ffvfw, because it's not truely a Video only stream.

-kwag

Hydeus 01-28-2004 05:53 PM

:oops: And same for me. Demuxed file now have proper bitrate. Sorry :roll:

rds_correia 01-28-2004 06:11 PM

Ooops,
I still haven't found the 2004 version of ffvfw.
Where can I get that Karl?
Guys, I don't want to keep only saying the same but I just did an encode with tmpg and ffvfw.
Did 1650 frames from a PAL DVD Full D1 source to target 704x576 res with MA script.
tmpg took 15:00 at CQ80 m300 M2500 - 16.9MB
ffvfw took 22:00 at CQ100 - 15.3MB (Kwag's recommendations)
My only point here is trying to understand if i'm doing something wrong since you do it as fast as tmpg or even faster...
Thanks.

PS- Now, where the h#ll is that 2004 ffvfw version :?: :evil:

kwag 01-28-2004 06:18 PM

Different Builds (versions)
 
Read here: http://www.kvcd.net/forum/viewtopic.php?t=8824

-kwag

Dano 01-28-2004 06:58 PM

Just a thought for those with quality and/or speed issues. I remember back when I first tried ffvfw for capturing that sometimes if I changed any of the parameters and then back again things got messed up. Anyways, I would do an uninstall and then reinstall and everything would be fine again. So you might want to try doing a reinstall and then once you have the settings you want save them as a preset and check the "Don't Save Settings to Registry" box. Also, you might want to try burning your file and cheking it on a standalone since it could be a decoder issue. For example if I save my file as test.m2v it won't play in Media Player but will play in PowerDVD. If I save my file like Kwag as test.mpg and demux, the test.m2v plays in Media Player and PowerDVD.

vmesquita 01-28-2004 07:27 PM

Just a little off-topic, but I found this fact very interesting:

I tried encoding the same clip I described before using CCE 2-pass VBR and run throught SSIM: the result average was nearly the same: 55.21, but the file was a little bigger:33.711 kb.

I guess I'll try with TmpgEnc to see what happens, and post. It's a nice way to compare against FFVFW.

kwag 01-28-2004 10:47 PM

@Incredible ( and all )

Just found out, on a very dark movie (Count of Monte Cristo), I got some visible blocks on dark areas. BTW, This is a very dirty (mastered) picture :!:
I went to a friends home, who works professionally on video editing, and I encoded a piece from the movie with his CCE, ran a test, and I found the image to be clearer. But I noticed something strange with CCE :!:
CCE adds noise to the image :!:
I didn't know that, because I don't work with CCE. I can clearly see a "noisier" but less blocky image with CCE, and that was encoding one pass VBR with Q set to 1 (Maximum quality) and MAX bitrate set to 8,000Kbps :!:
So I made a test with ffvfw CODEC, and I turned on "Enable Image Processing" on Input, and added "Noise" .
Check the following options:

Noise
New noise algorithm(avih)
Uniform Noise
Set Luminance noise strength to 8
Set Chroma strength to 0

Now give it a try :!:

Look at CCE's screen shot:
http://www.digitalfaq.com/archives/i.../2004/01/7.png

And now look at ffvfw with noise added:
http://www.digitalfaq.com/archives/i.../2004/01/8.png

And ffvfw WITHOUT noise:
http://www.digitalfaq.com/archives/i.../2004/01/9.png

And last, TMPGEnc screenshot, that was encoded with CQ=100 and MIN=0 and MAX=8,000Kbps.
http://www.digitalfaq.com/archives/i...2004/01/10.png

BTW, the size of the sample encoded with CCE is 10,532KB with an average bitrate of 7,529Kbps :!: , and the one with ffvfw(noise added) is only 4,745KB with an average bitrate of 3,027Kbps.
So I think this CODEC, in a very near future, is going to give CCE a run for it's money :mrgreen:

Note: Look at the color tones, and see that TMPEG's color balance is off :!:

-kwag

kwag 01-29-2004 12:05 AM

Sample #3 - Very dark night scenes, water, small particles.
 
I think this speaks for itself ;)
http://www.kvcd.net/count-ffvfw-test.m2v

Edit: Encoded with the parameters (noise) described above.

-kwag

Hydeus 01-29-2004 03:58 AM

Kwag, can you tell me how make "Enable Image Processing" to be non-grey? I don't fully understand how this works. I've got ffdshow and ffvfw instaled. What I must force in one or another to this option be active?

Edit: Few days ago I was thinking that it would be great if standalone plyers have implemented noise add. But it is nice to hear/read that it can be possible on encoder level. Adding noise "cleans" picture from this "stairs color" effect, and I always use this in ffdshow for crapy movies playback.

Dialhot 01-29-2004 05:00 AM

Quote:

Originally Posted by Hydeus
Adding noise "cleans" picture from this "stairs color" effect, and I always use this in ffdshow for crapy movies playback.

That's a known issue and that is the purpose of the "blockbuster(noise)" line that you can see in some scripts :-)

digitall.doc 01-29-2004 05:28 AM

Dialhot wrote:
Quote:

That's a known issue and that is the purpose of the "blockbuster(noise)" line that you can see in some scripts
Yes, and I remember, at the begining of this thread, incredible proposing to make use of blockbuster to get rid of the scale effect with ffvfw. But, do you think is better to introduce noise directly with the encoder, or via avisynth script, with blockbuster?. And with better I refer to speed, quality, and final file size, 'cos I guess that with added noise the file will grow, won't it?.
I tried to make use of TMPGEnc to encode a fake .avi with ffvfw, but gave me also an error.
And made several encodings, comparing CCE, TMPGEnc and ffvfw. For me, ffvfw a little slower (5 seconds in 1000 frames sample). Since I'm at work, I'll post later my results, and some captures (should I resize them to fit better in the browser window?).

incredible 01-29-2004 05:36 AM

Kwag, I felt free to do a side by side comarison using Photoshop and also i rised the luma & Gamme to see whats in the deeps of your Pics.

http://www.digitalfaq.com/archives/error.gif

First: my surfaces (compared to her arm) are far fare away from your samples! So tonight I will upgrade (deinstall/reinstall) my ffvfw to the 2004 build.

I see that Tmpgenc adds more red in general. CCE does look more smooth and calm than the TmpgEnc's one.
Now the ffvfw: To me it seems that the noise adding even does make the surfaces like her arm a little bit uneasy BUT as seen as a whole the picture looks more natural! Look at her skin and it just "seems" to be more detailed (her eyes).

Well we could now start a philosophy which one is better, the added noise one or the left as it is one of the ffvfw samples. But my conlcusion is that I do agree that in case of YOUR samples the ffvfw do look best!

So in my cases it seems to be ... I don't know, a codec problem, older ffvfw build, ....??? I have to check this out. As you see in MY samples above the surfaces & fast moving objects do come out MUCH more blocky compared to MY TmpgEnc outputs.

;-)

@ Digitall.doc
Quote:

And with better I refer to speed, quality, and final file size, 'cos I guess that with added noise the file will grow, won't it?
Well it depends how do you add noise, the purpose is to just give the encoder a tiny bit of information so that the "stairs" wont come out. Maybe that results in a bit uneasy surfaces, but you won't see the "stairs" effect.

On the other hand, when using our settings (matrix, bitrate etc.) this added noise will be quantized off! Thats the filtering of the matrix as its filters especially high frequencies.
Adding a Blockbuster() gives more control of the noise generating, as you can set "where" noise should be added, on the whole image, more at edges/details or only at plain non-detailed surfaces.

Dialhot 01-29-2004 06:06 AM

Quote:

Originally Posted by digitall.doc
Yes, and I remember, at the begining of this thread, incredible proposing to make use of blockbuster to get rid of the scale effect with ffvfw. But, do you think is better to introduce noise directly with the encoder, or via avisynth script, with blockbuster?. And with better I refer to speed, quality, and final file size, 'cos I guess that with added noise the file will grow, won't it?.

It grows a little (depends on how heavy you are on the noise you add).
For speed/efficiency matter, only tests can answer because it depends on how the noiser is coded in the ffvfw. We all know for instance than avisynth do resizing better and faster than tmpgenc, but we didn't know it before we tried.

Quote:

I tried to make use of TMPGEnc to encode a fake .avi with ffvfw, but gave me also an error.
Okay, so it just doesn't work :wink:

Quote:

(should I resize them to fit better in the browser window?).
Reducing removes some default, so don't.

nicksteel 01-29-2004 06:23 AM

Very basic question
 
To use, do I:

Rip with Decrypter?
Use AVS script with Telecide,Decimate,Filters as usual?
What do I load into VDub?

I know how to set up in VDub, just don't understand how to create the source.

incredible 01-29-2004 06:56 AM

@ Nick

No hard to treat captures now, please! We are not at that step in the state here right now.

Just do a test on a clear and very good NTSC DVD Source using "forced Film" in DVD2Avi to obtain a 23.976 fps stream and by this generating a simple script WITHOUT telecining etc. further explanations you see in some posts more above (read the thread from the beginning to the end).

vmesquita 01-29-2004 06:56 AM

Ok, just to be complete:
Tmpgenc gave me a SSIM of 81.33. Higher than CCE, but still below FFVFW. Maybe CCE got so low score because somehow softs the picture, making it different from the original.

vmesquita 01-29-2004 07:23 AM

I encoded my sample from the Lawnmover man using the noise parameters Kwag suggested on FFVFW. The file got real big, jumping from 33.594kb (without noise) to 67.112kb (more than double). Quality is better, but at this cost, I think it's not worth it.

incredible 01-29-2004 08:01 AM

Try to play with blockbuster() as yesterday (ok, I was working with that older build of ffvfw) I figured out that it cooperates very good with the ffvfw engine.

Find the optimal settings in blockbuster that stairs won't appear after encoding and also that most of the added noise will be quantisized off during encoding, means filtered out! By this my resulted filesizes did only grew up by ca. 1-2%.

As I also see in Kwags and mine samples, that ffvfw engine produces excellent edges/Details, but gots its problems in areas mention by me above. And thats a quatisation problem. We could say "ok, so the encoder does allocade more! quantisation to fast/complex parts within a whole frame, where on the other hand he provides less quant. on low movement picture parts within a frame" (which you also can set in CCE), but thats not logic as plain surfaces and dark/dark gray plain surfaces do sometimes also suffer. And thats I think the "secret" of that engine as it allocades quantisation in a different way as TmpgEnc or CCE ... so it could be just a matter of priority of quantisation where every encoder gots its on specs. and ways :idea:

nicksteel 01-29-2004 09:08 AM

When I attempt to load simple avs for force film output from DVD2AVI:

## DLL Section ##
LoadPlugin("c:\video\dlls\MPEG2DEC3.dll")
mpeg2source("h:\ff\sw2.d2v"


I get "Couldn't locate decompressor for format 'YV12' (unknown)" from VirtualDub.

:?: Should I download a YV12 codec and install? :?: Where can I find this?

If I load a single VOB rip, it seems ok. Only when I try to use AVS script.

Also, as the source is 16:9, I am setting to this in ffmpeg. The DVD is anamorphic. :?: Should I be setting to 16:9 and is there anything else I should be doing?

:?: With DVDPatcher, what settings should I use?

Dialhot 01-29-2004 09:16 AM

Quote:

Originally Posted by nicksteel
:?: Should I download a YV12 codec and install? :?: Where can I find this?

You never did any DVD before ?
Yes you need a YV12 codec and Xvid is a perfect one. So even if you do not plan to do any xvid in your life you must install it.

incredible 01-29-2004 09:33 AM

Quote:

Originally Posted by nicksteel
I get "Couldn't locate decompressor for format 'YV12' (unknown)" from VirtualDub.
:?: Should I download a YV12 codec and install? :?: Where can I find this?

Even you never did reencode a DVD, your PVR250 mpeg2 captures also come out as YUV 4:2:0 means YV12 to avisynth, and thats what I also don't understand like Phil above!
Quote:

If I load a single VOB rip, it seems ok. Only when I try to use AVS script.
Also, as the source is 16:9, I am setting to this in ffmpeg. The DVD is anamorphic. :?: Should I be setting to 16:9 and is there anything else I should be doing?
:?: With DVDPatcher, what settings should I use?
:?: Sorry, but first this is NOT ffmpeg, we're talking here about ffvfw. And you should use Moviestacker as THAT one is responsable for correct 16:9 or 4:3 resized outputs via Avisynth code.

By using Moviestacker you will open a moviestacker generated avs in Virtualdub and safe there (as AVI) the new mpg by using fast recompress and the ffvfwmpeg4 codec at mpeg2 settings and data output to external mpeg file only. As explained some postings more above.

As explained by Kwag, you only use DVD patcher AFTER demuxing that outputted mpg to m2v to set a DVD compilant max bitrate in the header so the DVD auth. appl. does accept the stream.

kwag 01-29-2004 09:53 AM

Quote:

Originally Posted by incredible
Now the ffvfw: To me it seems that the noise adding even does make the surfaces like her arm a little bit uneasy BUT as seen as a whole the picture looks more natural! Look at her skin and it just "seems" to be more detailed (her eyes).

Exactly :D
And BTW, you might want to drop the noise value I suggested above by one or two points, to 7 or 6. I encoded the complete movie without noise and with noise, and without noise the video stream is 1,268,647KB and with a noise value of 8 it's 1,840,642KB. But the quality is AWESOME with noise :!: :lol:
Quote:


Well we could now start a philosophy which one is better, the added noise one or the left as it is one of the ffvfw samples. But my conlcusion is that I do agree that in case of YOUR samples the ffvfw do look best!
Yep. Visually, ffvfw's encode is the most pleasing picture :)
And again, the motion estimation and colors of this CODEC are just EXCELENT :mrgreen:

-kwag

kwag 01-29-2004 09:56 AM

Quote:

Originally Posted by vmesquita
I encoded my sample from the Lawnmover man using the noise parameters Kwag suggested on FFVFW. The file got real big, jumping from 33.594kb (without noise) to 67.112kb (more than double). Quality is better, but at this cost, I think it's not worth it.

Hi Vmesquita,

Drop the noise to 6 or 7.
But I'm sure that when you encode the complete movie, the final size will not be twice the size of the same encode, without noise applied ;)

-kwag

incredible 01-29-2004 09:58 AM

YEP! But there's still the problem that most of the participants do not match your quality of quantisation even when using same settings, well as said, two possibilities could be responsable for this:

1. Update to the newest build of ffvfw needed (and that I'll figure out this evening)

2. For a good quantisation the weather is too cold in europe now compared to Puerto Rico or Brazil :lol:

kwag 01-29-2004 10:03 AM

@incredible,

I retract from my previous comment about 3 B frames being better quality that 2.
The last sample screenshots, and the Sample #3, were encode with 2 B frames.
With 3 B frames, I can see more visible DCT blocks.
So it seems 2 B frames (IBBP) is the best overall quality setting for this CODEC.

-kwag

kwag 01-29-2004 10:04 AM

Quote:

Originally Posted by incredible

2. For a good quantisation the weather is too cold in europe now compared to Puerto Rico or Brazil :lol:

LOL :lol:

nicksteel 01-29-2004 10:08 AM

Sorry, I meant ffvfw, not ffmpeg.
 
Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by nicksteel
:?: Should I download a YV12 codec and install? :?: Where can I find this?

You never did any DVD before ?
Yes you need a YV12 codec and Xvid is a perfect one. So even if you do not plan to do any xvid in your life you must install it.

Of course I do DVD and KVCD (using a lot of your advice!). I have never before installed Xvid and have had no YV12 problems using any avs script going into TMPGEnc. I just downloaded Xvid and installed. Now VirtualDub will accept the AVS. Thanks.

Incredible, I think this is the correct thread and I'm not talking about MovieStacker. Thanks.

incredible 01-29-2004 10:11 AM

Quote:

Originally Posted by kwag
@incredible,
I retract from my previous comment about 3 B frames being better quality that 2.
The last sample screenshots, and the Sample #3, were encode with 2 B frames.
With 3 B frames, I can see more visible DCT blocks.
So it seems 2 B frames (IBBP) is the best overall quality setting for this CODEC.

I do totally agree afterwards as my samples yesterday showed best quality and compression when using 2 B Frames. Or my outputs do change every day in their behaviour ;-)

Or we should do try using 1 Bframe as it to me seems that in fast moving scenes I frames in some cases come out smooth and detailed where the following B Frames (sometimes) in these cases got Blocks.
This normally stays for a very hard Non-Intra quantisation of B and P Frames! So we also should figure out those B and P Frame parameters :idea: :?:

kwag 01-29-2004 10:16 AM

Here are a couple of screenshots from my previous encode. One fast action scene, and one dark scene.

http://www.digitalfaq.com/archives/i...2004/01/11.png
http://www.digitalfaq.com/archives/i...2004/01/12.png

-kwag

Dano 01-29-2004 10:30 AM

This encoder is sweet. I did an encode of a PVR-250 cap of Earth Final Conflict (from the SciFi channel) and the result was the best looking encode I have ever done, including DVD backups. I used Kwag's settings with 2 B frames and the MA script using lanczosresize at 704 x 480 with 2 blocks of overscan. I was shooting for a one cd encode and ended up with a 550 Mb .m2v even at 100 quality. I have been trying for a long time to get acceptable quality from STNG caps from Spike TV channel but the noise from this channel and the complexity of this show made me give up after a long time of trying all sorts of things. I was so impressed with the quality from the SciFi channel (which is a very clean source) I figured I would see what ffvfw could do with a noisy source. I know this might be hard to believe but the quality of the STNG was actually better than the EFC encode 8O The only problem was the file size was over so I am reencoding it by adjusting the Quality to 95 based on sampler results. This should result in a slightly undersized file but I think greater accuracy can be gained by adjusting the quantisizers as well. This encoder seems to really like Kwag's MA script.

kwag 01-29-2004 10:36 AM

Quote:

Originally Posted by Dano
The only problem was the file size was over so I am reencoding it by adjusting the Quality to 95 based on sampler results. This should result in a slightly undersized file but I think greater accuracy can be gained by adjusting the quantisizers as well.

Hi Dano,

How about simply running ReJig (Requant) on your .m2v :idea:
Then, you don't have to re-encode :!:
Worth a try :?:
Quote:

This encoder seems to really like Kwag's MA script.
Yes it does, and even without the MA script, just with the notch the matrix, it seems to compress very well :)
BTW, forgot to say that the last sample (Sample #3) and the last screenshots (taken from that encode), were encoded without the MA script 8O 8)

-kwag

nicksteel 01-29-2004 10:37 AM

Kwag
 
Quote:

(Maximum quality) and MAX bitrate set to 8,000Kbps
So I made a test with ffvfw CODEC, and I turned on "Enable Image Processing" on Input, and added "Noise" .
Check the following options:

Noise
New noise algorithm(avih)
Uniform Noise
Set Luminance noise strength to 8
Set Chroma strength to 0
:?: How did you turn on "Enable Image Processing"?

I downloaded and installed ffdshow-20020617.exe from the site given on the "Input" screen, but still cannot enable.

vmesquita 01-29-2004 10:48 AM

@nicksteel
Visit this thread and grab the latest ffvfw and ffdshow:
http://www.kvcd.net/forum/viewtopic.php?t=8824


All times are GMT -5. The time now is 12:59 PM  —  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.