NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) GB-PVR Support (legacy) v
« Previous 1 … 165 166 167 168 169 … 1231 Next »
Where are you, FFMPEG Gurus, I need advice!

 
  • 0 Vote(s) - 0 Average
Where are you, FFMPEG Gurus, I need advice!
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#1
2009-02-20, 08:20 AM
After countless trial-and-error I'v finally managed to get a fairly good conversion of recorded analog TV-shows using FFMPEG. I'v given up MENCODER since it works for most of my recordings but not all. The quality of the resulting -avi file is, as far as I can see, good, but the conversion is slow.

Evan with my new AMD64-X2-6000+ cpu it takes more than an hour to convert a 45 min show. Tha commandlines looks as follows:

"C:\Programfiler\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe" -i "%~dpn1.mpg" -threads 2 -an -s 768x576 -pass 1 -vcodec h264 -b 1200k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me epzs -subq 1 -trellis 0 -refs 1 -bf 16 -b_strategy 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 142282 -rc_eq "blurCplx^(1-qComp)" -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 "%~dpn1.avi"

"C:\Programfiler\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe" -i "%~dpn1.mpg" -threads 2 -s 768x576 -pass 2 -vcodec h264 -b 1200k -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -me umh -subq 7 -trellis 1 -refs 6 -bf 16 -directpred 3 -b_strategy 1 -bidir_refine 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 142282 -rc_eq "blurCplx^(1-qComp)" -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -acodec mp3 -ar 44100 -ab 128k -y "%~dpn1.avi"

Is there a way to reduce the processing time without reducing quality or increasing the file size too much (the converted size is now about 30% of original size)?

"I'd rather have a bottle in front of me than a frontal lobotomy"
sgilani
Offline

Senior Member

Posts: 730
Threads: 72
Joined: Jan 2006
#2
2009-02-20, 08:38 AM
you really shouldn't be doing 2-pass with H.264.. CRF is what you need to do. it's much easier to use the x264 codec with mencoder for this purpose, and you'll get much quicker results with the same great quality and lower file size.

something like this:
Code:
mencoder %1 -oac mp3lame -lameopts cbr:br=128 -ovc x264 -x264encopts interlaced:crf=22:frameref=3:bframes=3:weight_b:nodeblock:8x8dct:partitions=p8x8,b8x8,i8x8,i4x4:me=umh:threads=auto -o "%~dpn1.avi"
sgilani
Offline

Senior Member

Posts: 730
Threads: 72
Joined: Jan 2006
#3
2009-02-20, 08:39 AM
btw,you CAN do this with ffmpeg; it's just that mencoder does a better job for this purpose for one reason in my extensive testing with it--it preserves the interlaced flag. This way, I can take advantage of hardware deinterlacing and inverse telecine. ffmpeg refused to tag the video as interlaced no matter what I did.
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#4
2009-02-20, 08:49 AM (This post was last modified: 2009-02-20, 09:03 AM by Reddwarf.)
Only problem with that is MENCODER does not work for all recordings, see thread http://forums.nextpvr.com/showthread.php?t=40891

EDIT:

BTW: Why shouldn't I do two-pass encoding for h264? Doesn't it give an even better result?

"I'd rather have a bottle in front of me than a frontal lobotomy"
-stattik-
Offline

Posting Freak

Posts: 924
Threads: 26
Joined: Mar 2005
#5
2009-02-20, 04:07 PM
What's the original resolution of your source? 768x576 seems like it may be upconverting the signal. And sgilani is correct. Unless you need an exact filesize, CRF is faster than 2-pass.
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#6
2009-02-20, 06:12 PM
The original is 768x576, what exactly do you mean?

"I'd rather have a bottle in front of me than a frontal lobotomy"
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#7
2009-02-20, 06:54 PM
what is CRF? and why =22?
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
sgilani
Offline

Senior Member

Posts: 730
Threads: 72
Joined: Jan 2006
#8
2009-02-21, 05:50 AM
CRF is a way of ensuring constant quality with x264. There is no need anymore to do 2-pass unless you want to have an exact filesize. As far as quality is concerned, you're just going to be wasting time dong a 2-pass, as CRF will do the job for you just fine.

there's a quick formula to convert between XviD quantizer (ASP) and x264 quantizer (AVC) :

QPavc = 6*log2(QPasp) + 12

so, a 22 corresponds to a bit above 3, which yields excellent quality, and thanks to x264's efficiency, very good filesizes as well.

as for mencoder, I've never had any trouble with it.. might be an issue with the particular build you're using?
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#9
2009-02-21, 10:28 AM
I'v tried the command line suggested here with MENCODER, and when it works the quality is excellent. But last night it happend again with a recording of Criminal Minds, the converted .avi file ended up as a 27.5 seconds file, I'v attached the log from ReProcess.bat. The result is the same even if I use the -ni option as suggested from MENCODER. The .mpg-file however plays fine, and I can't find anything wrong with it.

I'll try to use the CRF 22 option with FFMPEG in a one-pass conversion and see what happends.

"I'd rather have a bottle in front of me than a frontal lobotomy"
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#10
2009-02-21, 01:46 PM
Well the CRF 22 (no fixed bitrate) switch seems to work just fine with FFMPEG, a 52 min show results in a 350k .avi file, and the quality is fair enough. Still a bit slow, but again slightly more than half the time of a two-pass conversion (and smaller output file). So I think I settle with that.

Thanks a lot to you all!

"I'd rather have a bottle in front of me than a frontal lobotomy"
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I activate ffmpeg to automaticaliy convert MPG video to AVI format in GbPVR HYBRiD.BLiNG 0 1,204 2010-04-18, 01:52 AM
Last Post: HYBRiD.BLiNG
  ffmpeg mpeg4 codec problem VBR TS file luttrell1962 12 7,766 2010-02-24, 07:53 PM
Last Post: luttrell1962
  All channels gone - signal (I think) but no lock - advice appreciated. mrspaces 4 2,035 2009-12-29, 05:29 PM
Last Post: mrspaces
  Advice for new dvb-c card Reddwarf 0 982 2009-08-30, 09:17 AM
Last Post: Reddwarf
  Anyone in Sydney help me with EPG & setup advice? ajst2duk 5 2,126 2009-07-17, 03:02 AM
Last Post: ajst2duk
  Set Process Priority of ffmpeg gnutech 1 2,424 2009-06-21, 03:13 AM
Last Post: zehd
  FFMPEG Priority Dan the man 8 5,425 2009-06-07, 09:15 PM
Last Post: gnutech
  XviD Second Pass With FFMPEG BTJustice 55 15,272 2009-04-23, 11:14 PM
Last Post: BTJustice
  Removing Black Borders (Another FFmpeg XviD Trick) BTJustice 3 6,729 2009-03-31, 08:38 AM
Last Post: BTJustice
  Can't change channels - advice? (newbie) deemzzzz 5 1,669 2009-02-10, 02:00 AM
Last Post: deemzzzz

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode