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)

poerschr 03-01-2004 03:55 PM

no, it is definately not something that you can correct with any avisynth filter, certainly not blockbuster) - these blocks are created by the encoder. (this picture has been adjusted in Photoshop to bing about the blocks) . These blocks plague my encodings in scenes with slight gradents - it is dark or light scenes, it does not matter (usually in backgrounds). I thought that this might be related to the compression of the encoder - but when I tried to increase the bitrate, the encoder did exactly the same thing. So, this leaves me to beleive that it is related to some setting in the encoder.

Quote:

Anyway, I'm aiming KDVD, that means bitrates between 300 and 5000 and average around 2000-3000, and I don't think I'll have any problem in slow dark scenes. AFAIK tmpgenc is still better for low bitrates... if your tests don't say the opposite, of course.
Also, my goal is a ~5 hour KDVD. Bitrates around the same. No one else is getting these blocks??

bilu 03-01-2004 04:09 PM

@poerschr

Have you tried the settings I posted? Did any of them help?


Bilu

rds_correia 03-01-2004 06:37 PM

Hi bilu,
I'm not quite sure but I tried with your settings and the final encoded stream cannot be played by PowerDVD...
Have I got to demux? Don't think so.
Any ideas?
Cheers

EDIT: I tried with wmp and it tries to download a new codec and it fails.

poerschr 03-02-2004 01:04 AM

@bilu

Quote:

Have you tried the settings I posted? Did any of them help?
Nothing works..this encoder does exactly what it wants too (ffvfw)...even tried constant bitrate of 10 mbit, but it only encodes the file at 900. I am going to keep trying, but there must be some way to reduce these blocks...I thought that ratecontrol setting might work, but it does not allow a value other than 0% or 1%, even the value 100% (which is states in the helpfile below), is not accepted (that is ratecontrol under "quantizer compression")....

Anerboda 03-02-2004 02:27 AM

Quote:

Originally Posted by poerschr



Nothing works..this encoder does exactly what it wants too (ffvfw)...even tried constant bitrate of 10 mbit, but it only encodes the file at 900. I am going to keep trying, but there must be some way to reduce these blocks...I thought that ratecontrol setting might work, but it does not allow a value other than 0% or 1%, even the value 100% (which is states in the helpfile below), is not accepted (that is ratecontrol under "quantizer compression")....

I believe that 0 is 0% and 1 is 100%, so a value of 0.5 is actually 50%

Anerboda

bilu 03-02-2004 04:36 AM

Quote:

Originally Posted by rds_correia
Hi bilu,
I'm not quite sure but I tried with your settings and the final encoded stream cannot be played by PowerDVD...
Have I got to demux? Don't think so.
Any ideas?
Cheers

EDIT: I tried with wmp and it tries to download a new codec and it fails.

Hmm... The final M2V file can't also be played through Sonic Cineplayer.
Maybe it's better to mux the AVI instead of the M2V created by stream.dump :?

But plays nicely through VirtualDubMod and Gabest's Media Player Classic. :)

Can you try it please?

EDIT: Bitrate Viewer and PowerDVD 4.0 also works with the M2V file.

Bilu

rds_correia 03-02-2004 06:53 AM

Oops,
I'm not creating the m2v with the stream.dump .
I though it was only needed to change fps settings.
Do I need it on a 25fps makeAVIS encode, with your above settings?
Anyways I don't have Media Player Classic installed but I will try it through VDubMod
latter on this evening.
I'm not even sure if IfoEdit accepts the encoded stream for muxing.
Anyway what will I gain if I can play it with VDubMod/MPC?
Thanks bilu

bilu 03-02-2004 07:37 AM

Quote:

Originally Posted by rds_correia
Do I need it on a 25fps makeAVIS encode, with your above settings?

Yes if you want to encode interlaced sources.
Since it only works good with the AVI container you have to dump the AVI video stream to get rid of the AVI header.

What I don't really know but so far seemed to work is: what is the M2V header?

Because I renamed a dumped stream to M2V and it worked fine on those programs, but the header may still be wrong. :?


Bilu

