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 … 139 140 141 142 143 1231 Next »
XviD Second Pass With FFMPEG

 
  • 0 Vote(s) - 0 Average
XviD Second Pass With FFMPEG
BTJustice
Offline

Senior Member

Posts: 381
Threads: 61
Joined: Mar 2008
#1
2009-02-25, 01:25 AM (This post was last modified: 2009-03-04, 03:40 PM by BTJustice.)
EDIT: IT WORKS!!! Please read... http://forums.gbpvr.com/showpost.php?p=3...stcount=35

I am trying to figure out how to have ffmpeg do a second pass when encoding a .mpg to a .avi but every time it leaves the .mpg and creates the .avi but it has no size. Here is my code in config.xml ...

Code:
<Conversion name="XviD" cmd="-y -i {SOURCE_FILE} -f avi -ab 224k -ac 2 -acodec mp3 -vcodec xvid -deinterlace -pass 2 -qscale 7 -vtag XVID {DEST_FILE}" targetExtension=".avi" />
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#2
2009-02-25, 09:47 AM
To use the "-pass 2" parameter to ffmpeg you need to run it first with the "pass 1" parameter, that creates a passlogfile with statistics that is used during the second pass. But it is not possible to have the built-in conversion do a two-pass conversion, for that you need to replace the ffmpeg-command with the name of a .bat-file that does the actual conversion. Search the forums for "ffmpeg", there are some hints and clues in some threads here.

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

Senior Member

Posts: 381
Threads: 61
Joined: Mar 2008
#3
2009-02-25, 10:10 AM
Searching for -pass didn't yield any results.

I did some digging and found this code for a .BAT file...

Code:
Title %~n1 -- pass 1
"C:\Program Files\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -i %1 -vcodec xvid -bf 1 -an -deinterlace -qscale 7 -pass 1 -y nul.avi
Title %~n1 -- pass 2
"C:\Program Files\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -i %1 -vcodec xvid -acodec mp3 -ab 224k -bf 1 -pass 2 "%~dp1%~n1.avi"
pause

I am not sure if that would work or how to enter the syntax to use it in config.xml Sad
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#4
2009-02-25, 11:17 AM
First of all: What's your goal, are you looking for a good quality encoded file, a small file or a quick conversion? You can't have them all, it will always be a compromise, so why do you want to do a two-pass conversion?

With h264 codec however, it is possible to have a relativly small file with good quality, but it takes time. Let me hear what you want.

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

Senior Member

Posts: 381
Threads: 61
Joined: Mar 2008
#5
2009-02-25, 08:07 PM
I want a sharp picture and a small file. My XviD .avi files are good on size using qscale 7, but they have blocks in them especially in action sequences and in areas where the video is black. I figured a second pass would clean them up a bit more.

Maybe the blockiness comes from watching videos in full screen. My resolution for them is 720 x 480 whereas I use 1440 x 900 on my desktop.

Of course if there is a better codec out there to encode with that would give me small size and a decent picture then I am all for it.
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#6
2009-02-25, 10:51 PM
The best result I'v got so far is with the H264 codec, here's the command line I use in the postprocessing .bat:

"C:\Programfiler\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe" -i "%1" -threads 2 -s 768x576 -crf 22 -vcodec h264 -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 "%2"

You could modify it to fit the syntax in config.xml, h264 encoding however is a heavy task. See thread http://forums.nextpvr.com/showthread.php?t=40978

Good luck! Smile

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

Senior Member

Posts: 381
Threads: 61
Joined: Mar 2008
#7
2009-02-26, 10:56 AM (This post was last modified: 2009-02-26, 01:45 PM by BTJustice.)
Would this simple code work?

Code:
<Conversion name="H.264" cmd="-y -i {SOURCE_FILE} -f mp4 -ab 256k -ac 2 -acodec mp3 -ar 44100 -crf 22 -deinterlace -threads 2 -vcodec h264 -vtag H264 {DEST_FILE}" targetExtension=".mp4" />
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#8
2009-02-26, 07:00 PM
Why not give it a try and see for yourself? Big Grin (remember to back-up the original file first).

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

Senior Member

Posts: 381
Threads: 61
Joined: Mar 2008
#9
2009-02-27, 12:28 AM
It doesn't work.
BTJustice
Offline

Senior Member

Posts: 381
Threads: 61
Joined: Mar 2008
#10
2009-02-27, 12:39 AM (This post was last modified: 2009-02-27, 12:45 AM by BTJustice.)
On a side note, I thought this was pretty impressive...

http://flowplayer.org/forum/7/12671

I made a new thread about H.264...

http://forums.nextpvr.com/showthread.php?p=326671
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): 1 2 3 4 5 6 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,266 2010-04-18, 01:52 AM
Last Post: HYBRiD.BLiNG
  ffmpeg mpeg4 codec problem VBR TS file luttrell1962 12 8,075 2010-02-24, 07:53 PM
Last Post: luttrell1962
  Problem playing xvid in FSE Clanky 3 2,012 2009-12-17, 03:01 PM
Last Post: Clanky
  Transcode Xvid profile aspect ratio Warwick 0 1,301 2009-10-07, 08:46 AM
Last Post: Warwick
  Encoding .MPG Files To .AVI XviD Files Using HandBrake BTJustice 2 4,801 2009-07-08, 09:52 PM
Last Post: BTJustice
  Hardware MPEG2 directly to Xvid clubrulz 0 1,250 2009-06-22, 06:17 PM
Last Post: clubrulz
  Set Process Priority of ffmpeg gnutech 1 2,499 2009-06-21, 03:13 AM
Last Post: zehd
  FFMPEG Priority Dan the man 8 5,555 2009-06-07, 09:15 PM
Last Post: gnutech
  mencoder fmv4 two pass command line help needed tvshowman 1 1,464 2009-04-25, 09:20 PM
Last Post: tvshowman
  Removing Black Borders (Another FFmpeg XviD Trick) BTJustice 3 6,853 2009-03-31, 08:38 AM
Last Post: BTJustice

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

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

Linear Mode
Threaded Mode