Quantcast FFmpeg: GOP of 25 Seems to Eliminate Noise? - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #1  
09-06-2003, 03:28 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
Wow... Just love ffmpeg! It is soooooooooooooooooooooooo fast!!!

ATM I am trying to encode some Family guy eps I captured from TV (mpeg4) to KVCD LBR (avg bitrate 550)

Using your ?KVCDx3? Params it looked really fine!
Having ULBR Bitrate makes the blocks round the MOVING edges really much
Also after scene changes there is a really horrible picture (1 sec later everything is fine again)

btw:
if he REALLY compresses audio in 64 kbit/s (like i told him) it sounds pretty damn good!!!!

edit:
A lot of rc buffer underflow over here... (guess it's the long gop and the low bitrate?)

my command line:

ffmpeg -hq -i '/windows/H/Cartoonconvert/Family Guy - s1 Ep14 - The King Is Dead.avi' -ar 44100 -acodec mp2 -ab 64 -ac 1 -minrate 64 -maxrate 900 -b 575 -bt 50 -qmin 6 -qmax 25 -g 25 -i_qfactor .1 '/windows/E/Test.mpg'

SOMEHOW a GOP of 25 seems to eliminate much of the stuff around moing edges!
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
  #2  
09-06-2003, 04:07 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Razorblade,

Increase your GOP to at least 12 ( -g 12 )
Try this:

Code:
ffmpeg -i '/windows/H/Cartoonccaptures/Family Guy  -s 352x240  -minrate 64 -maxrate 900 -qmin 5 -qmax 25  -g 12 -bufsize 320 '/windows/E/Test.mpg'mpg
See how it looks now, after scene changes.
Look at the average bitrate while encoding. If it shows above your wanted of 550, then increase the qmin.

Ignore the underruns, and demux your stream with TMPEG, and remux with BBMPEG ( as we usually do ).
I'm trying a couple of clips in my standalone in a while.

-kwag
Reply With Quote
  #3  
09-06-2003, 04:08 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
I guess you edited your post while I was posting

-kwag
Reply With Quote
  #4  
09-06-2003, 04:17 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
I edit my posts all 5 minutes! Playing with ffmpeg is fun

btw. what was bad about long gops again? do they cause playback problems on dvd players? (because the longe the gop, the better the video looks @ me!)


EDIT:
the avg bitrate he shows is video+audio (afaik see) ?!

EDIT2:
How about 2 Pass with ffmpeg?

Edit3:
I could also have my video filtered in windows (avisynth) and saved in huffyuv format...

Edit4:
Still can't belive how FAST ffmpeg is... prediction will be more accurate when your/our ffmpeg kvcd work as we can take bigger samples (it's fast anyway)
Reply With Quote
  #5  