bilu 03-02-2004 08:08 AM

Quote:

mplayer -dumpvideo movie.avi -fps 29.97
The -fps parameter doesn't seem to work (at least with my tools)

Bilu

rds_correia 03-02-2004 10:43 AM

Quote:

Originally Posted by bilu
Yes if you want to encode interlaced sources.
Since it only works good with the AVI container you have to dump the AVI video stream to get rid of the AVI header.

Bilu

Mayday! Mayday! Mayday!
Noob alert! :oops:
Bilu: are there PAL interlaced DVD sources?
Thanks

bilu 03-02-2004 11:18 AM

http://www.doom9.org/ivtc-tut.htm#PA...eBadAndTheUgly

Ever heard of phase-shifting?

Bilu

digitall.doc 03-02-2004 11:25 AM

Quote:

Originally Posted by bilu
But plays nicely through VirtualDubMod and Gabest's Media Player Classic. :)

Can you try it please?

EDIT: Bitrate Viewer and PowerDVD 4.0 also works with the M2V file.

Bilu

Hi bilu, rds,
I know that you already know, and that it is common sense, and not really neeeded to be remembered, but I do: what we want it is to be compatible and playable on standalones.
I still didn't test your way through stream.dump, because it seems it's not working. What are your experiences?, do we encode with -of avi or better keep on -of mpeg?. How can we make it work?. With -of avi you didn't get the Unknown block type errors, did you?.
Using previous way, through -of mpeg, I managed to feed it to DVDlab and burned a KDVD that I'll take a look later on my standalone. DVDlab didn't compain, and I could view the m2v file with PowerDVD. I still didn't try it on IfoEdit since are just samples, and don't have audio sample to mux with.
What have been your latest advances?.

bilu 03-02-2004 11:40 AM

Quote:

Originally Posted by digitall.doc
I still didn't test your way through stream.dump, because it seems it's not working. What are your experiences?, do we encode with -of avi or better keep on -of mpeg?. How can we make it work?. With -of avi you didn't get the Unknown block type errors, did you?

No Unknown block type errors. And I can do interlaced encodes this way.
Quote:

Using previous way, through -of mpeg, I managed to feed it to DVDlab and burned a KDVD that I'll take a look later on my standalone. DVDlab didn't compain, and I could view the m2v file with PowerDVD. I still didn't try it on IfoEdit since are just samples, and don't have audio sample to mux with.
Can you test a stream done without -of mpeg and dumped from AVI to M2V? We're still trying to know if it's valid. :?
Quote:

What have been your latest advances?.
Asking for help :)

http://www.kvcd.net/forum/viewtopic.php?p=65599#65599 (thread deleted, see next post)

EDIT: BBInfo and BBVInfo (from bbtools) also report as a valid MPEG-2 transport stream. Sonic Cineplayer is the only one that didn't work for me so far.

Bilu

bilu 03-02-2004 01:11 PM

Problem solved, don't know why 8O

Quote:

set menc=D:\kvcd\progs\mplayer
set bb=D:\kvcd\progs\bbtool
set movdir=D:\kvcd\samples\ntsc
set outdir=D:\kvcd\result
set movie=%1

cls
cd /d %movdir%
del /q /f %outdir%\%movie%.mpg
del /q /f %outdir%\%movie%.avi
del /q /f %outdir%\%movie%.m2v
del /q /f %movdir%\*.log


%menc%\mencoder -of mpeg -ovc lavc -noskip -nosound -lavcopts vcodec=mpeg2video:ildct:ilme:vrc_eq=tex:vqblur=0:v rc_minrate=300:vrc_maxrate=9800:vbitrate=9800:vrc_ buf_size=1835:keyint=18:autoaspect "%movdir%\%movie%" -o %outdir%\%movie%.mpg -fps 30 -ofps 30

%bb%\bbdmux %outdir%\%movie%.mpg 0xe0 %outdir%\%movie%.m2v
del /q /f %outdir%\%movie%.mpg
Will try to find why I couldn't do interlaced with -of mpeg in the first place. Maybe something to do with parameter order...

Now also works with IfoEdit and TMPGEnc.

