Compression to mpeg2 (DVD release)
last update 20070225
Rendering average quality mpeg2 files with Cinelerra
Rendering high quality mpeg2 files with Cinelerra
Favourite mpeg2enc settings in a nutshell
Multiplex video & audio together - mplex
Rendering high quality mpeg2 files with Cinelerra
Favourite mpeg2enc settings in a nutshell
Multiplex video & audio together - mplex
Introduction
- this is NOT a tutorial but a collection of favourite settings (flags / options) used when encoding (compressing) a video file.
- to find out more about the use of a piece of software and its options check man pages or respective web-sites:
-
www.heroinewarrior.com - Cinelerra's official page
cvs.cinelerra.org - Cinelerra community
www.transcoding.org - transcode
www.linux-tutorial.info - mpeg2enc
Rendering average quality mpeg2 files with Cinelerra
- use approximately 2100Kbps video bitrate if film_26min.mpg has to fit on a cdr, possibly less if planning a mini-DVD (i.e. a dvd structure burnt onto a cdr for playback in a standalone dvd player)
- file format: yuv4mpeg stream
- use pipe:
- on contrast-less footage you may need instead:
yuvcorrect -T INTERLACED_BOTTOM_FIRST | \ y4munsharp -L 2.0,0.3,0 | \ yuvmedianfilter -r 6 -R 4 -T 0 -t 0 | \ mpeg2enc -v 0 -4 1 -2 1 -N 1.5 -g 15 -G 18 -r 32 -D 10 \ -b 1500 -H -E 8 -R 2 -f 8 -o %
y4munsharp -L 5.0,0.5,0
Rendering high quality mpeg2 files with Cinelerra
- file format: yuv4mpeg stream
- use pipe:
yuvcorrect -T INTERLACED_BOTTOM_FIRST | \ y4munsharp -L 2.0,0.3,0 | \ yuvmedianfilter -r 6 -R 4 -T 0 -t 0 | \ mpeg2enc -v 0 -4 1 -2 1 -N 1 -g 15 -G 22 -r 32 -D 10 \ -b 9200 -H -E 4 -R 2 -f 8 -o %
Favourite mpeg2enc settings in a nutshell
- from average to optimum quality where [#/#] means range
-g 6 -G 18 -N 1.5 -E 8 -D 9 -b 1500 -g [9/12] -G [18/20] -N 1.5 -E 8 -b 7500 -g 15 -G [21/23] -N 1 -E 4 -b 9200
Multiplex video & audio together - mplex
- files rendered by Cinelerra:
- using mplex
- check terminal output for the following
- run mplayer from a terminal & check mpg2 compliance
film.m2v film.mpa
mplex -f 8 -V -h -o film.mpg film.m2v film.mpa
(...) INFO: [mplex] MUX STATUS: no under-runs detected. (...)
mplayer film.mpg (...) MPEG-PS file format detected. VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 9200.0 kbps (1150.0 kbyte/s) ========================================================================== Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 48000 Hz, 2 ch, s16le, 256.0 kbit/16.67% (ratio: 32000->192000) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3) (...)