Re: Utilities to Work with various Wrapper Formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Kevin,

On Mon, 2002-03-18 at 00:04, Kevin Atkinson wrote:
> I am interested in being able to extract the audio and 
> video streams, manipulate various meta tags, and be able to combine the 
> streams.  I would really like to able to convert from one wrapper format 
> to another in a single step.
> 
> I am primary interested in utilities to work with the following formats:
> 
>   Mpeg 1/2 System streams
>   Avi
>   Qt/mov
>   
> Thanks in advance.

"Best" is very subjective, so I can't help you there since anyone will
say something else. The mjpegtools are pretty well able to handle all
three mentioned muxer formats. They support Quicktime/MJPEG, AVI/MJPEG,
AVI/DV, AVI/raw, AVI/divx (avifile-compatible AVIs) and MPEG-1/2. We
have decoders and encoders (except AVI/raw and AVI/DV) for each of them.

You can't always do "single-step" conversions, but if you use FIFOs, it
doesn't require intermediate files. Example for divx to MPEG:

mkfifo /tmp/audio.raw /tmp/video.raw /tmp/audio.mpg /tmp/video.mpg
divxdec -W /tmp/audio.raw -Y /tmp/video.raw movie.divx.avi & \
  mp2enc -o /tmp/audio.mpg [other options] < /tmp/audio.raw & \
  mpeg2enc -o /tmp/video.mpg [other options] < /tmp/video.raw & \
  mplex -o movie.mpg /tmp/video.mpg /tmp/audio.mpg
rm -f /tmp/audio.raw /tmp/video.raw /tmp/audio.mpg /tmp/video.mpg

with [other options], you can enhance quality or other things, see the
manpages for more specific info. You can also use filters (scaler,
denoiser, 3:2 pulldown convertor, ...) before the encoder, in that case
you use:

divxdec -W /tmp/audio.raw -Y /tmp/video.raw movie.divx.avi & \
  mp2enc -o /tmp/audio.mpg [other options] < /tmp/audio.raw & \
  yuvdenoise < /tmp/video.raw | \
  yuvscaler -O VCD | \
  mpeg2enc -o /tmp/video.mpg [other options] & \
  mplex -o movie.mpg /tmp/video.mpg /tmp/audio.mpg

which denoises and scales to VCD compliant size. (Don't forget to set
[other options] to VCD-compliant option as well, see the general
mjpegtools man page, a.k.a. the mjpeg howto).

There's much more possibilities by using another decoder (divxdec for
divx, mpeg2dec for mpeg, lav2yuv for AVI/Quicktime (MJPEG/DV/raw)),
another encoder (yuv2divx for divx, yuv2lav for quicktime/AVI (MJPEG)),
etc.

Hope this helps a bit.

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
-  // \\   | Running: Linux 2.4.18-XFS and OpenBSD 3.0
- /(   )\  | http://ronald.bitfreak.net/
-  ^^-^^





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux