6337 | | <p>The transcoder re-encodes files from one MythTV format to another. The |
6338 | | main purpose of the transcoder is to allow users with hardware |
6339 | | encoders (PVR-250) or systems that can only record in RTjpeg due to |
6340 | | performance reasons (multiple capture cards, slow system, etc) to create |
6341 | | MPEG-4 streams to save space. |
| 6337 | <p>MythTV's built-in transcoder re-encodes recordings from one |
| 6338 | codec/format to another. Transcoding is most commonly used to allow |
| 6339 | users with hardware encoders (PVR cards, DVB cards, ATSC HD, etc.) or |
| 6340 | systems that can only record in RTjpeg due to performance reasons |
| 6341 | (multiple capture cards, slow system, etc) to create MPEG4 streams to |
| 6342 | save space. However, with the addition of HD sources transcoding has |
| 6343 | come to be used to transcode and resize HD MPEG2 recordings into |
| 6344 | MPEG4 files to be played on systems too slow to deal with the original |
| 6345 | HD recordings. There are even more uses for transcoding though, |
| 6346 | including the ability to fix up MPEG2 recordings or remove commercials |
| 6347 | without transcoding at all.</p> |
| 6348 | <p>When MythTV transcodes a file to MPEG4 or RTjpeg the file format is |
| 6349 | actually NuppelVideo (nuv.) You may have difficulty playing these |
| 6350 | files back in other video players. If you want something more |
| 6351 | portable you can look at some of the other sections in this HOWTO. |
| 6414 | <P>There are a myriad of options for transcoding but the simplest |
| 6415 | setting is to enable lossless transcoding (the first option) as this |
| 6416 | removes all other options. Enabling lossless encoding simply removes |
| 6417 | commercials (if you've marked them) and attempts to clean up MPEG2 |
| 6418 | streams. Note: with this option MythTV will not apply denoise filters |
| 6419 | or anything of the sort. It only attempts to massage the stream into |
| 6420 | something cleaner and less likely to have trouble with other less |
| 6421 | forgiving MPEG2 hardware/software (including players, video editors, |
| 6422 | etc.)</P> |
| 6423 | |
| 6424 | <P>If you enable resizing of the recording the next page has the |
| 6425 | settings for choosing the final resolution. Note: MythTV will scale |
| 6426 | the video as appropriate not crop it to this resolution.</P> |
| 6427 | |
| 6428 | <P>The final two pages allow configuration of the video and audio |
| 6429 | codecs. Although RTjpeg is an option for video codec I can think of |
| 6430 | no reason you'd want to transcode to that format. It produces larger |
| 6431 | files than MPEG4 <em>and</em> the recording will take <em>more</em> CPU |
| 6432 | power to play back. The MPEG4 settings are not exactly |
| 6433 | self-explanatory but you can judge for yourself the effects on the |
| 6434 | final file and it's easy to experiment with until you achieve a good |
| 6435 | compromise between size and quality. |
| 6436 | <p>For those who've messed up their MPEG4 transcoding profile, the |
| 6437 | defaults from memory are Bitrate: 2200-2500, MaxQ: 2, MinQ: 15, |
| 6438 | MaxQDiff: 3, and "Scale bitrate for frame size" is enabled. The other |
| 6439 | options are unchecked. If you're getting weird results from MPEG4 |
| 6440 | transcoding try setting as above and go from there. |
| 6441 | |
| 6442 | <sect2>Create/Alter Scheduled Recordings to Enable Transcoding |
| 6443 | |
| 6444 | <P>Transcoding is actually enabled on a per-recording basis. Two |
| 6445 | things must be true before any given recording will be |
| 6446 | auto-transcoded, however. The first is that the recording must have |
| 6447 | been made with a recording profile that has auto-transcode enabled. |
| 6448 | Under "Storage Options" for the recording you must set the "Record |
| 6449 | using the "X" profile" to the profile you configured in the first |
| 6450 | step. In addition, under the "Post Recording Options" section of the |
| 6451 | recording you must also set "Transcode new recordings." This is also |
| 6452 | where you specify the Transcoding profile to use (Auto, High, Medium, |
| 6453 | Low.)</P> |
| 6454 | |
| 6455 | <P>It may not be obvious from above but the flexibility of this system |
| 6456 | is primarily to make it possible to auto-transcode a show recorded via |
| 6457 | one source (ie: pcHDTV 3000), and not transcode that same show if it's |
| 6458 | recorded on another kind of card (ie: PVR-250.) There are other uses |
| 6459 | however. You could have a PVR-250 and a V4L card. You may want to |
| 6460 | transcode the MPEG2 from the PVR-250 but there is no need to transcode |
| 6461 | the recordings made with the V4L card, as it's already likely to be |
| 6462 | MPEG4.</P> |
| 6463 | |
| 6464 | <P>As an example, you could configure the Default profile for |
| 6465 | "Hardware DVB Encoders" (the profile group used for DVB cards, |
| 6466 | including the ATSC HD type cards like pcHDTV 3000) to "Enable |
| 6467 | auto-transcoding." In the Default profile for MPEG2 Encoders (PVR |
| 6468 | cards) you'd leave "Enable auto-transcoding" unchecked. For programs |
| 6469 | that are available on both kinds of cards (think Law & Order, which is |
| 6470 | available on virtually every channel) you'd set the recording profile |
| 6471 | to Default and enable auto-transcoding in the record settings. Then |
| 6472 | you pick your transcoding profile. When Law & Order plays on your DVB |
| 6473 | card, it will get transcoded. When it plays on a channel available |
| 6474 | via your PVR card, it won't be.</P> |
| 6475 | |
| 6476 | <sect2>Manual Transcoding |
| 6477 | <P>Manually transcoding a recording is also possible. It can be |
| 6478 | activated while watching a show by hitting 'x', or from the OSD menus |
| 6479 | by choosing the Transcode option, or by choosing Job Options/Transcode |
| 6480 | from the info menu accessed from the Watch or Delete Recordings |
| 6481 | screens. |
| 6482 | <p>The transcoding profile used for manual transcoding is whatever you |
| 6483 | set when you originally configured this recording, even if you didn't |
| 6484 | enable auto-transcoding. The only way to change what transcoding |
| 6485 | profile will be used is to alter the transcoder column in the recorded |
| 6486 | table in the database. The transcoder column contains a number which |
| 6487 | corresponds with the id column in the recordingprofiles table. You |
| 6488 | can find out the id number for each profile in the transcoder group |
| 6489 | with an SQL command like: |
| 6490 | |
| 6491 | <tscreen><verb> |
| 6492 | mysql> select r.* from recordingprofiles r,profilegroups p where p.name='Transcoders' and p.id=r.profilegroup; |
| 6493 | +----+----------------+------------+------------+--------------+ |
| 6494 | | id | name | videocodec | audiocodec | profilegroup | |
| 6495 | +----+----------------+------------+------------+--------------+ |
| 6496 | | 21 | RTjpeg/MPEG4 | MPEG-4 | MP3 | 6 | |
| 6497 | | 22 | MPEG2 | MPEG-4 | MP3 | 6 | |
| 6498 | | 27 | High Quality | MPEG-4 | MP3 | 6 | |
| 6499 | | 28 | Medium Quality | MPEG-4 | MP3 | 6 | |
| 6500 | | 29 | Low Quality | MPEG-4 | MP3 | 6 | |
| 6501 | +----+----------------+------------+------------+--------------+ |
| 6502 | 5 rows in set (0.01 sec) |
| 6503 | |
| 6504 | mysql> |
| 6505 | </verb></tscreen> |
| 6506 | |
| 6507 | <p>Armed with the knowledge of what the profile ID's are you can also |
| 6508 | choose to run mythtranscode from the command line explicitly |
| 6509 | specifying the transcoder profile. Run mythtranscode with --help for |
| 6510 | usage information. |
| 6511 | |
| 6512 | |