GUIDE for VIDEO_TS to DIVX - using ffmpegx

Discussion in 'Video problems with Mac' started by thelox714, Aug 16, 2005.

Thread Status:
Not open for further replies.
  1. thelox714

    thelox714 Regular member

    Joined:
    Apr 16, 2005
    Messages:
    1,220
    Likes Received:
    0
    Trophy Points:
    46
    got this together from the ffmpegx site

    http://homepage.mac.com/major4/videots_divx.html

    This guide provides a step-by-step process to encode a non -encrypted VIDEO_TS folder into a DivX 4/5-compatible .AVI file. To comply with applicable laws, ffmpegX can't read a DVD encrypted disk device.

    Selecting the source movie:

    Let's assume that you have created your own DVD with Apple DVD Studio Pro or Sizzle. Now you want to encode this DVD into a DivX4/5-compatible .AVI file.
    First locate the source movie in your hard disk. A VIDEO_TS folder contains the full movie structure with all audio tracks and subtitles. This will give access to more options than if you were encoding a VOB file.

    [image]http://i15.photobucket.com/albums/a378/thelox714/1-videots.jpg[/image]

    Select the VIDEO_TS folder from your hard disk in the Open field. You may use the Open.. button, or drag and drop the VIDEO_TS folder over the application icon. You may experiment a short delay while the movie is scanned for a check.

    [image]http://i15.photobucket.com/albums/a378/thelox714/2-open_ts.jpg[/image]

    After the movie autoscan, the information line above the Open.. field will be updated, and image size and framerate will be automatically set to match the input movie.

    [image]http://i15.photobucket.com/albums/a378/thelox714/3-save_ts_2.jpg[/image]

    A default "Save as..." name is set by ffmpegX. If you want to change it, edit the Save as.. field or click the "Save as.." button to choose a location and name for the output movie. If you don't add the file extension, ffmpegX will add it automatically at encoding time.

    [image]http://i15.photobucket.com/albums/a378/thelox714/4-preset_av.jpg[/image]

    Click on the "Quick presets" pulldown menu and choose DivX (libavc, mencoder). The codec used by this preset is "libavc" which is one of the best existing mpeg-4 codecs in terms of image quality.

    Cropping:

    In the "Video" tab, set "Autosize" to the movie aspect ratio. Normally this is 2.35:1 for a feature movie, 16:9 for widescreen video and 4:3 for standard video.

    [image]http://i15.photobucket.com/albums/a378/thelox714/5-imsize_ts.jpg[/image]

    Go to the "Filters" tab and click "Autocrop" to automatically calculate crop values in order to cut away black bars from the source. This button also sets the default image size. The Autocrop analysis is done at the "Start from: 00:30 min:sec" point to avoid to analyze black images at the beginning. You may need to change this checkpoint if it contains black images.

    [image]http://i15.photobucket.com/albums/a378/thelox714/6-autocrop_ts.jpg[/image]

    Autocrop will also launch a preview movie to show the crop area. You may also click "Preview" to preview the crop area again after changing manually the crop values. The crop area will show as a white hairline rectangle. Press the RETURN key to stop previewing.

    [image]http://i15.photobucket.com/albums/a378/thelox714/7-preview_ts.jpg[/image]

    Setting image size and bitrate

    We're now going to use the calculator to set the video bitrate. First enter the duration of your source movie and define the media where you're going to store the resulting movie. For example, 1 CD of 80 min mode-1 (always choose mode-1 or data-cd for .avi files).
    Click the "Auto" button. It will calculate both video bitrate and image size for optimal image quality.

    [image]http://i15.photobucket.com/albums/a378/thelox714/8-calc_ts.jpg[/image]

    In this example, we set a movie duration of 91 minutes and ask to fit the resulting .avi file in one 80 min CDR (700MB). After clicking "Auto", the calculator has set a 933 kbit/s bitrate and an image size of 624x256.
    Don't try to fit too much minutes in a small CD size, or the opposite, few minutes in a big size, and note the following:
    if the resulting horizontal image size is lower than 480 you will obtain less than SVCD quality, and if it is lower than 240 you will obtain less than VCD quality, so in such cases you should consider to increase the media size (eg use two CDs instead of a single one).
    you should never encode by using an image size greater than the source image size.
    Please understand that the bitrate calculator only gives a forecast, and pretty much like weather forecasts, it can be wrong. This is because the encoder will react differently to simple scenes (ie talking heads) and to complex scenes (ie detailed images in high motion) and depending from the quantizer settings, this variation in the content may lead to variations in the bitrate. The calculator takes into account the audio and its bitrate.

    [image]http://i15.photobucket.com/albums/a378/thelox714/10-tac_ts.jpg[/image]
    Select title/chapter/angle to be encoded as you require. Use the "play" button to check.

    Setting the audio track

    Go to the Audio tab to select audio options.
    Audio codec is normally MP3. If you prefer to keep the source AC3 track, select AC3 (in that case, the source AC3 will be copied 'as is' without any re-encoding, so make sure to set 448 as audio bitrate when using the bitrate calculator).
    Select the audio track from the audio track popup menu. (When selecting a VIDEO_TS folder with the Open.. button, it is scanned for available audio tracks and they are displayed in the Audio track popup menu, including details on the file format (mpeg1 or AC3) and the language).

    [image]http://i15.photobucket.com/albums/a378/thelox714/11-audiotrack.jpg[/image]
    After selecting the audio track, you can use "Play" to check if you hear the good track.

    Subtitles:

    If you don't want to extract a subtitles stream from the source, you can skip this step and proceed to the next step.
    Go to the "Filters" tab.
    Select the subtitle track from the subtitles popup menu. (When selecting a VIDEO_TS folder with the Open.. button, it is scanned for available subtitles and they are displayed in the Subtitles popup menu, including details on the language).

    [image]http://i15.photobucket.com/albums/a378/thelox714/12-suben.jpg[/image]

    After selecting the subtitle track, you can use "Preview" to preview the subtitles.

    Set [image]http://i15.photobucket.com/albums/a378/thelox714/13-exidx.jpg[/image] which will extract the subtitles to a VobSub file (this will let you playback the DivX movie with subtitles).

    Setting custom encoding options:

    If you want high quality, turn on some of the advanced options in the Options tab. As a general rule, the more option you use, the slower the encoding and the better the quality. You can use "5 sec test clip" and "Print PSNR" to compare encoding speed and signal/noise quality to help you choose the best quality/speed settings. Popular settings to increase quality are "High quality", "Trellis quantization", Scaling method = "Bilinear" and ME Function = "SSE". Adding "B-frames" will optimize filesize as B-frames take less space. The "Quarter Pixel ME" also increases quality but some hardware DivX players don't support it.
    If you don't mind the extra time, decide if you want to use 2-pass or 3-pass encoding in the Options tab. 2-pass will optimize quality, 3-pass will optimize bitrate control to fit in given number of CDs. In 3-pass mode, the first pass will run with a spinning progress indicator for about one hour before releasing control to the Progress window.
    When you found the best options for your movie, use "SAVE PRESET" in the File menu. It will store your encoding options in a file template that you can load again later to restore the same options (by using the "LOAD PRESET" option, or by drag-dropping the preset file over the ffmpegX icon).

    [image]http://i15.photobucket.com/albums/a378/thelox714/14-savepresets.jpg[/image]

    Encoding:

    Click the "Encode" button.
    Encoding takes places in ffmpegX Progress window.

    [image]http://i15.photobucket.com/albums/a378/thelox714/15-progress2_ts.jpg[/image]

    You can continue working with other applications while encoding. OSX Unix core reallocates processor ressources in realtime as needed.


    ok.. i know its wrong for me not to test this before posting.. but i promise to asap and post comments.

     
    Last edited: Aug 16, 2005
Thread Status:
Not open for further replies.

Share This Page