VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    Jul 2001
    Location
    usa
    Search Comp PM
    if i wanted to try to figure out how to encode stuff from the command line, is it possible and if so how, to open the terminal, and say i wanted to use mpeg2enc, to encode, how could i run it and then look at what my options are so i'd know what to type out, or look at the manual?? or how does one figure out what to type in to get 720x480 4:3, ntsc, interlaced, etc... any good sites to check out to do some homework, or for the people who know this really well what do you reccommend for trying to learn this??

    thanks
    pants on, pants off, pants the floor.
    Quote Quote  
  2. First You must have more then mpeg2enc to encode MPEGs...Then You have to know stuff about video to know what options to set...
    And You have to install all the bin tools into Your sys in /usr/bin/...

    Then launch Terminal, type Your command and type --h or -h or -? after that...Youll get the help text...

    Also You must learn some UNIX stuff like piping to make Your shell scripts with MPEG encoding commands...
    Quote Quote  
  3. Member galactica's Avatar
    Join Date
    Jan 2003
    Location
    Under Gateway to Midwest
    Search Comp PM
    mencoder must be installed

    Code:
    Mencoder how to
    
    To install Mencoder, do the following. 
    
    Download this file: 
    
    http://heanet.dl.sourceforge.net/sourceforge/mplayerosx/stablebinaries.sit 
    
    Once is it decompressed, open the terminal and change to the folder you downloaded to.  If it goes to your desktop, it would be: 
    
    cd ~/desktop/stablebinaries 
    
    once in that directory, type: 
    
    sudo cp mencoder /usr/local/bin/ 
    
    -then- 
    
    sudo cp mencoder /usr/bin/ 
    
    You be asked for your password. 
    
    Then type: 
    
    rehash 
    
    Mencoder should be ready for ya.
    you can then do lots of stuff like

    mencoder -oac pcm -ovc lavc /path/to/input.mpg -o /path/to/output.avi

    Alternatively, you can change the 'pcm' tag to 'mp3lame' to encode the audio to mp3 as opposed to PCM. This will give you a much smaller file, but the conversion will take longer.

    Regardless, it will do the trick for you. The resulting .avi files should be able to be played back on any video player program, such as Quicktime, Mplayer, VLC, and our set-top Divx players.

    This info is a cummulation of lots of posts (mostly by zerosix) i made for my reference

    enjoy
    Quote Quote  
  4. Member
    Join Date
    Nov 2003
    Location
    New New York, Year 3000
    Search Comp PM
    Originally Posted by galactica
    mencoder must be installed

    Code:
    Mencoder how to
    
    To install Mencoder, do the following. 
    
    Download this file: 
    
    http://heanet.dl.sourceforge.net/sourceforge/mplayerosx/stablebinaries.sit 
    
    Once is it decompressed, open the terminal and change to the folder you downloaded to.  If it goes to your desktop, it would be: 
    
    cd ~/desktop/stablebinaries 
    
    once in that directory, type: 
    
    sudo cp mencoder /usr/local/bin/ 
    
    -then- 
    
    sudo cp mencoder /usr/bin/ 
    
    You be asked for your password. 
    
    Then type: 
    
    rehash 
    
    Mencoder should be ready for ya.
    you can then do lots of stuff like

    mencoder -oac pcm -ovc lavc /path/to/input.mpg -o /path/to/output.avi

    Alternatively, you can change the 'pcm' tag to 'mp3lame' to encode the audio to mp3 as opposed to PCM. This will give you a much smaller file, but the conversion will take longer.

    Regardless, it will do the trick for you. The resulting .avi files should be able to be played back on any video player program, such as Quicktime, Mplayer, VLC, and our set-top Divx players.

    This info is a cummulation of lots of posts (mostly by zerosix) i made for my reference

    enjoy
    As far as I can tell, 'rehash' doesn't work as such in Panther, and I fail to have a libvorbis file needed to run mencoder. Just a heads up.
    If it isn't broken, take it apart and find out why.
    blog: deadsierra
    Quote Quote  
  5. Member galactica's Avatar
    Join Date
    Jan 2003
    Location
    Under Gateway to Midwest
    Search Comp PM
    interesting
    i re-ran this method when updating to 10.3 because i put it on a 2nd hd (meaning that all this stuff had to be reinstalled)

    it worked for me using the above method
    ah well, worth a try at least
    Quote Quote  
  6. Member
    Join Date
    Jul 2001
    Location
    usa
    Search Comp PM
    soi have mpeg2enc installed, so then how do i get to the help menu?

    i launch the terminal, then to run/launch mpeg2enc, what do i do? then once that's up do i go -h or --h?
    pants on, pants off, pants the floor.
    Quote Quote  
  7. Member
    Join Date
    Nov 2003
    Location
    New New York, Year 3000
    Search Comp PM
    Originally Posted by galactica
    interesting
    i re-ran this method when updating to 10.3 because i put it on a 2nd hd (meaning that all this stuff had to be reinstalled)

    it worked for me using the above method
    ah well, worth a try at least
    Really? Huh. Well, lemme try it on my other computer. Hey, are you running bash or tcsh?
    If it isn't broken, take it apart and find out why.
    blog: deadsierra
    Quote Quote  
  8. Member
    Join Date
    Sep 2002
    Location
    7th layer of hell
    Search Comp PM
    you cant just have mpeg2enc installed and try and encode material without decoding as well.. these kind of processes arent for the meek (no offense) but they involve piping from one program to another, mpeg2enc is part of a suite of programs called the mjpeg tools, mpeg2desc, mpeg2dec, yuvtoy4m, ppmtoy4m, yuvdenoise, yuvscaler etc.... and the very least you need to run mpeg2dec and pipe to mpeg2enc..... in addition there are ALOT of commands you need to type into each to get your standard encoding working, and that is just in mpeg2enc and mpeg2dec, if you want to scale (which i assume you do) then you need to put commands into yuvscaler as well.... is there anything in particular you are trying to achieve? even people who do know how to do every last bit of this by hand (such as myself) dont ever do it.. i tend to toss together shell scripts for myself to automate the process because there is wayyy to much typing involved, and its way too tedious and ONE typo yields a whole wasted process. hence why i asked what you are trying to do... piping these tools together is daunting enough for those unfarmiliar with what they are doing in the terminal, to get the desired results is even more challenging when you are new to it all.

    to get a list of commands for mpeg2enc try

    mpeg2enc -h

    in the terminal.
    Code:
    --verbose|-v num
        Level of verbosity. 0 = quiet, 1 = normal 2 = verbose/debug
    --format|-f fmt
        Set pre-defined mux format fmt.
        [0 = Generic MPEG1, 1 = standard VCD, 2 = VCD,
         3 = Generic MPEG2, 4 = standard SVCD, 5 = user SVCD,
         6 = VCD Stills sequences, 7 = SVCD Stills sequences, 8 = DVD]
    --aspect|-a num
        Set displayed image aspect ratio image (default: 2 = 4:3)
        [1 = 1:1, 2 = 4:3, 3 = 16:9, 4 = 2.21:1]
    --frame-rate|-F num
        Set playback frame rate of encoded video
        (default: frame rate of input stream)
        0 = Display frame rate code table
    --video-bitrate|-b num
        Set Bitrate of compressed video in KBit/sec
        (default: 1152 for VCD, 2500 for SVCD, 7500 for DVD)
    --nonvideo-birate|-B num
        Non-video data bitrate to assume for sequence splitting
        calculations (see also --sequence-length).
    --quantisation|-q num
        Image data quantisation factor [1..31] (1 is best quality, no default)
        When quantisation is set variable bit-rate encoding is activated and
        the --bitrate value sets an *upper-bound* video data-rate
    --output|-o pathname
        pathname of output file or fifo (REQUIRED!!!)
    --vcd-still-size|-T size
        Size in KB of VCD stills
    --interlace-mode|-I num
        Sets MPEG 2 motion estimation and encoding modes:
        0 = Progressive (non-interlaced)(Movies)
        1 = Interlaced source material (video)
    --motion-search-radius|-r num
        Motion compensation search radius [0..32] (default 16)
    --reduction-4x4|-4 num
        Reduction factor for 4x4 subsampled candidate motion estimates
        [1..4] [1 = max quality, 4 = max. speed] (default: 2)
    --reduction-2x2|-2 num
        Reduction factor for 2x2 subsampled candidate motion estimates
        [1..4] [1 = max quality, 4 = max. speed] (default: 3)
    --min-gop-size|-g num
        Minimum size Group-of-Pictures (default depends on selected format)
    --max-gop-size|-G num
        Maximum size Group-of-Pictures (default depends on selected format)
        If min-gop is less than max-gop, mpeg2enc attempts to place GOP
        boundaries to coincide with scene changes
    --closed-gop|-c
        All Group-of-Pictures are closed.  Useful for authoring multi-angle DVD
    --force-b-b-p|-P
        Preserve two B frames between I/P frames when placing GOP boundaries
    --quantisation-reduction|-Q num
        Max. quantisation reduction for highly active blocks
        [0.0 .. 5] (default: 0.0)
    --video-buffer|-V num
        Target decoders video buffer size in KB (default 46)
    --video-norm|-n n|p|s
        Tag output to suit playback in specified video norm
        (n = NTSC, p = PAL, s = SECAM) (default: PAL)
    --sequence-length|-S num
        Place a sequence boundary in the video stream so they occur every
        num Mbytes once the video is multiplexed with audio etc.
        N.b. --non-video-bitrate is used to the bitrate of the other
        data that will be multiplexed with this video stream
    --3-2-pulldown|-p
        Generate header flags for 3-2 pull down of 24fps movie material
    --intra_dc_prec|-D [8..10]
        Set number of bits precision for DC (base colour) of blocks in MPEG-2
    --reduce-hf|-N num
        [0.0..2.0] Reduce hf resolution (increase quantization) by num (default: 0.0)
    --keep-hf|-H
        Maximise high-frequency resolution - useful for high quality sources
        and/or high bit-rates)
    --sequence-header-every-gop|-s
        Include a sequence header every GOP if the selected format doesn't
        do so by default.
    --no-dummy-svcd-SOF|-d
        Do not generate dummy SVCD scan-data for the ISO CD image
        generator "vcdimager" to fill in.
    --playback-field-order|-z b|t
        Force setting of playback field order to bottom or top first
    --multi-thread|-M num
        Activate multi-threading to optimise throughput on a system with num CPU's
        [0..32], 0=no multithreading, (default: 1)
    --correct-svcd-hds|-C
        Force SVCD horizontal_display_size to be 480 - standards say 540 or 720
        But many DVD/SVCD players screw up with these values.
    --no-altscan-mpeg2
        Force MPEG2 *not* to use alternate block scanning.  This may allow some
        buggy players to play SVCD streams
    --no-constraints
        Deactivate the constraints for maximum video resolution and sample rate.
        Could expose bugs in the software at very high resolutions!
    --custom-quant-matrices|-K kvcd|tmpgenc|default|hi-res|file=inputfile|help
        Request custom or userspecified (from a file) quantization matrices
    --help|-?
        Print this lot out!
    thas what u will get..
    As below, so above and beyond, I imagine
    drawn outside the lines of reason.
    Push the envelope. Watch it bend.

    Over thinking, over analyzing separates the body from the mind. Withering my intuition leaving all these opportunities behind.
    Quote Quote  
  9. Agreed with bilestyle...

    Also there is no "rehash" in bash...Switch to tcsh...Bash is set as defoult on Panther..
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!