09-06-2003, 10:24 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Can't mux correctly
No matter how I encode, and demux with TMPEG and remux with BBMpeg, TMPEG or Mplex, the muxed mpeg is useless
Too many video DTC underflow errors, and just doesn't play correctly on my DVD players. On the PC, it works fine.
I guess we have to wait more time ( which I hope is not too long, as ffmpeg project was registered on 2000-12-06, so it's been almost 3 years since the project started )
If someone can shine a light on this, and is able to correctly mux a ffmpeg created mpeg file ( at least as VCD 352x240 ), please let us know
I can't even create a CBR stream
Everything comes out VBR, no matter how I set -qmin, -qmax, -b, etc.

-kwag
Reply With Quote
  #6  
09-07-2003, 06:55 AM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
hmmmm... i got it working without more than 3 or 4 under and overflows!!!
Now I just have to remember my commandline


I'll reboot linux in a minute
Reply With Quote
  #7  
09-07-2003, 10:25 AM
major4 major4 is offline
Free Member
 
Join Date: Sep 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Can't mux correctly
No matter how I encode, and demux with TMPEG and remux with BBMpeg, TMPEG or Mplex, the muxed mpeg is useless
Exactly.. that's the problem with ffmpeg, there is some monster bug in the muxer. Be sure to use -f vcd however, in order to set the correct block size.

Quote:
Originally Posted by kwag
I can't even create a CBR stream
Everything comes out VBR, no matter how I set -qmin, -qmax, -b, etc.
Yes, that's another bad point, as this chokes many DVD players expecting mpeg-1 to be CBR as per VCD specs.
Reply With Quote
  #8  
09-07-2003, 12:17 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
Seems as if I encoded with these params:

Quote:
ffmpeg -i '/windows/H/Cartoonconvert/Family Guy - s1 Ep14 - The King Is Dead.avi' -minrate 96 -maxrate 1250 -qmin 5 -qmax 25 -hq -g 12 -b 600 -bufsize 320 -bf 2 -acodec mp2 -ab 64 -ac 1 '/windows/E/Test.mpg'
Now I am having fun with this:


Quote:
ffmpeg -i '/windows/F/Testingit.avi' -s 352x288 -hq -qmin 6 -qmax 25 -r 23.976 -bufsize 320 -aspect 4:3 -g 18 -f vcd -sameq -b 1050 -ar 44100 -ac 2 -ab 112 -i_qfactor .1 '/windows/E/Testingit.mpg'
the 1st one gave very few flows as far as i remember...
the 2nd one gives me no flows...
(doesn't -sameq profit from the work of the xvid/divx codec?! The bitrate-distribution should be according to the 2 pass encoded avi file? or am i getting this wrong?!)
Reply With Quote
  #9  
09-07-2003, 12:41 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
BOTH of the files WORK IN MY STANDALONE!!!

The Family guy episode was muxed with tmpgenc (non-standard vcd) and the Testingit avi was muxxed using bbmpeg (kvcd params from the forum!)

As the testingit.avi wasn't 4:3 as the family guy episode it looked pretty weird stretched...

ssssssssssssssssstrike!
Reply With Quote
  #10  
09-07-2003, 02:21 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Razorblade,

Thanks for the test
I think I now zeroed in on the problem.
It a problem with the quantisizer and the minimum ( -qmin) value.
If you set it lower that 3, you get errors. So this is the command line I'm testing now, and it's working correctly without any errors!:

Code:
./ffmpeg -i ~karl/sample.vob -s 352x240 -hq  -r 23.976  -g 24 -b 1150 -ar 44100 -ab 112  -qmin 3  ~karl/test.mpg
I stretched the GOP to 24 (-g 24), just to see if it worked, and it does. But I suggest 18, because of the lack of B frames.

Here's a sample, demuxed with TMPEG and remuxed with MPlex as non-standard VCD (VBR) just like with BBMpeg, and plays flawlessly on my DVD players:

http://www.kvcd.net/downloads/ffmpeg...red-planet.mpg

It does look a little on the green side ( encoded directly from a VOB ). Will have check on that later on. The thing is, that now it does create a correct compliant stream
There are "ZERO" errors when remuxing.
I burned it with VCDEasy, with MPEG compliance checks, and there were no errors reported at all

-kwag
Reply With Quote
  #11  
09-07-2003, 04:07 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
Great...
does this commandline produce vbr? When it doesn't give you a good cq mode (for me it looks more like some kind of abr?!), you could also try "-pass 2"... works fine 4 me as ffmpeg is sooooo fast

How do you get your Aspect Ratio right (I guess it's because u used .vob files, avis screw this pretty much up... guess I'll have to rip some DVDs (which seems to be illigal in germany by now )

btw:
try reducing your audio bitrate! The family guy episode I did was @ 64 kbit/s and sounded very good to me!!!
Reply With Quote
  #12  
09-08-2003, 07:54 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Razorblade2000
How do you get your Aspect Ratio right
-aspect 1.7777
Quote:
Originally Posted by Razorblade2000
try reducing your audio bitrate! The family guy episode I did was @ 64 kbit/s and sounded very good to me!!!
I have bad experience with lowered bitrates for audio on different hardwareplayers, everything lower than 128 will unsync things. (well I didn't test 112
__________________
Groetjes Japie
Reply With Quote
  #13  
09-08-2003, 08:56 AM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
H3h3... as my player plays nearly everything... 64 kbit/s works fine for me...
Reply With Quote
  #14  
09-08-2003, 09:21 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Mine plays everything I feed im too, only I have some friends who wanted a "brand" (sony) and they give problems, they play them only sound will go out of sync after a while.
No problems on my cyberhome or philips doo.
__________________
Groetjes Japie
Reply With Quote
  #15  
09-08-2003, 10:19 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Code:
./ffmpeg -i ~karl/sample.vob -s 352x240 -hq  -r 23.976  -g 24 -b 1150 -ar 44100 -ab 112  -qmin 3  ~karl/test.mpg
I tryed it too on; http://download.divx.com/showcase/HomeWorld1024.avi with the following line:
Code:
ffmpeg -i Unzipped/test_video/divx.avi -s 352x240 -r 23.976 -hq -g 24 -b 1150 -ar 44100 -ab 112 -qmin 3 test.mpg
and vcdimager gave me:
packet length beyond buffer (pos = 2054 + size = 2042 > buflen = 2324) -- stream may be truncated or packet length > 2324 bytes!

Burning your file worked fine do.
__________________
Groetjes Japie
Reply With Quote
  #16  
09-08-2003, 10:42 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by japie
and vcdimager gave me:
packet length beyond buffer (pos = 2054 + size = 2042 > buflen = 2324) -- stream may be truncated or packet length > 2324 bytes!
Did you demux with TMPEG, and remux with BBMpeg

-kwag
Reply With Quote
  #17  
09-08-2003, 11:47 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Did you demux with TMPEG, and remux with BBMpeg


So I did:
Code:
ffmpeg -i $1 -s 352x244 -r 25 -hq -g 18 -b 1150 -an -qmin 3 -f mpeg1video test.m1v & ffmpeg -i $1 -r 25 -ab 112 -ar 44100 test.mp2 & tcmplex -i test.m1v -p test.mp2 -o test.mpg -m b
And I'am watching it now!
Pitty the buildin multiplexer breaks the mpeg. Can't we make a bug/wish list for the ffmpeg people?
__________________
Groetjes Japie
Reply With Quote
  #18  
09-08-2003, 01:50 PM
major4 major4 is offline
Free Member
 
Join Date: Sep 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Japie, if you use -f vcd without remuxing, does it work?
Reply With Quote
  #19  
09-08-2003, 02:57 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi major,

I did try the "-vcd" option, but the video jumps and skips on my standalone.
But the same mpeg, demuxed with tmpeg and remuxed with bbmpeg, plays correctly.

-kwag
Reply With Quote
  #20  
09-08-2003, 04:17 PM
major4 major4 is offline
Free Member
 
Join Date: Sep 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
And if remuxed with mjpegtools mplex does it play as well?
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG: Do ffvfw and mencoder/ffmpeg give the same results? Razorblade2000 Video Encoding and Conversion 4 02-06-2004 04:23 PM
FFMPEG: My preliminary test. ffmpeg 0.4.7 vs. TMPEG 2.520 kwag Video Encoding and Conversion 23 10-21-2003 05:13 PM
FFMPEG: Encoding Audio: toolame,mp2enc or ffmpeg Razorblade2000 Video Encoding and Conversion 0 10-18-2003 03:04 PM
Audio Codecs: Befa - Time signal removal Band Eliminate Filter for Audio jorel Audio Conversion 0 07-24-2003 06:53 PM
Avisynth: noise reduction, lot of mosquito noise? yauman Avisynth Scripting 8 02-02-2003 02:41 PM




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