From: Bernhard P. <wal...@us...> - 2013-09-19 17:20:37
|
Update of /cvsroot/mjpeg/mjpeg_play/docs In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12130/docs Modified Files: mjpeg-howto.info mjpegtools.1 Log Message: Updated and extended to doku for the next release Index: mjpeg-howto.info =================================================================== RCS file: /cvsroot/mjpeg/mjpeg_play/docs/mjpeg-howto.info,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** mjpeg-howto.info 2 Jan 2009 10:48:22 -0000 1.22 --- mjpeg-howto.info 19 Sep 2013 17:20:34 -0000 1.23 *************** *** 3,7 **** END-INFO-DIR-ENTRY ! \input texinfo --- 3,7 ---- END-INFO-DIR-ENTRY ! [...1600 lines suppressed...] ! Node: SVCD Multiplexing Example80315 ! Node: SVCD Creating the CD80862 ! Node: Creating DVD's81550 ! Node: DVD Audio creation Example82612 ! Node: DVD Video creation Example83169 ! Node: DVD Multiplexing Example84154 ! Node: DVD creation Example84673 ! Node: Creating DIVX Videos85746 ! Node: lav2avi-sh85951 ! Node: Optimizing the stream88562 ! Node: Scaling and offset correction99289 ! Node: Frame rate conversion101803 ! Node: Transcoding of existing MPEG-2104658 ! Node: If you want to do every step on your own it will look something like this107939 ! Node: Trading Quality/Speed112250 ! Node: Creating streams to be played from disk using Software players113476 ! Node: SMP and distributed Encoding114299 ! Node: Interoperability118124 End Tag Table Index: mjpegtools.1 =================================================================== RCS file: /cvsroot/mjpeg/mjpeg_play/docs/mjpegtools.1,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** mjpegtools.1 28 Jul 2013 01:04:03 -0000 1.54 --- mjpegtools.1 19 Sep 2013 17:20:34 -0000 1.55 *************** *** 3,7 **** .LP ! MJPEG HOWTO - An introduction to the MJPEG-toolsPraschinger Bernhardv1.50MJPEG capture/editting/replay and MPEG encoding toolset description .PP Introduction --- 3,7 ---- .LP ! MJPEG HOWTO - An introduction to the MJPEG-toolsPraschinger Bernhardv2.00MJPEG capture/editting/replay and MPEG encoding toolset description .PP Introduction *************** *** 21,25 **** .PP The HOWTO for the tools intended to give an an introduction to the MJPEG-tools ! and the creation of MPEG 1/2 videos. VCD and SVCD, and the transcoding of existing mpeg streams. .PP --- 21,25 ---- .PP The HOWTO for the tools intended to give an an introduction to the MJPEG-tools ! and the creation of MPEG 1/2 videos. VCD, SVCD and DVD and the transcoding of existing mpeg streams. .PP *************** *** 42,53 **** Video encoding workflow .PP - .PP Unsorted list of useful Hints .PP You have to compile and install the mjpeg_play package, for this read the ! README & REQUIRED_SOFTWARE & INSTALL. If you do not want to compile it, you can download the mjpeg .RPM or .DEB ! package at Sourceforge. .PP There is a script in the scripts/ directory. This script is something that --- 42,52 ---- Video encoding workflow .PP Unsorted list of useful Hints .PP You have to compile and install the mjpeg_play package, for this read the ! README & INSTALL.real an follow the hints from the configure script. If you do not want to compile it, you can download the mjpeg .RPM or .DEB ! package at Sourceforge, or if available use the one that comes with your distribution. .PP There is a script in the scripts/ directory. This script is something that *************** *** 61,65 **** You have to use the driver available from: .PP ! In the 2.6. Linux kernel is the driver for the zoran cards included, you just need to make soure that it is loaded correct. .PP The driver for the Matrox Marvel card also works, more information about it: --- 60,64 ---- You have to use the driver available from: .PP ! In the 2.6. Linux kernel is the driver for the zoran cards included, you just need to make soure that it is loaded correct. If you have a x64 machine and an kernel that is newer than 2.6.30 we'd be happy to hear that you are able to record from the zoran based card. I'm not soure if that combination works. .PP The driver for the Matrox Marvel card also works, more information about it: *************** *** 68,77 **** Athlon,Duron) then never try to let them run on a P5 based computer (Pentium, Pentium-MMX, K6, K6-x, Cyrix, Via, Winchip). You'll get a ! \(rqillegal instruction\(rq and the program won't work. .PP If lav2yuv dumps core then one possible cause is no dv support was included. To enable it make sure that libdv is installed on the system. This will be necessary if you are using a digital camera ! (or analog to DV converter such as the Canopus ADVC100) and converting the dv avi format into the MPEG format. .PP --- 67,76 ---- Athlon,Duron) then never try to let them run on a P5 based computer (Pentium, Pentium-MMX, K6, K6-x, Cyrix, Via, Winchip). You'll get a ! \(rqillegal instruction\(rq and the program won't work. That is the same for the newer CPU as well. If you use specific optimizations be aware of them. .PP If lav2yuv dumps core then one possible cause is no dv support was included. To enable it make sure that libdv is installed on the system. This will be necessary if you are using a digital camera ! (or analog to DV converter such as the Canopus ADVC100 and converting the dv avi format into the MPEG format. .PP *************** *** 79,83 **** the recorded streams you have to start xawtv (any TV application works) once to get the streams played back. You should also check the settings of your ! mixer in the sound card. .PP If you compile the tools on a platform other than Linux not all tools --- 78,82 ---- the recorded streams you have to start xawtv (any TV application works) once to get the streams played back. You should also check the settings of your ! mixer in the sound card. If you use v4l2 you should give mplayer a try to watch the picture .PP If you compile the tools on a platform other than Linux not all tools *************** *** 153,157 **** .nr ll -1 .PP - .PP written in German: .nr ll +1 --- 152,155 ---- *************** *** 171,175 **** .nr ll -1 .PP - .PP If you know some other really good book about that, write us! .PP --- 169,172 ---- *************** *** 508,512 **** Interlacing problem .PP - .PP .nr bi 1 .PP --- 505,508 ---- *************** *** 561,565 **** .nr ll -1 .PP - .PP \fBIn order to determine exactly what type of interlacing problem you have, you need to extract some frames from the recorded stream and take a --- 557,560 ---- *************** *** 649,653 **** \fBTranscoding of existing MPEG-2\fP section. .PP - .PP .SH Creating videos from images --- 644,647 ---- *************** *** 759,763 **** mjpegtools you can convert that pgm output back to yuv. .PP - .PP If you ask yourself why there is a patched version and pgmtoy4m. The answer is that the patch for yuv output was sent several --- 753,756 ---- *************** *** 826,830 **** HW-Playback. Don't forget to close xawtv !! .PP - .PP \fBNOTE2:\fP Do not try to send glav an lavplay into background, wont work correct !!! --- 819,822 ---- *************** *** 851,856 **** glav button description .PP - .PP - .PP The modifications should be saved because glav does not destructively edit the video. This means that the original video is left untouched --- 843,846 ---- *************** *** 945,949 **** .PP - .PP If you want to have the image in a single file you can use that version .PP --- 935,938 ---- *************** *** 1016,1020 **** \fB-o\fP defaults to an offset of zero .PP - .PP But we need to combine the two streams with lavpipe. So the call would be: .PP --- 1005,1008 ---- *************** *** 1063,1067 **** -s and -n. The whole procedure will eventually be automated. .PP - .PP Now we want to compress the yuv stream with yuv2lav: .PP --- 1051,1054 ---- *************** *** 1163,1171 **** audio is not valid for DVDs. You should stick to MPEG1-Layer2 because most of the MPEG2 players ! (DVD Player for example usually the different Winxx Versions have great problems with this too) are not able to play MPEG2-Video and MPEG1-Layer3 sound. .PP - .PP mp2enc is a MPEG1-layer 2 Audio encoder. The toolame encoder is also able to produce an layer 2 file. You can use that one as well. Toolame is much --- 1150,1157 ---- audio is not valid for DVDs. You should stick to MPEG1-Layer2 because most of the MPEG2 players ! (DVD Player for example usually the different Windows Versions have great problems with this too) are not able to play MPEG2-Video and MPEG1-Layer3 sound. .PP mp2enc is a MPEG1-layer 2 Audio encoder. The toolame encoder is also able to produce an layer 2 file. You can use that one as well. Toolame is much *************** *** 1198,1202 **** .PP \fBNOTE:\fP plaympeg is a MPEG1 Player for Linux, you can use other players ! as well, for MPEG audio testing you can also use mpg123. .PP .SH Converting video --- 1184,1188 ---- .PP \fBNOTE:\fP plaympeg is a MPEG1 Player for Linux, you can use other players ! as well, for MPEG audio testing you can also use mpg123. Or a more universal player like VLC. .PP .SH Converting video *************** *** 1217,1221 **** This is the bitrate you need if you want to create VCDs. You can specify more files and also use the placeholder %nd. Where \fBn\fP describes ! the number. By default mpeg2enc assumes that you want to encode a not interlaced video to Mpeg-1. If you want to encode a full size video with interlacing that command will fail. .PP Example: --- 1203,1207 ---- This is the bitrate you need if you want to create VCDs. You can specify more files and also use the placeholder %nd. Where \fBn\fP describes ! the number. By default mpeg2enc assumes that you want to encode a not interlaced video to Mpeg-1. If you want to encode a full size video with interlacing that command above will fail. .PP Example: *************** *** 1223,1227 **** \fB> lav2yuv streami%02d.avi \(br mpeg2enc -b 1500 -r 16 -o video.m1v\fP .PP - .PP mpeg2enc creates a video with a bitrate of 1500kBit/s uses an search radius of 16. That means when trying to find similar 16*16 --- 1209,1212 ---- *************** *** 1229,1233 **** pixels away from the current position of each block. It looks twice as far when comparing frames 1 frame apart and so on. Reasonable values ! are 16 or 24. The default is 16 so adding the option here is silly. Lower values (0, 8), improve the encoding speed but you get lower quality (more visible artifacts) while higher values (24, 32) improve the --- 1214,1218 ---- pixels away from the current position of each block. It looks twice as far when comparing frames 1 frame apart and so on. Reasonable values ! are 16 or 24. The default is 16 so adding the option here is useless. Lower values (0, 8), improve the encoding speed but you get lower quality (more visible artifacts) while higher values (24, 32) improve the *************** *** 1263,1267 **** algorithms. Upscaling is always done using the bicubic algorithm. .PP ! Example .PP \fB> lav2yuv stream.avi \(br yuvscaler -I USE_450x340+20+30 --- 1248,1252 ---- algorithms. Upscaling is always done using the bicubic algorithm. .PP ! Example: .PP \fB> lav2yuv stream.avi \(br yuvscaler -I USE_450x340+20+30 *************** *** 1272,1276 **** .PP \fBNOTE:\fP yuvscaler can set a active area, and set everything else to ! black using: -I ACTIVE_WidthxHeight+WidthOffset+HeightOffset .PP Testing is done by: --- 1257,1285 ---- .PP \fBNOTE:\fP yuvscaler can set a active area, and set everything else to ! black using: -I ACTIVE_WidthxHeight+WidthOffset+HeightOffset High quality scaling: y4mscaler ! ! .PP ! y4mscaler has been arround for quite some time. But it was for a quite long time a extra tool you needed to compile. There is a comprehensive manpage explaining all the details, there also a lot fo helpful information on the website: ! ! One unique feature is that is it able to change the subsampling, and Choma Modes. And you can choose the scaler kernels, depending on the source that can help a lot. ! .PP ! Example: ! .PP ! \fB> cat raw.yuv \(br y4mscaler -O infer=CLIP -O preset=DVD -O sar=PAL_Wide ! \(br mpeg2enc video.m1v \fP ! .PP ! In this example y4mscaler will take the input stream and scale it to the coresponding PAL size. The sar option tell to scale is to a wide format (16:9). ! The infer clip will tells y4mscaler that is can clip the top and bottom bars away to scale it to the resulting size. ! .PP ! Example: ! .PP ! \fB> mpeg2dec -o pgmpipe deluxe.m2v \(br pgmtoy4m -x 420jpeg -r 25:1 -i t \(br y4mscaler -I sar=64:36 -I active=344x476+100+48 -O preset=DVD \(br mpeg2enc -f 8 video.m1v \fP ! .PP ! This is a more the job for y4mscaler. ! We have a weird PAL MPEG source format with 544x576 pixels in a wide screen 16:9 format, that makes black bars all around the original 4:3 image. ! This command scales the image up to a original 4:3 size, and takes just the interesting center. ! The SAR is the sample aspect ratio get lost somewhere so we specify it in the beginning. ! So it is specified again, than you tell y4mscaller the active size of the picture it shall use to scale up. The active keyword is treated different in y4mscaler and yuvscaler. ! And the DVD is a preset for the output format you want. From the stream parameters y4mscaler know that it PAL stream and the the output parameters. If you wanted a 16:9 output you would have to use the keyword: DVD_WIDE. .PP Testing is done by: *************** *** 1292,1296 **** is to use the options as part of the filename (for example: \fBvideo_b1500_r16_41_21.m1v\fP). ! Another possibility is to call all the layer 2 files \(rq\&.mp2\(rq all the MPEG-1 video files \(rq\&.m1v\(rq and all MPEG-2 video files \(rq\&.m2v\(rq Easy to see what's happening then. Reserve .mpg for --- 1301,1305 ---- is to use the options as part of the filename (for example: \fBvideo_b1500_r16_41_21.m1v\fP). ! Another possibility is to call all the layer 2 audio files \(rq\&.mp2\(rq all the MPEG-1 video files \(rq\&.m1v\(rq and all MPEG-2 video files \(rq\&.m2v\(rq Easy to see what's happening then. Reserve .mpg for *************** *** 1390,1394 **** quality factor of 6. It uses a search radius of 24. .PP - .PP \fBExplanation:\fPwhen mpeg2enc is invoked without the 'q' flag it creates \(rqconstantbit-rate\(rq MPEG streams. Where (loosely --- 1399,1402 ---- *************** *** 1435,1440 **** but there are more frames per second than in PAL. .PP - .PP - .PP Anyways, the major factor is quality of the original and the degree of filtering. Poor quality unfiltered material typically needs a higher --- 1443,1446 ---- *************** *** 1480,1485 **** .nr ll -1 .PP ! .PP ! Example .PP \fB> lav2yuv stream*.avi \(br mpeg2enc -b 1500 -r 16 -4 1 -2 1 --- 1486,1490 ---- .nr ll -1 .PP ! Example: .PP \fB> lav2yuv stream*.avi \(br mpeg2enc -b 1500 -r 16 -4 1 -2 1 *************** *** 1498,1502 **** .PP ! Example .PP \fB >mplex sound.mp2 video.m1v -o my_video.mpg\fP --- 1503,1507 ---- .PP ! Example: .PP \fB >mplex sound.mp2 video.m1v -o my_video.mpg\fP *************** *** 1506,1510 **** mpeg2enc). .PP ! Example .PP \fBmplex -V -r 1740 audio.mp2 video_vbr.m1v -o vbr_stream.mpg\fP --- 1511,1515 ---- mpeg2enc). .PP ! Example: .PP \fBmplex -V -r 1740 audio.mp2 video_vbr.m1v -o vbr_stream.mpg\fP *************** *** 1691,1705 **** Now both streams (a mp3 audio and a mpeg2 video) are multiplex into a single stream (final.mpg). You ! have to use the -f 3 option to tell mplex the output format. You also ! have to add the -b decoder buffers size with the same value used when ! encoding the video. -r is that rate of video + audio +1-2% of mplex information. .PP ! The -V option tells that your source for mplexing is a VBR stream. If you don't use this option mplex creates something like a CBR Stream ! with the bitrate you have told it with the -r option. These streams are usually get BIG. .PP - .PP .SH Creating Video-CD's --- 1696,1709 ---- Now both streams (a mp3 audio and a mpeg2 video) are multiplex into a single stream (final.mpg). You ! have to use the \fB-f 3\fP option to tell mplex the output format. You also ! have to add the \fB-b\fP decoder buffers size option with the same value used when ! encoding the video. -\fBr\fP is that rate of video + audio +1-2% of mplex information. .PP ! The \fB-V\fPoption tells that your source for mplexing is a VBR stream. If you don't use this option mplex creates something like a CBR Stream ! with the bitrate you have told it with the \fB-r\fP option. These streams are usually get BIG. .PP .SH Creating Video-CD's *************** *** 1740,1744 **** mpeg2enc -f 1 -4 1 -2 1 -S 630 -B 260 -P -o video.m1v\fP .PP ! Using \fB'-S 630'\fP means that mpeg2enc marks the stream so that mplex generates a new stream every 630MB. One important thing is the use of the \fB-B\fP option which specifies the non-video (audio and mplex --- 1744,1748 ---- mpeg2enc -f 1 -4 1 -2 1 -S 630 -B 260 -P -o video.m1v\fP .PP ! Using \fB\&'-S 630'\fP means that mpeg2enc marks the stream so that mplex generates a new stream every 630MB. One important thing is the use of the \fB-B\fP option which specifies the non-video (audio and mplex *************** *** 1755,1759 **** Which is almost certainly not what you want. .PP - .PP VCD Multiplexing Example --- 1759,1762 ---- *************** *** 1768,1772 **** This is done by vcdimager .PP - .PP \fB> vcdimager testvideo.mpg\fP .PP --- 1771,1774 ---- *************** *** 1915,1919 **** movie means half the frames in an NTSC *are* field interlaced. .PP - .PP Don't forget the -S and -B options mentioned above. You want the stream to fit on a CD don't you ?SVCD Multiplexing Example --- 1917,1920 ---- *************** *** 1967,1976 **** Currently (Dec. 2007) DVD creating is working. .PP ! You need obviously a DVD writer. I own a Ricoh DVD+RW that works, and I know of a DVD-RAM writer that is able to to burn DVD-R. That disks also work with ! a DVD-Player. Which programs you use for burning depends on the DVD writer drive. .PP - .PP For the creation and writing of the VOB, IFO and BUP files we use dvdauthor. Aviable from Sourceforge (you might have guessed it) --- 1968,1978 ---- Currently (Dec. 2007) DVD creating is working. .PP ! You need obviously a DVD writer. I did own a Ricoh DVD+RW that works, and I know of a DVD-RAM writer that is able to to burn DVD-R. That disks also work with ! a DVD-Player. Now most DVD writers ar able to burn both media + and -, so that ! should not be a problem any more. ! Which programs you use for burning depends on the DVD writer drive. .PP For the creation and writing of the VOB, IFO and BUP files we use dvdauthor. Aviable from Sourceforge (you might have guessed it) *************** *** 2020,2024 **** \fB> mplex -f 8 sound.mp2 video.m2v -o my_dvdlikestream.mpg\fP .PP - .PP .nr ll +1 .nr t\n(ll 2 --- 2022,2025 ---- *************** *** 2046,2050 **** .PP You will get a directory with AUDIO_TS and VIDEO_TS directories. ! Burning the data from the disk to a DVD+R/+RW writer would be done like this: .PP --- 2047,2051 ---- .PP You will get a directory with AUDIO_TS and VIDEO_TS directories. ! Burning the data from the disk to a DVD+-R/+-RW writer would be done like this: .PP *************** *** 2181,2185 **** because pure black areas compress much better than noise (captures from analog sources such as VHS and 8mm usually have several lines at ! the time and bottom that are very noisy). For this you can use the scaler .PP yuvdenoise uses a different approach to filter the noise. More information --- 2182,2186 ---- because pure black areas compress much better than noise (captures from analog sources such as VHS and 8mm usually have several lines at ! the time and bottom that are very noisy). For this you can use the scaler. .PP yuvdenoise uses a different approach to filter the noise. More information *************** *** 2299,2303 **** maximal bitrate of 8500kb/sec. .PP - .PP .nr ll +1 .nr t\n(ll 0 --- 2300,2303 ---- *************** *** 2340,2344 **** .PP If you have very high quality material and want to keep every detail you ! should try to use the mpeg2enc --keep-hf\(br-h on the other hand .PP \fBNote:\fP The bitrate reduction you have depends on the material --- 2340,2344 ---- .PP If you have very high quality material and want to keep every detail you ! should try to use the mpeg2enc --keep-hf\(br-h on the other hand. .PP \fBNote:\fP The bitrate reduction you have depends on the material *************** *** 2464,2469 **** than change the framerate and in the last step change the image size. .PP - .PP - .PP It can happen that yuvscaler or mpeg2enc do not detect the TV norm correct. If that happens you have to add the norm option \fB-n n/p/s\fP --- 2464,2467 ---- *************** *** 2493,2499 **** the analog stuff makes it much harder to compress. .PP - One other very good guide that helps you transcoding videos can be found at: - .PP - .PP You will also need to manually adjust the audio delay offset relative to video when multiplexing. Very often around 150ms delay seems to do --- 2491,2494 ---- *************** *** 2501,2506 **** .PP You have to download the ac3dec and mpeg2dec packages. You can find ! them at mjpeg homepage ( ! ). You also need sox and toolame. .PP --- 2496,2502 ---- .PP You have to download the ac3dec and mpeg2dec packages. You can find ! them at their homepage: mpeg2dec ( ! ) and ac3dec. ! For decoding the audio streams mpg123, and mplayer can be very helpfull. You also need sox and toolame. .PP *************** *** 2531,2535 **** .nr ll -1 .PP - .PP The script prints also something like this: .PP --- 2527,2530 ---- *************** *** 2573,2577 **** Here we have a SVCD (MPEG-2 video) example: .PP - .PP \fB> mjpegtranscode -S -o svcd_stream mpeg2src.mpg\fP .PP --- 2568,2571 ---- *************** *** 2676,2680 **** .nr ll -1 .PP - .PP For SVCD creation use: .PP --- 2670,2673 ---- *************** *** 2730,2734 **** bbtools linux -suse -blackbox\(rq\&. Currenty it can be found at: .PP - .PP First run: .PP --- 2723,2726 ---- *************** *** 2822,2825 **** --- 2814,2821 ---- .PP + Distributed encoding is a quite dark theory for the typical Machine in 2013. + So most users can safely skip that point. SMP Encoding is more interresting for + the average computer + .PP The degree to which mpeg2enc tries to split work between concurrently executing threads is controlled by the -M or --multi-thread [0..32] *************** *** 2855,2860 **** remote shell execution commands. For example, if you have two computers: .PP - .PP - .PP \fB> rsh machine1 lav2yuv \(rqmycapture.eli \(br yuvscaler -O SVCD \(br yuvdenoise\(rq \(br --- 2851,2854 ---- *************** *** 2904,2913 **** NuppelVideo can also be processed with the mjpeg tools. .PP - .PP If you have a Macintosh (MAC) and want to use the mjpeg tools look there: .PP - If you want to compile the mjpeg-tools on your MAC, our just want - mpeg2enc and mplex compiled for the MAC take a look here: - .PP MPEG files produced using the tools are know to play back correctly on: .PP --- 2898,2903 ---- *************** *** 2923,2929 **** .nr bi 1 .PP - dvdview - .nr bi 1 - .PP xmovie .nr bi 1 --- 2913,2916 ---- *************** *** 2938,2945 **** .nr bi 1 .PP ! MS Media player version 6 and 7 .nr bi 1 .PP ! SW DVD Player .if \n(ll>1 .RE .nr ll -1 --- 2925,2932 ---- .nr bi 1 .PP ! MS Media player version 6 and 7 and later version .nr bi 1 .PP ! severals Software based DVD Player .if \n(ll>1 .RE .nr ll -1 |