Difference between revisions of "Clean"

From LinuxTVWiki
Jump to: navigation, search
(Minor corrections, removal of quotation - better in the MPlayer article really, removed ProjectX and vdrsync sections as they don't contain any useful tutorial information (in my opinion))
m (Removed big gap between MEncoder and ProjectX)
Line 13: Line 13:
  
 
   $ mencoder -forceidx -lavdopts er=4 -vc ffmpeg12 -of mpeg -oac copy -ovc copy -aid 600 -vid 601 original_ts.mpeg -o cleaned_ps.mpeg
 
   $ mencoder -forceidx -lavdopts er=4 -vc ffmpeg12 -of mpeg -oac copy -ovc copy -aid 600 -vid 601 original_ts.mpeg -o cleaned_ps.mpeg
 
  
 
=== ProjectX ===
 
=== ProjectX ===
 
It is possible to clean up a stream using the GUI (and console) features of [[ProjectX]].
 
It is possible to clean up a stream using the GUI (and console) features of [[ProjectX]].

Revision as of 11:21, 22 April 2007

Cleaning a stream means to remove errors from it.

Usually the MPEG stream that you received over an aerial contains some errors as the reception is not always perfect. Such slightly damaged streams might crash your video editing software if you want to edit it after (although players like MPlayer and gxine are quite tolerant). Therefore, cleaning is mostly interesting if you want to post-process/recode your recording.

MEncoder

A good way of cleaning up a corrupted stream is to run it through MEncoder. The following will clean up the structure of a program stream:

 $ mencoder -forceidx -lavdopts er=4 -vc ffmpeg12 -of mpeg -oac copy -ovc copy original_ps.mpeg -o cleaned_ps.mpeg

This forces MEncoder to read the file as an MPEG2 stream and uses aggressive error detection and correction, but otherwise just copies the audio and video stream (so no re-encoding and it's quite fast).

You can also use this method to extract specific PIDs from a transport stream and produce a clean program stream, by using the -aid and -vid options to MEncoder to select the audio and video PIDs repectively:

 $ mencoder -forceidx -lavdopts er=4 -vc ffmpeg12 -of mpeg -oac copy -ovc copy -aid 600 -vid 601 original_ts.mpeg -o cleaned_ps.mpeg

ProjectX

It is possible to clean up a stream using the GUI (and console) features of ProjectX.