Bilu

bilu 03-02-2004 01:14 PM

Next item: try to investigate why we need -ofps 30 with NTSC.

It only happens with the current CVS build, not the official one.
If not needed I could use the same command-line regardless of the source.

EDIT: Hmmm... Nevermind. I still have to deal with keyint anyway ;)

Bilu

digitall.doc 03-02-2004 02:38 PM

Happy to hear you solved it bilu :)
But I'm afraid the Unknown block type errors are back :(
Well, the test I did and burned in DVD... very good. They are the same I did to test ffvfw. With ffvfw (previous settings, with constant bitrate adjust to VBV 224) the standalone freezed from time to time, not necessarily in fast actions or bitrate demanding, and also slowed down in high bitrate scenes, even skipped from time to time.
With mencoder, plays smoothly, and player reports maximum bitrate about 8200 (not very accurate, I know, but I wanted to "ask" the player what it was reading).
The way I see it,
C
8) 8)
L
.
But still many things to improve. BTW, I got some dark slow scenes in my tests, and didn't notice blocks (of course, on TV is not the same as on PC monitor).
EDIT: Ah, bilu, taking a second look at your command-line I saw you're not using any vmax_b_frames, so it's set to default=0. Wouldn't it be better a standard GOP with B frames?. I think it was already commented in this thread. Did you test it in a standalone player, does it accept a non-standard GOP?.
EDIT2: In vmesquita compilation I saw a parameter I don't remember in previous build, that detects scene change. Does anybody know how to tweak it?. Just if anyone tested it, and to avoid some tests (have got little time :roll: ).

bilu 03-02-2004 07:57 PM

@digitall.doc

That was just an example, it's purpose was to test interlaced encoding and not quality.

Now, and until a new CVS build supports fractional framerates, I'll have to use different command-lines for PAL and NTSC. And to find a way to change from 30 fps back to 29.97 fps (maybe cheating and using the old mencoder version with stream copy like this: mencoder -of mpeg -ovc copy -fps 29.97 -ofs 29.97 movie1.m2v -o movie2.mpg, and then demux to an m2v file).

About keyint, it may be possible to get the framerate and make that decision on a script, both on Windows and Linux.

I'd really like to see that fractional framerate issue solved :?
Will investigate. Only then I'll focus on quality/compressibility parameters.

Bilu

rds_correia 03-02-2004 08:03 PM

Quote:

Originally Posted by bilu
I'd really like to see that fractional framerate issue solved :?
Will investigate. Only then I'll focus on quality/compressibility parameters.

Bilu

Hi buddy,
Yeah, I completely agree with you on this.
Better clean up the house first and only then buy the furniture (does this make sense :lol: ??)
Later...

bilu 03-02-2004 08:43 PM

Quote:

Originally Posted by rds_correia
Hi buddy,
Yeah, I completely agree with you on this.
Better clean up the house first and only then buy the furniture (does this make sense :lol: ??)
Later...

Well, THAT makes sense, but the solution DOESN'T. 8O

Found this and tried, it works!!! -> vstrict=-1 (despite being 0 in docs to disable vstrict :roll:)

http://www1.mplayerhq.hu/pipermail/m...ry/042627.html

So this seem to be the minimum required parameters to support any kind of DVD:
Quote:

mencoder -of mpeg -ovc lavc -noskip -nosound -lavcopts vcodec=mpeg2video:ildct:ilme:
vstrict=-1:vrc_minrate=300:vrc_maxrate=9800:vrc_buf_size=18 35:keyint=18(15 for PAL,18 for NTSC) movie.vob -o movie.mpg

bbdmux movie.mpg 0xe0 movie.m2v
The error messages you get now are just informational, or so it seems.


Bilu

bilu 03-02-2004 08:51 PM

Output from mencoder -of help :
Quote:

Available output formats:
avi - Microsoft Audio/Video Interleaved
mpeg - MPEG-1 system stream format
I wonder how can you encode MPEG-2 and extract an M2V from this container. But it works, that's what is important ;)

Bilu


All times are GMT -5. The time now is 05:51 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.