[icon]

Jensemann's Homepage - [MPEG]
  Home    News    Download    Yamakawa    MPEG    SVCD    MP3    Links    Contact    My DVD's   

MPEG


Intro

Comparison Of Some Good Encoders

Encoder Pro's + Con's

Setup the Encoder:: TMPGEnc

SVCD Sector Size and Video File Size

Something went wrong..

  Intro [top] 

The following tips and tricks will help you in creating a MPEG-video out of your source video.

 
  Comparison Of Some Good Encoders [top] 

There are several encoders available to encode MPEG video's, but most of them will either produce an insufficient video quality (independent from the amount of money they cost) or will not create SVCD-compilant MPEG-streams.

Take a look at http://www.tecoltd.com/enctest/enctest.htm - Teco Ltd. has tested several encoders. The result is more or less clear: Cinemacraft SP and TMPGEnc from written by Hiroyuki Hori are the winners, this two encoders will produce the best video quality for our needs (in the moment). Now the question is what encoder to prefer, but obviously this decision ist easy: The Cinemacraft encoder is lightning fast, but the price is by far to high ($4000 i guess) plus the audio quality is unexeptable. The TMPGEnc encoder is freeware and the developer tries to improve the quality of the product.

There is another free MPEG-encoder called bbmpeg from by Brent Beyeler. Teco rated it as 3rd choice, so you may like to test the software, too. It's more or less the same speed like TMPGEnc. For SVCD-compilant multiplexing and "fixing" this tool is probably the reference, and also very helpful if you have to fix stream errors: SVCD specification requires that every intra frame in the video stream is accompanied by a special block called "User Data". This block apparently contains scan and closed caption information. Missing or empty "User Data" blocks will probably at least affect the seek capability of the player. Moreover, an SVCD disc that does not contain "User Data" blocks is probably invalid from the standard's viewpoint. Great, isn't it ? Well, to fix this nasty problem you can go tho the bbmpeg page and search for the svcdfix tool which will do the work for you. Of course the bbmpeg encoder will do it's work right so it is only required if you use other encoders that don't take scan and closed caption blocks into account. If you use TMPGEnc the encoder output is valid, too.

 
  Encoder Pro's + Con's [top] 

 
Encoder Pro Contra
TMPGEnc
Freeware, good picture quality,
read Avisynth (avs) and VirtualDub (vdr) scripts, can open MPEG2-streams, much settings to finetune results, good profiles,
create SVCD compilant streams, basic MPEG operations included (cut / join / (de)multiplex /..), build-in filters
encoder speed
Cinemacraft
fastest encoder available with good output quality encoded audio quality is week has problems with interlaced video, has problems reading avs-scripts, no possibility to change frame size, too expensive
bbmpeg
very much options to finetune results, probably the best multiplexer for SVCD UI is more for advanced users, encoder speed

 

  Setup the Encoder: TMPGEnc [top] 

The following steps will show you how to create a SVCD using TMPGEnc. After starting the application simply load your avi as the video and audio encoding source by pressing the Browse button for the video stream.

Note: The software origin is japan; if you don't understand japanese you will need to apply a resource patch to the application. Links are located on the same page where i mentioned the encoder itself can be found.

An important thing to know is that you need to reload the settings file whenever you have reloaded the source video; so after opening the avi video you choose the "Load" button to choose the SVCD profile. Isn't it easy ? Just a few parameters are waiting now to be set (once) before we can run the encoding process.

First, press the "Configure" button. The MPEG configuration propertysheet will pop up. If you have loaded a predefined profile than most of the parameters are grayed. Whenever you feel you need to modify a parameter follow this steps to make them customizeable: Open the profile (xyz.mcf) in an texteditor (they can be found in the template folder):

You will find something similar to this:
______________________________________________

MPEG.Video.RateControlMode_ReadOnly = True
MPEG.Video.MaxBitRate = 2520000
MPEG.Video.MaxBitRate_ReadOnly = True
MPEG.Video.CBR_BitRate = 2520000
______________________________________________

The trick is now to change the xx_ReadOnly parameter from True to False to be able to change the settings in the UI ! Note: Be careful what you change, leave the settings to read-only unless you have a good reason to change them or know what will happen.

