VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Hi everyone

    Google has not been my friend lately..

    I was searching around to no avail..searching for the xvid (one used when doing 2-pass encodes in vdub) the one that comes also in the xvid cli command line version. At least that's what I thought--that its the same xvid encoder.

    I was getting tired of preparing 2-pass encodes inside vdub and on occasion would crash for no reason on the 2nd pass. And having to resort to re-building the two passes and re-runing the encode inside vdub etc. etc., I was hoping to juse do it via command line (I would incoproate in my tool_suite gui I've been programming here and there) and deal with my encoding scenarios from there on. Anyway, I believe that the "xvid cli.exe" or whatever its name is is the same xvid encoder that vdub uses via the encoder dialog box.

    Thank you,
    -vhelp 5147
    Quote Quote  
  2. Man of Steel freebird73717's Avatar
    Join Date
    Dec 2003
    Location
    Smallville, USA
    Search PM
    I found a thread about this on doom9
    http://forum.doom9.org/showthread.php?t=97008
    encraw.exe was suggested.
    Also note this post
    http://forum.doom9.org/showthread.php?p=684984#post684984
    In summary, with VirtualDub's help, all that's required to encode XviD is a front-end program that:

    1. Reads command-line switches, and generated the appropriate CONFIG structure.
    2. Encodes the data in base64 (possibly using an external helper program).
    3. Writes it into a job file.
    4. Calls vdub.exe, passing the job file as its argument.
    I know that this is not necessarily not what you were asking for but hopefully it will help.
    Donadagohvi (Cherokee for "Until we meet again")
    Quote Quote  
  3. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    thanks freebird73717. Actually, that's one of the threads I'm currently reading too long I think, am at page 28 with a strong headacke. Now, I'm too tired. I was just looking for simple cmd line tool to front-end to. I'm begining to think that xvid cli was just a falicy or fantacy/fiction after all. Thanks for the tip.

    --> xvid_encraw - Patched with AviSynth input support
    --> xvid_encraw_avs3.zip tool: to here

    snip from that page: -- in case anyone else is looking around this idea.

    Code:
    Ok, thatīs all switches I want to implement, have I missed something (except zones). Note that the description is either taken from vfw or directly from xvid.h, what means I donīt what they are all good for. I also reorderd them in the help display:
    Code:
    Input options:
     -i      string : input filename (default=stdin)
     -type   integer: input data type (yuv=0, pgm=1, avisynth=2)
     -w      integer: frame width ([1.2048])
     -h      integer: frame height ([1.2048])
     -frames integer: number of frames to encode
    
    Output options:
     -dump    : save decoder output
     -save    : save an Elementary Stream file per frame
     -o string: save an Elementary Stream for the complete sequence
    
    Bitstream options:
     -prf  profile      : indicated profile ([S0.S3] or [AS0.AS5])
                                            (default=unrestricted)
     -par  aspect_ratio : pixel aspect ratio ([VGA11; PAL43; NTSC43; PAL169;
                                               NTSC169]) (default=VGA11)
     -custom_par  X Y   : custom pixel aspect ratio
     -divx_ud           : write DivX-userdata
     -vol_ivop          : repeat VOL at every I-VOP
    
    General encoding options:
     -quality    integer: quality ([0..6]) presets
     -hqacp             : high quality ac prediction
     -inter4v           : use 4 motion vectors per MB
     -gmc               : use global motion compensation
     -interlaced        : use interlaced encoding (this is NOT a deinterlacer!)
     -i_tff             : top field first (interlaced encoding)
     -i_alt             : alternate scan (interlaced encoding)
     -reduced_res       : enable reduced resolution
     -force_rrv         : force all frames to be reduced resolution
     -greyscale         : greyscale mode, all chroma is ignored
     -cartoon           : use 'cartoon' mode
     -chroma_opt        : enable chroma-optimizer pre-filter
     -frame_drop integer: frame drop ratio (in percent)
    
    BFrames options:
     -max_bframes   integer : max bframes (default=0)
     -bquant_ratio  integer : bframe quantizer ratio (default=150)
     -bquant_offset integer : bframe quantizer offset (default=100)
     -packed                : packed mode (DO NOT USE! WILL CORRUPT OUTPUT!)
     -closed_gop            : closed GOP mode
    
    Rate control options:
     -framerate         float    : target framerate (>0 | default=25.0)
     -bitrate           integer  : target bitrate
     -single                     : single pass mode
     -pass1             filename : twopass mode (first pass)
     -pass2             filename : twopass mode (2nd pass)
     -zq starting_frame float    : bitrate zone; quant
     -zw starting_frame float    : bitrate zone; weight
     -max_key_interval  integer  : maximum keyframe interval
    
    Single Pass options:
     -cquant         float      : target quantizer (use instead of bitrate)
     -reac_delay     integer    : reaction delay factor
     -avg_period     integer    : averaging period
     -smoother       integer    : smoother
    
    Pass 1 of 2 options:
     -full_1p                   : Full first pass
    
    Pass 2 of 2 options:
     -size           integer    : target size of video (use instead of bitrate)
     -keyframe_boost integer    : keyframe boost (in percent)
     -close_i_red    intA intB  : I frames closer than A frames are reduced by B%
     -ccp_high       integer    : high bitrate degradation (in percent)
     -ccp_low        integer    : low bitrate improvement (in percent)
     -max_oi         integer    : max overflow improvement (in percent)
     -max_od         integer    : max overflow degradation (in percent)
     -overf_cs       integer    : overflow control strength (in percent)
     -dxn_prf        profile    : apply DXN-Profile ([HH; PPAL; PNTSC; HTPAL;
                                                      HTNTSC; HDTV])
     -vbv_size       integer    : buffer size (bits)
     -vbv_initial    integer    : initial buffer occupancy (bits)
     -vbv_maxrate    integer    : max processing bitrate (bps)
     -vbv_peakrate   integer    : max average bitrate over 3 seconds (bps)
    
    Zone options:
     -zq starting_frame float   : bitrate zone; quant
     -zw starting_frame float   : bitrate zone; weight
    
    Quantization options:
     -iquants        min max  : I-frame quantizer restriction ([1.31])
     -pquants        min max  : P-frame quantizer restriction ([1.31])
     -bquants        min max  : B-frame quantizer restriction ([1.31])
     -trellis                 : use trellis based R-D "optimal" quantization
     -mpeg_quant              : use MPEG quantization instead of H.263
     -mpeg_cqm       filename : use custom MPEG quantization matrix (intra & inter)
     -mpeg_intra_cqm filename : use custom MPEG quantization matrix (intra only)
     -mpeg_inter_cqm filename : use custom MPEG quantization matrix (inter only)
     -lumimasking             : use lumimasking/adaptive quantization algorithm
    
    Motion estimation options:
     -hpel       : use half pixel ME
     -qpel       : use quarter pixel ME
     -chromap    : use P-Frame chroma for ME
     -chromab    : use B-Frame chroma for ME
     -me_advd16  : use advanced diamonds as search pattern
     -me_advd8   : use advanced diamonds for extended 8x8 search
     -me_sqr16   : use squares as search pattern
     -me_sqr8    : use squares for extended 8x8 search
     -me_hpelr16 : enable halfpel refine 16
     -me_qpelr16 : enable quarterpel refine 16
     -me_hpelr8  : enable halfpel refine 8
     -me_qpelr8  : enable quarterpel refine 8
     -me_gmer    : enable GME refine
     -me_exts16  : extend PMV by more searches
     -me_exts8   : extended 8x8 search
    
    Rate disortion options:
     -vhq         integer  : R-D presets ([1.4])
     -rated                : enable R-D
     -rd_simple            : use simplified R-D mode decision
     -rd_bf                : enable R-D for B-frames
     -rd_hpelr16           : use R-D halfpel refine 16
     -rd_qpelr16           : use R-D quarterpel refine 16
     -rd_hpelr8            : use R-D halfpel refine 8
     -rd_qpelr8            : use R-D quarterpel refine 8
     -rd_chk_pred          : check vector equal to prediction
     -rd_exts              : perform R-D-based search using square patterns
    
    Turbo options:
     -turbo     : turbo preset
     -t_fr16    : low-complexity 16 refinement
     -t_fr8     : low-complexity 8x8 sub-block refinement
     -t_skipds  : skip b-frame delta search
     -t_fmi     : partly skip interpolate mode
     -t_bfes    : stop b-frame search early
     -t_dsm     : detect stationary scenes
    
    Other options
     -asm            : use assembly optmized code
     -stats          : print stats about encoded frames
     -debug          : activates xvidcore internal debugging output
     -vop_debug      : print some info directly into encoded frames
     -help           : prints this help message
    
    NB: You can define 64 zones repeating the -z[qw] option as many times as needed.
    Please tell if I seem to have forget anything.
    -vhelp 5148
    Quote Quote  
  4. Man of Steel freebird73717's Avatar
    Join Date
    Dec 2003
    Location
    Smallville, USA
    Search PM
    Originally Posted by vhelp
    I was just looking for simple cmd line tool to front-end to.
    I know what you mean. I've been there myself from time to time.

    I suppose you could always use mencoder but from what I've read it doesn't do as good of a job as encoding from vdub with xvid vfw.

    Good luck. I hope you can get something worked out.
    Donadagohvi (Cherokee for "Until we meet again")
    Quote Quote  
  5. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    yeah, the params from the above snip look a bit scarey to me. I didn't see any actual examples let alone examples for 2-pass encodes (I skimmed over lots of stuff quickly) so maybe I'll look into encraw at a later time.

    For now, I may experiment on ffmpeg and libxvid, once I figure out how to do the two pass param setup, hopefully same (param) setup as used in the vdub->xvid way.

    I've improved upon my xvid encodes a lot recently, and I want to see how far I can get with archiving certain content for the WD TV and now, including my latest endeavor, Digital Photo Picture Frames, because they also play video: xvid, divx, mpeg1/ 2/ 4, avi, and h264. I noted (elsewhere) that the HP and Sylvania are the best brands to get, they play all the videos w/out problems, and I use mine for mostly reviewing images and other things but now ideas I spiring and I'm branching around. Anyway, thanks for your input.

    -vhelp 5150
    Quote Quote  
  6. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    According to the Mplayer documentation, you can use the xvidvfw.DLL with Mencoder.
    Quote Quote  
  7. VirtualDub includes a command line version, VDUB.EXE in the same folder as the rest of it's files. I don't know if it will do what you want though.
    Quote Quote  
  8. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    thanks for all your suggestions everyone.

    I don't quite like mencoder too much (and haven't encoporated into my tool_suite just because) but I've been playing around with the ffmpeg (that I have in tool_suite) and I prefer it over most everything else on account of its multi-codec support and what-have-you. Anyway.

    I've been playing w/ ffmpeg's -vcodec mpeg4 and its params options, but its not like the xvid used in vdub (if the xvid codec I'm refering to is the xvidvfw.dll that El Heggunte referenced) the -vcodec mpeg4[options/params] are not producing the same level of quality that I get w/ vdub's. In mpeg4 there is a lot of pixelations at same -/+ bitrate, but the vdub's xvid way is pixelation-free at the same -/+ bitrate. So, I must be doing something wrong in the mpe4 way or I'm just missing a few of the *same* params that the vdub way uses. I don't know.

    But, I'm actually liking the tool_suite way (via -vcodec mpeg4) because of the less preporation work envoled: quick changes are instant for me to restart encoding, for instance. So, I don't want to give that option up. But vdub still puts out much better quality. Plus, I found out (in vdub) I could use the Fast Recompress option for slightly improved quality--I feature I did not know existed during compression setup. So, theres some good and bad egg options, hard to pass up for each. But, I'm stearing closer towards the command line way of things, so ffmpeg is going to be my way if I can figure out how to improve quality of -vcodec mpeg4 (or other xvid library setup) or else find out how to connect to the vdub's xvidvfw.dll library and use the encoding, front-end'wise through coding. I don't know.

    If -vcodec mpeg4[options/params] has transparent *same* functions as vdub's way, I would sure like to know what they are so I can continue in this xvid encoding endeavor

    If there are any suggestion to the above, I would sure appreciate them, thank you,

    -vhelp 5151
    Quote Quote  
  9. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    I'm leaning toward giving xvid_encraw a go, I just needed a few examples of 2-pass encodes to get me started. After digging around some more (google) I found some more info, plus, google threw-up this topic:

    F: https://forum.videohelp.com/topic346161.html,
    S: x264 can't handle fast motion no matter what I try -- Feb 2008

    Code:
    xvid_encraw.exe         xvid_encraw.exe 
    -i "vid.avs"            -i "vid.avs" 
    -pass1 "vid.stats"      -pass2 "vid.stats" 
    -bitrate 900            -bitrate 900 
    -chigh 15               -chigh 15 
    -clow 15                -clow 15 
    -overhead 0             -overhead 0 
    -max_key_interval 300   -max_key_interval 300 
    -nopacked               -nopacked 
    -vhqmode 4              -vhqmode 4 
    -qpel                   -qpel 
    -qtype 1                -qtype 1 
    -closed_gop             -closed_gop 
    -lumimasking            -lumimasking 
    -bmin 3                 -bmin 3 
    -bmax 20                -bmax 20 
    -imin 3                 -imin 3 
    -imax 20                -imax 20 
    -pmin 3                 -pmin 3 
    -pmax 20                -pmax 20 
    -bvhq                   -bvhq 
    -bquant_ratio 162       -bquant_ratio 162 
    -bquant_offset 0        -bquant_offset 0 
    -threads 1              -threads 1 
                            -avi "newvideo.avi"
    ..and might give that one a few test runs, but before I lean toward the xvid_encraw method, I would like to look into the suggestion, xvidvfw.dll via mplayer, and mencoder.

    I've tried the -vcodec xvid and -vcodec mpeg4, even -vcoded libxvid (if you can find the ffmpeg version) and they all seem to produce similar though poor quality..not sure of settings in those yet.

    -vhelp 5152
    Quote Quote  
  10. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Does anybody know how to get the 2-pass working in xvid_encraw ?

    Using the script in my previous post as a "template" but not working.

    I've tried many things but still can't it going..the output does not even indicate *any* errors..this is very frustrating.
    I've tried setting color space to yv12 (read about this in my searches) and setting -type 2 (avisynth.avs) but all I get is the same initial -h output..thanks.

    -vhelp 5155
    Quote Quote  
  11. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Better late than jamais...

    Originally Posted by vhelp
    Does anybody know how to get the 2-pass working in xvid_encraw ?

    Using the script in my previous post as a "template" but not working.
    Perhaps you just needed this version of xvid_encraw:

    http://members.optusnet.com.au/squid_80/xvid_encraw.zip

    I've just tested it on a short clip, and it worked as it should

    HTH.
    Quote Quote  



Similar Threads