Magyar   English

dmencoder help

last modification:

  1. About dmencoder
    1. What this stuff is
    2. Purpose of dmencoder
    3. Requirements
    4. Availability

  2. Usage
    1. General
    2. Knowing the movie
    3. Size
    4. Audio
    5. Cut
    6. Video
    7. Filters
    8. Libavcodec features
    9. Equalizer
    10. Frames
    11. Files
    12. Mplayer version
    13. 1 and 2 pass modes
    14. Shutdown
    15. What this torture was for

  3. Troubleshooting
  4. Plans

  1. About dmencoder
    1. What this stuff is
    2. dmencoder is an HTML frontend for the well-known movie encoder mencoder, what is part of the mplayer package. It's not really and individual audio/video processing software, but only an interface what uses mencoder for movie encoding/cutting.

    3. Purpose of dmencoder
    4. dmencoder has 3 main goals:

    5. Requirements
    6. Required:

      You will need a JavaScript capable HMTL browser and, if you want to run the script (and I suppose so!) a machine running Linux and installed mencoder is required. dmencoder is optimized for Mozilla and tested with Mozilla, Opera and Konqueror; it doesn't really work with Links/Xlinks/Dillo because of poor (or missing :-D ) JavaScript support.

      Recommended:

      For starting the job directly from your browser you will need a http server running that can handle CGI. You must copy the content of the cgi-bin directory in this package to your server's cgi-bin directory.

      For operating with external audio file you may need sox (only if you want to use it not from the beginning of the audio data but with some offset). remark: this feature is not yet implemented

      For OGM movies you will need oggenc and ogmmerge (OGM support is not yet in this package, but will be available soon).

    7. Availability
    8. You can download dmencoder from the Hungarian Unix Portal: www.hup.hu/old/dmencoder. Other way to get it is writing me an e-mail , and I will send you it. From me you can get the latest version, but it may take a little time.

  2. Usage
    1. General
    2. Like in other softwares, dmencoder provides you fast help by yellow bubbles. Stop your mouse cursor over an element on the screen and you will get short help. You can reach this help file by clicking the Help button at the top of the page.

      There is an other button to the right: Clear all. This will set all values to the default.

    3. Knowing the movie
    4. Before you convert or cut your movie, watch it. It is necessary if you want to cut it, and will help you to choose the best encoding parameters. For example, you can see need for noise reduction or deinterlacing for a bad quality movie, or if you have a really good movie, you may want to split it to 2 CDs to preserve the best possible quality.

    5. Size
    6. After you've watched the movie, you should choose a size. Usually you will put the movie on 1 or 2 CDs. If the length is more than 90 or 100 minutes, use 2 CDs, otherwise it can fit on one. Of course if you use more space, you will get better quality. Don't write movies on 74 min CDs, always use 80 min ones. The difference is 50 Mbytes - 8 percent more space and quality!

      After you've chosen the size, type the total length of the movie in the three Movie length boxes in HH:MM:SS format and the target size in the next field (Target movie size). For one CD that should be 700 Mbytes, for two CDs it's 1400.

      Don't forget that the index will take additional space (a few MBs), so count with 690/695 MBs of space!

    7. Audio
    8. Usually the audio data is in the source movie file. Otherwise if it's in an external audio file, check External file and select that file.

      At this moment dmencoder can produce audio only in MP3 format. There are three different kind of encoding: Constant, Average and Variable bitrate.

      There is a fourth possibility, the Only copy mode. Selecting this option will cause mencoder not to process audio but to copy it from the original movie to the target. You will usually need this if you want to cut an already compressed movie.

      After choosing bitrate type and quality or bitrate, you have only one thing to do: selecting number of channels. For mono audio of course you will need mono setting, for stereo sound you should select joint-stereo.

      dmencoder will calculate the size of the audio track and write it in the Audio size box. This can help you to choose the best audio and video bitrate to fit the movie in the selected size. Encoding video bitrate is also calculated (see Video section).

      Important! When using mono sound, divide the ABR/CBR bitrate by 2. For example if you would use 128 Kbit/sec for stereo ABR audio, in the case of mono sound, change 128 to 64!

      mencoder will try to correct A/V sync, but in some cases it can cause A/V desync. To avoid this, check Maximum A/V correction box and set it to 0 seconds.

    9. Cut
    10. You can cut a range from the source movie and write it to a new file. To do this check the Range box, and enter startin/ending positions in HH:MM:SS format. When you enter Movie length, the ending position will be automatically set to end of the movie.

      In some cases mencoder cannot seek in the file because of the missing or invalid index. If this happens, mencoder needs to rebuild the index. You can force this by checking Build index box.

    11. Video
    12. After audio settings are done, dmencoder will fill the Encoding video bitrate field. This value is maybe the most important feature of the movie. This value means the amount of data used for storing a given length of video. Higher bitrate will cause larger files but better quality. You can change this value. It would be a good idea to decrease the calculated bitrate by 2 or 3 because encoding with the calculated value may cause slightly larger file than you want.

      Other very important feature is the Resolution. With lower resolutions the movie will be very ugly and you will see many blocks. Higher resolutions require higher bitrate to be nice.

      If resolution of source file is different than the target resolution, check Scaling needed box

      To help you choose the best resolution for the given bitrate Bit Per Pixel value is calculated. This means the number of bits describing one pixel in the movie. Changing the bitrate of resolution changes the BPP. Try some resolutions until you find BPP value between 0.2 and 0.24, but don't go below 480x360 or 448x336.

      FPS if the stored frames per second. Normally it's 25 in PAL movies, so rarely need to change it - and you shouldn't do it.

      You can choose Video codec from a long list, but DivX 4/5 is most recommended. Sometimes you may need DivX 3 because of compatibility reasons, for example if you plan to play the movie on an older hardware DivX player.

      A special mode is Only copy. With this setting the video won't be encoded, only copied. Together with this setting you can encode audio or copy it too - if you want only cut the movie, select Only copy for both audio and video.

      In the Movie type selection box you can select some luma/chroma presets for different movie types.

      You can change default FourCC - to do this, check the Set FOURCC to box and write the four character long descriptor in the textbox. I never used this, but sometimes it could be useful.

      Store aspect ratio in AVI header:

      This feature is useful if the original video aspect is different than the pixel width/height ratio. By checking it you can force the player to display the output file with the specified aspect ratio what can be given as a fraction or a floating point number (i.e.: 4/3 or 1.333) This feature is implemented in the OpenDML extension of AVI, so not all video player will handle it - but mplayer can, and who cares the others? :)

      Automatic aspect correction:

      libavcodec automatically calculates the necessary parameters to keep correct aspect ratio and stores it in AVI header. The drawback is that you will be able to play this file with a player that recognizes the OpenDML tag in the header - and I know no such player except mplayer :)

    13. Filters
    14. Libavcodec features
    15. By checking these options you can more or less improve video quality, but each one will slow down encoding.

    16. Frames
    17. With Keyframe interval you can set the distance between two keyframes. In dmencoder this is set in seconds. Default is 10 secs (usually 250 frames). Little distance will produce larger files and will make cutting harder (you can cut at keyframes), but will slightly improve quality.

      If Don't skip frames box is checked, mencoder will not skip any frame.

    18. Equalizer
    19. Files
    20. The video file can be done from several sources. For example, you can use any file that will be converted or you can directly record from TV-tuner.

      The final step is selecting Source and Target file. None of them is required, but if no source file is specified, you have to write it manually in the script otherwise it won't work. If target file is missing, dmencoder will write the encoded file to ~/dmencoder_out.avi

      If First pass to /dev/null box is checked, the output of first pass will be redirected to /dev/null instead of writing to a file. This will make encoding a little faster because mencoder won't have to write hundreds of MBs to the HDD. Of course you won't be able to check the output under the first pass.

      When running the script through CGI, don't specify any PATH before the target filename; the movie will be placed in your cgi-bin directory (will be fixed soon)

    21. Mplayer version
    22. The syntax of some options has changed in the CVS version of mplayer. One of these options is the '-vop' switch what is now '-vf'. To use the right syntax, select version of your mplayer.

    23. 1 and 2 pass modes
    24. You should always set 2 pass mode, unless you have really little time, or you don't care about quality.

    25. Shutdown
    26. If you want your machine to shutdown after encoding, check Shutdown after encoding box. To use the shutdown command you usually need to have root rights!

    27. What this torture was for
    28. Finally, press the Generate script button. In the box below you will find the script that does the job. There are several ways to use it. At first select all text in the box, and then:

  3. Troubleshooting
  4. dmencoder is under hard development, so there may be bugs in it (but I hope you won't find any). But if something doesn't work, don't be sure it's my fault.

  5. Plans
  6. plans: movie from picture files, DivX native codec support, OGM support, cut multiple segments, merge files, preview and finally rewrite dmencoder in C :)