One of the big advantages of an SVCD is that it can handle videos encoded with variable bitrate (vbr encoding). Vbr means that the encoder will adapt the used bitrate to the content of the video. The big disadvantage is that the filesize depends on the source movie content ! So if you have a scene where nothing moves this is great for the encoder and he will need a very small bitrate to encoder this video; but if you have a scene where a complex picture is shown and this picture changes fast (explosion, fast cuts..) the encoder need much higher bitrates to encoder in a good quality. Try to encode 5 minutes of a sitcom and than 5 minutes of heavy fighting scene and you will see. A tool that is very helpful here is the Bitrate Viewer from Teco, because it will show you the max, min, average bitrate, quantisation level and more. You can verify if the maximum bitrate is below the specified upper limit of an SVCD (video + audio < 2.6 MBits).

 

Our goal was to create SVCD to be playable in a home DVD player; and a movie is maybe about 2h long. So what I found out after several tests is the following profile to create a MPEG-2 SVCD movie that fit on 2 CD-R's (650 MB):

- use CQ_VBR
- max. bitrate should be <= 1.9MBits
- choose 60-63 for quality
- audio bitrate at 128 kbits


A quality setting of 60 will allow you to store up to 1h of video on the CD-R; with 65 you will be able to save about 45 minutes. Keep in mind that if you use vbr encoding you can only guesstimate the final size of the movie file since the movie size is depending on the number of high motion scenes! If the movie is longer than 2h you should use 80min-Cd-R's and may be go for three 650 MB CD-R (in this case you could increase the quality, too).

I have uploaded the configuration I use for my PAL SVCD's (video @ 1850 MBits CQ_VBR, audio @ 128 kbits, quality 63). You need check if your source is interlaced or not (see filters section) and set the right parameter for "Video Format" (main UI) and "Configure" / "Video Format". Download the file here. Motion Search at very high quality is also very slow; I couldn't detect a big image quality increase from high to very high so try it on your own; I would recommed high as a good compromise (unless time doesn't matter).

What about the encoding time now ? This is what i get on my machine (Celeron 566@850 MHz, 256 MB RAM) for a 2h - movie:

- about 09h30 for a 2h movie with high search precision
- 14 up to 15h for a 2h movie with very high search precision
- 33h for a 2h movie with very high search precision and build-in noise reduction enabled

If your source video needs to be cutted (because of comercials / unnecessary parts) I recommend to encode the complete video first and cut the MPEG-2 video afterwards; but If the video is ready and you only need to encode it I would use the TMPGEnc batch feature to create the 2 (or 3) parts of the movie so you do not need to cut the movie afterwards. Press the "Configure" button again and doubleclick the source frame range under "Advanced" page; select the right range and close the configure dialog. Choose a name for the first part under "Output File"and select "File" / "Save Project" to store the project for the first CD. Change the name of the output file and the source frame range again and save the new project and so on till you are finished.

 
  SVCD Sector Size and Video File Size [top] 


A normal data CD saves 2048 bytes of data per sector, the rest is used for the error correction. A video CD has no error correction, so a larger number of sectors will fit on the CD:

80 [min] * 60 [s/min] * 75 [sektor/s] * 2324 [byte/sektor]

 

Data CD: CD-R with 330.000 sectors * 2048 bytes/sector = 675.840.000 bytes = 644.5 MB
Video CD: CD-R with 330.000 sectors * 2324 bytes/sector = 766.920.000 bytes = 731.4 MB

Data CD: CD-R with 360.000 sectors * 2048 bytes/sector = 737.280.000 bytes = 703.1 MB
Video CD: CD-R with 360.000 sectors * 2324 bytes/sector = 836.640.000 bytes = 797.9 MB

Of course all CD-R's have a few MB more to spend plus you can overburn them; use the CDRIdentifier to find out how much your CD-R can hold. As you have seen, the limits to stay below are 740 MB for a 650MB CD-R and 807 MB for a 700MB CD-R. If you overburn your CD's than select disk at once.

 
  Something went wrong.. [top] 

Joeg reported a strange thing to me a few days ago... he tried to creat a video with into music where the video fades in from black to something different. The problem was that the encoded video sounds jerky, with dropout. This happend on the PC and also on the standalone DVD player. The funny thing was that a day later I encoded some video where the same happens to me. A few black seconds with background music playing.

What I finally found out is that the player runs into problems if the bitrate get too low ! In my case it was almost zero because a black sceen is a nice thing to compress. So if you experience problems similar to this description than try to raise the bitrate / define a minimum bitrate (maybe 1000 kBit/s).

 

If you own a Yamaha burner you may like to take a closer look what happens to mine:

The Yamaha 4416S Story

LION.cc