⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpeg2enc.1

📁 Motion JPEG编解码器源代码
💻 1
📖 第 1 页 / 共 2 页
字号:
DVD player application) you should NOT turn on dualprime-mpeg2!  Surprisingly at least one hardware/set-top player is known to be allergic to DPME being used..PP.BR -z|--playback-field-order \ b|t.PPThis flag overrides the field-order specified in the interlacing tag ofthe input stream header. (If you need this option, it indicates a problemin the capturing/encoding process where the temporal order of the twofields in each frame has been mislabeled. The effect of this is weird"juddering" when playing back the stream on a TV. Check the mjpeg-howtofor more information about interlacing problems.).PP.SH "OPTION LETTERS CONTROLLING VIDEO PARAMETERS".PP.BR -n|--video-norm \ n|p|s.PPForce the input stream to be treated as NTSC|PAL|SECAM regardless ofwhat the stream header might suggest.  Basically this just sets thedefaults for a bunch of other options..PP.BR -F|--frame-rate \ num.PPSet the frame-rate of the output-stream. By default, this value isinferred from the input header. Currently only the standardMPEG rates are supported.  Eventually more-or-less arbitrary rateswill be possible..br 0 - illegal.br 1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM).br 2 - 24.0 (NATIVE FILM).br 3 - 25.0 (PAL/SECAM VIDEO / converted FILM).br 4 - 30000.0/1001.0 (NTSC VIDEO).br 5 - 30.0.br 6 - 50.0 (PAL FIELD RATE).br 7 - 60000.0/1001.0 (NTSC FIELD RATE).br 8 - 60.0.br.PP.BR -a|--aspect \ num.PPSet the playback aspect ratio code of the encoded video. By default, this value is inferred from the input header..br 1 - 1  - 1:1 display.br 2 - 2  - 4:3 display.br 3 - 3  - 16:9 display.br 4 - 4  - 2.21:1 display.IPFor MPEG-2 the specified aspect ratios are used directly. For MPEG-1mpeg2enc infers the MPEG-1 pixel aspect code from the video normspecified and the specified playback aspect ratio..PP.BR -p|--3-2-pulldown.PPSetting -p only makes sense for 24frame/sec Movie source material.  It setsflags in the output stream that tell the decoder to play the movie asNTSC 60field/sec video using "3:2 pulldown".  This is vastly moreefficient than encoding as 60field/sec video.  The classic applicationis to transcode a PAL-encoded movie (24fps played too fast at 25 fps!)into NTSC (see the -f flag)..SH "OPTION LETTERS FOR CONTROLLING COMPRESSION AND SPEED".PP.BR -M|--multi-thread \ num_CPU.PPMPEG encoding is a task that can be split over a small number of CPU'squite efficiently.  Mpeg2enc can be internally set to split majorprocessing tasks between a number of concurrent threads.   This flagadjusts the multi-threading to the optimum to utilise the specifiednumber of CPU's..PPIt should be noted that even with 1 CPU present \fIsome\fRmulti-threading is performed: frame input takes place in parallel withencoding.  The default -M value is 1.  This allows good performance to be achieved when when aseperate machine is being used for pre-processing (decoding fromMJPEG, scaling, denoising etc) with the final result pipe to mpeg2enc(e.g. using rsh or ssh)..PPSetting -M 0 disables all multithreading.  This is sometimes usefulfor debugging or to achieve maximum CPU efficiency on a sharedmachine. Setting -M 3 on a dual-CPU machine will produce slightlyfaster results than -M 2 at the price of slightly less CPU efficiency.This is useful if nothing else needs to be done on the encodingmachine.  In practice there is little point setting -M greater than 4even if the CPU's are available due to the fairly coarse-grainedparallelism used.  Indeed there is a hardcoded limit of 4 worker threads..PPThe default has been changed to be 0 instead of 1 to avoid the crash atend of encoding:.nfINFO: [mpeg2enc] Signaling last frame = 499mpeg2enc: seqencoder.cc:433: void SeqEncoder::EncodeStream(): Assertion `pass1coded.size() == 0' failed.Abort.fi.PP.BR -q|--quantization \ 1 .. 31.PPMinimum quantization of the output stream.  Quantisation controls theprecision with which image information is encoded.  The lower thenumber the higher the quality but the greater the required data-rate.\fBNOTE:\fP on IA32 systems it is possible to cause artifacting by settingthe value too low (3 or less) due to arithmetic overflow/truncation in theDCT/iDCT routines.If this option is set a .I variable bitrate stream is produced.  This is more efficientbut variable bitrate MPEG-1 cannot be played by some hardwaredecoders and is rejected by some DVD authoring packages.  If you intend to use a software decoder you'd be insane not to use variable bitrate..spIf this option is set without a maximum bitrate being specified thenquantization is fixed at the specified value.  It should be noted that notspecifying a bitrate is probably an error and may produce unexpected results..spFor MPEG-2 streams a default of 8 is used if \fB-q\fP is not explicitly given.To force constant bitrate streams use \fB--cbr\fP and \fB-b NOT -q\fP!.PP.BR -I|--interlace-mode \ 0|1|2.PPSet the sequence picture structure and block encoding type for MPEG-2 streams.By default, this value is inferred from the interlacing tag of the inputstream. Setting 0 encodes frame-by-frame with support for interlaced videoturned off, and specifies that progressive chroma subsampling has been used.Setting 1 encodes frame-by-frame with interlace-adapted motion compensationand block encoding, and specifies that interlaced chroma subsampling hasbeen used. Setting 2 encodes interlaced material field-by-field, which will produce more accurate results for highly textured interlacedmaterial with lots of motion, at the expense of generally less efficiency..IPThis setting should match the interlaced-ness of the input stream, otherwisechroma artifacts may be generated when the MPEG stream is played back..PP.BR -g|--min-gop-size \ num.PP.BR -G|--max-gop-size \ num.PPThese flags set the minimum and maximum group-of-picture (GOP) sizefor the output MPEG stream.  By default both are set to 12 to suit VCDencoding.  If the two values are not identical mpeg2enc applies asimple scene-change detection procedure to try to select GOP sizesthat ensure big changes of image coincide with the fully-encodedI-frame starting a new GOP.  This can help prevent transient"blockiness".  For VCD/SVCD/DVD the largest GOP size is 15 for PAL or 18 forNTSC.  Reasonable minimum GOP sizes are 6 or 9.  A larger GOP size canhelp reduce the bitrate required for a given quality.  However, thisreally only applies to high-quality source material with little noise(e.g. digital video).  For broadcast material there is little pointsetting GOP size much beyond 21 or 24.  Even with good source materialdiminishing returns set in quite rapidly.Note: Mpeg2enc is currently hard-wired to produce 2 B frames betweeneach I/P frame unless the GOP size forces less.  This is reasonablefor medium to high bitrates (>= 1Mbps) but probably sub-optimal forlow-bitrate encoding..PP.BR -c|--closed-GOPs.PPSetting this flag causes the encoder to generate only "closed" GOPs(Groups of Pictures) that can be decoded without reference to theirpredecessor.  This is useful for streams that are supposed to be usedin multi-angle DVD's and applications where more easily edittable MPEGis required..PP.BR -P|--force-b-b-p.PPThis flag forces the GOP size selection to choose sizes that ensure 2 B frames appear between adjacent I/P frames.Several common MPEG-1 decoders can't handle streams where less than2 B-frames appear between I/P frames..PP.BR -Q|--quantization-reduction \ -4.0..5.0 .PPThis flag sets the amount quantization is reduced forblocks containing large amounts of sharp image detail.Large values produces efficient use of bits but maycause visible artifacting around detailed sections.With noisy source material this option may causea "swimming" effect on textured backgrounds as the noise cause the quantization of blocks to be boosted at random.  The default is 0.0 (off).See also the \-X option..PP.BR -X|--quant-reduction-max-var \ 0.0..2500.0.PPLuma variance below which quantization boost (-Q) is activated..PP.BR -r|--motion-search-radius \ num.PPThis flag sets the motion estimation search radius.  For mostpurposes the default (16) should be just fine.  For high-resolutionMPEG-2 and active scenes it may be worth bumping it up.  However, thiswill make encoding significantly slower.  There is little pointreducing the radius.  Speed gains are not huge and the impact on qualitycan be marked..PP.BR -4|--reduction-4x4 \ 1..4.PP.BR -2|--reduction-2x2 \ 1..4.PPThese options control how radical the encoder is in throwing awayapparently poor candidate estimates during motion estimation.  Asetting of 1 means very few blocks are discarded early which makes forslow encoding but quality as good as it gets. A setting of 4 makes forfast encoding but can impact quality.  The -4 flag controls discardingduring the initial 4*4 sub-sampled search stage, the -2 flag controlsdiscarding during the secondary 2*2 sub-sampled stage..IPThese flags are useful as the speed quality trade-off is markedlydifferent depending on which CPU you have.  On modern machines theimpact on speed is around a factor 2 on older machines a factor 3.The impact on quality is around 10% quantization (0.2 of a bit ofprecision in encoding textures).  For most purposes the defaultsettings will be fine.  However on P-III Katmai etc -4 2 -2 1 gives agood near-optimum quality setting with reasonably speed..PP.BR -N|--reduce-hf \ num.PPSetting this flag adjusts the way texture detail is quantized toreduce the precision with which of high-frequency informationencoded. This is very useful for.I mildlynoisy sources.  If you have really noisy material the filtering toolsavailable in mjpegtools are a much better bet.  The specified numbermust be in the range 0.0 to 2.0 gives the maxium quantization boost.A useful number to use would be 1.5 or 1.0..PP.BR -H|--keep-hf.PPSetting this flag makes the encoder encode as much high-frequency informationas possible.   This is a good setting for maximising quality at VCDresolution with good quality low-noise source material.  It can also helpwith "swimmy" material if you can spare the bitrate!.PP.BR -D| --intra_dc_prec \ num.PP Specifies the precision of the DC component. The default is 9. Most commercial DVDs use 10. Using 9 instead saves a few bits. Using 10 mighthelp to avoid looking larger areas of nearly the same color blocky. A value of 11 is only valid at the next MPEG-2 profile/level so it's nota currently meaningful value to use..SH "OPTION LETTERS FOR CHUNKING THE OUTPUT STREAM".PP.BR -S|--sequence-length \ num.PPThis flag allows the target size of individual sequences in the finalmultiplexed stream to be set in MBytes. If set  mpeg2enc keeps trackof how large the eventual stream is getting and inserts a sequencesplit (actually: sequence end / sequence start) into the output streameach time it reaches the specified limit.  The multiplexer \fBmplex\fP(1) canrecognise these splits and start a new multiplexed output file each timeit encounters one.   In this way it is easy to automatically ensureeach component sequence file can be burnt onto a CD-R and still beplayed as a stand-alone MPEG sequence.   For the SVCD and VCD profilesthe default target sequence length is 700M bytes. For other profiles thedefault is that sequence length is unlimited..PP.BR -B|--nonvideo-bitrate \ num.PPSince mpeg2enc can't read minds it cannot know in advance what othermaterial will be multiplexed with the output video stream.  Thus toget its calculations of where to insert split point right it needs to betold the combined data-rate of the other material that is eventually tobe multiplexed with the video.This flag allows this rate to be specified in K bits/sec.A good rule of thumb is to use the total rate of all the other streamsplus 1% of the total rate including video..PP.BR -u|--cbr.PPForce the use of Constant Bit Rate encoding.  Less than optimal (and inefficient in almost all cases)but some folks insist on it. \fBNOTE:\fP this \fBdisables\fP (overrides)the use of the \fB-q\fP option!.spIt is an error to use this option and not specify a bitrate using \fB-b\fPsince a constant bitrate of 0 makes no sense..SH "SSE, 3D-Now!, MMX"!mpeg2enc makes extensive use of these SIMD instruction set extensionon x86 family CPU's.  The routines used are determined dynamically atrun-time.  It should be noted that using SSE requires operating systemsupport.  Old 2.2.x Linux kernels (unless patched ones like RedHat) donot have this and so SSE, although physically present, won't be activated..SH "BUGS"There should be an option to force GOP sizes that permit 2 B framesbetween I/P frames.  Some decoders (even software)  can't handle the casewhere I/P frames come back to back or with only 1 B frame between them.There needs to be a facility for writing dummy user-data fields sothat the multiplexer/imager can insert forward/backward pointers whenmuxing/imaging an SVCD.Is there some kind soul out there with source-code for a good SSE(not MMX) DCT and iDCT?.SH AUTHORThis man page was written by Andrew Stevens.If you have questions, remarks, problems or you just want to contactthe developers, the main mailing list for the MJPEG-tools is:  \fImjpeg\-users@lists.sourceforge.net\fPFor more info, see our website at  \fIhttp://mjpeg.sourceforge.net.SH "SEE ALSO".BR mplex "(1), " mp2enc "(1), " lavrec "(1), " lavplay "(1), ".BR lav2yuv "(1), " lav2wav "(1), " yuvscaler "(1), " yuvdenoise "(1), " y4mdenoise "(1), " mjpegtools "(1)"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -