nuvexport can be used as an alternative to MythTV's inbuilt transcoding for recorded TV files. It is a script designed to export mythtv nuv and mpeg-nuv files to other formats, including xvid, svcd, dvd and others. Please see the official nuvexport page for more info.
If you're looking for the Xvid codec, check here.
- 1 Installing Nuvexport
- 2 Nuvexport Manual
- 3 Glossary
- 4 Quickstart
- 5 Pepare Your Recordings
- 6 General Usage
- 7 Starting Nuvexport
- 8 Transcode Or FFMpeg
- 9 Debug Mode
- 10 Which Format To Use?
- 11 Choosing A Program to Transncode
- 12 Where To Export Files To
- 13 Myth Cutlist Option
- 14 Noise Reduction Option
- 15 Deinterlacing Option
- 16 Crop Broadcast Overscan Option
- 17 Audio Bitrate Option
- 18 Variable Bitrate Video Option
- 19 Multipass Option
- 20 VBR Quality Option
- 21 Video Bitrate Option
- 22 Resolution (Width/Height) Option
- 23 Nuvexportrc File
- 24 Run Automatic Commands After Nuvexport Finishes
- 25 Fine Editing With Avidemux
- 26 Creating Subtitles For You Recordings
nuvexport can only be installed on Linux systems. To be of any use, you'll probably want MythTV installed first. You'll also need a copy of the FFMpeg, Transcode or mencoder encoding programs. FFMpeg and Transcode should be available as packages for your Linux distrobution and mencoder is available as part of MPlayer.
In addition you will need copies of various codec files. Personally I use a lot of XviD, and this should also be readily available as a package.
Finally, you need a copy of nuvexport. The latest copy can be found at http://forevermore.net/files/nuvexport/. For a quick install, just download the tar.bz2 source file, unzip, browse to the newly created directory in a command prompt and enter "make install".
Fedora Core 4 dependencies
- id3lib: Can be installed from Fedora extras: yum install id3lib
nuvexport can be installed as RPM from http://forevermore.net/files/nuvexport like this:
Fedora Core 2 dependencies
- mjpegtools: provides mpeg2enc and mp2enc
- ffmpeg: provides ffmpeg
- perl: provides perl's Time::Hi Res module
- libdate-manip-perl: provides Date::Manip
Mostly as Debian, but the default ffmpeg package doesn't come with xvid or mp3 exporting enabled. It may be necessary to build ffmpeg from source.
Get the package libid3-3.8.3-dev for id3tag (needed for mp3 export).
The following is my (Christopher Friend aka. pepsi_max2k) attempt at an nuvexport manual, previously found here but now under constant attack by spambots.
It was started not long after I first got into Linux & MythTV and therefore is aimed at the complete Linux novice. Most of the information I just tried to figure out for myself. I've tried to explain various things like transcode programs and video formats but I can't guarantee it's all correct.
Please add to this. --Pepsi max2k 16:06, 14 October 2006 (UTC)
Codec (noun) - Coder-Decoder, a program used to perform encoding of some information from one format to another, or decode it, usually to present it in a more useable format.
Command Prompt - Officially, the character at a command line interface signifying the acceptance of text commands. Here, I mean the Unix shell, that text inputty thing that goes under various names. In Suse it's called Konsole. Whatever, just bring one up and type commands. There's no difference to using a shell in a gui or just using plain shell without any visual windows manager.
Encode (verb)- The term given to converting an analogue signal into a digital computer signal using one of many varying compression codecs. Eg. Recording an analogue TV broadcast or some audio through an analogue sound jack onto your PC.
Interlacing - see Wikipedia for this one. It gets complicated...
Transcode (verb) - Converting a digital computer signal from one form to another. Note that, as any piece of media information stored on a PC will already be stored in one type of digital codec, any converting or re-encoding of this file should correctly be termed as "transcoding". Anything recorded by MythTV will be stored by MythTV as an MPEG2 file, whether originally an analogue broadcast signal or digital DVB signal. Therefore any converting of this file to another file of differing quality or codec is correctly known as "transcoding". Also note that I did not know this until writing half the manual, so you'll reguarly see me use the term "encode" where I should have used "transcode".
Transcode (noun) - Not to be confused with "transcode (verb)", Transcode is also the name of a Linux program that, surprise surprise, is use to transcode files.
This is the one for all of you who just want a quick idea on how to encode your stuff. I'll be brief and only give one method - it's what I use 100% of the time. It'll give you a decent quality recording that you should be able to play on most things (mainly your PC and some DivX compatible DVD players), and won't take up too much file size.
1. Install nuvexport (download source code, make install)
3. Calculate bitrate from total running time (post-cuts) using this online time calculator and online bitrate calculator. Input a file size around 2 - 4 Mb less than required, and round down the given bitrate to the nearest 5. Leave this out if you don't care about file size.
4. Run "nuvexport --transcode".
5. Chose to encode to XviD.
6. Chose the single recording you wish to transcode and the location to export the file to.
7. Chose "Yes" to enable myth cutlist, noise reduction, deinterlacing, crop overscan.
8. Chose 128 as audio bitrate.
9. Chose yes to Variable bitrate video and multipass.
10. Use the bitrate you ended up with after step 3 (or just use around 1000 if you skipped step 3).
11. Use 624 as width and 352 as height for 16:9 widescreen recordings (possibly forced in nuvexportrc file), or 640 as width and 480 as height for 4:3 recordings.
12. Use Avidemux to cut out any final parts and save using the "Copy" option for video and audio.
Pepare Your Recordings
Before using nuvexport, you'll probably want to prepare the recording you're about to transcode by first cutting out any of the recording that you don't want to encode, in turn creating what's called a "cutlist". This will save you the trouble of wasted time transcoding un-needed video. You can cut out parts manually or use MythTV's automatic commercial flagging for this. See the Myth Cutlist Option section of this guide for more info on how to do this.
You should note that it is probably appropriate to leave around one second before / after each required part before setting the cut point. I prefer to use the edit tools to search to the exact frame I want to cut, then move one and a half seconds before / after this point before setting the actual cut point (depending on whether the section I want to keep follows / preceeds the cut point respectively). I do this because I've found that in the past, the further into the movie the cut point was, the less chance there was of it being on the exact frame I chose, and I ended up losing parts of the movie and had to transcode it again. There's also another reason for leaving some extra space which I'll explain in the next section.
Also, make note of the time positions of the cutpoints! Again, explanation coming in a sec.
Once the final transcoded file is complete, you can finely edit out any excess parts with a tool like avidemux. I promise you it's extremly quick and easy.
Calculate Optimal Bitrate
Rewrite to stress below for VBR Multi only. --Pepsi max2k 19:19, 12 October 2006 (UTC)
If you have a specific size you wish your end recording to be the you'll want to calculate the bitrate required to create a file that size. I prefer just under 700 Mb for a full movie (one CD) or 350 Mb for a 45 minute show, and 175 Mb for a 30 minute show (half and a quarter of a CD respectively)). That's for XviD encoded files though, and ensures they don't take up too much space on my PC and I can share them over the internet if needed. Obviously if you prefer using DVDs, have more space available, want to retain more quality or whatever, you may want to use a higher bitrate that gives a larger file size.
Either way, the first thing you need to do is work out the full length of the recording to be transcoded. Remember I told you to take note of the cut point positions? Well, if you add up all the even points and take from this the total of all the odd points, you should get the full file size. Confused? Well, if you're not a genious mathematitian, you can use a tool like this online time calculator to help, then...
Imagine you have a 4 minute file, with one cut point at 1 minute in and the other at 3 minutes in. Firstly, add the second cut point (3 minutes) to the total. You got 3 minuts. Now take away the first cut point (1 minute). You have your 2 minutes total running time. Now, say you got four cut points, at 1 min, 2 min, 3 mins and 4 mins, with the stuff between 0-1 and 2-3 cut out. As before, add the second cut point (2 mins) to your total. Minus first cut point. You now have 1 minute running time in total. Start again with next pair. Add 4 minutes to your total. Take away the preceding 3 minutes. You now have your total running time of 2 minutes. If you have more cut points, just continue as before until you get your final running time.
Now, use an online bitrate calculator (I use the online DivX & XviD calculator for calculating XviD bitrates) to find the required bitrate for your movie based on the time and the final size you want for the file.
If you're not going to use the Variable Bitrate option (and use CBR instead) then you can pretty much type in the full running time of the show and it'll give you a bitrate that should create a file of the size you requested.
VBR files tend to take up a little more space than CBR (I know, they shouldn't, but they do). Because of this, it helps leave a margin of error with the eventual bitrate. If you calculate the bitrate based on the *exact* running total of the file, the likelyhood is that the file will actually be slightly larger than is needed.
Firstly, I enter a required file size of a number of megabytes below the required file size I really want. I follow my own tried and tested scheme for this: For 700 Mb files, enter 696. For 350 Mb files, enter 348, and for 50 Mb files, enter 49. As you can see, I take 4 megs away from 700, half away from files half that size, and 1 away from smaller files. You can generally work out foryourself that stuff twice as big as 700 Mb would need twice as much taken away from it - 8. It's just a guide, but it works for me.
Secondly I round down the bitrate that the online calculator gives me to the nearest 5. Eg. if it tells me to use a bitrate of 906, 907, 908 or 909, I would instead use 905. If it tells me to use 905, well, I either play it safe and use 900 or take a gamble and go with 905.
For example, the last film I encoded contained six cut points. Each cut point was positions 1.5 seconds away from the required point I wanted, bringing the running total to 1 hour, 28 minutes and 31 seconds. Using the bitrate calculator with an audio bitrate of 128 and required size of 696 (I really wanted 700), it gives me a result of 971 for the XviD bitrate. I then rounded this down to 970, which I used and this, after cutting out any excess parts with avidemux (because of the 1.5s offset with cutpoints) eventually gave me a file of 699.75 megabytes. Perfect. And easy, once you know how.
How To Use Flags
To use a flag, just type it after the main name of the program when you run it from the command prompt. You can use 0, 1, or many flags together. In the following example I've added the --transcode and --xvid flag to get nuvexport to run with the Transcode program to encode videos, and the XviD codec for the video format.
Other useful flags are:
- --ffmpeg : This makes nuvexport use FFMpeg to encode videos.
- --transcode : This makes nuvexport use Transcode to encode videos.
- --debug : This makes nuvexport run in debug mode, see the Debug section below.
Many more flags are listed in the nuvexport manual pages.
When using a flag for an encoding option that is presented during the running of nuvexport, it will change the default value of this option but this can still be overridden during the program by typing Yes or No as normal. For example, the default option for noise reduction is enabled, represented by the following text when running nuvexport:
Enable noise reduction (slower, but better results)? [Yes]
Using the flag --nodenoise when running nuvexport will cause this text to change to
Enable noise reduction (slower, but better results)? [No]
but you can still overide the (new) default option as usual by typing Yes.
How To Enter Commands
Using nuvexport is a simple case of choosing an option (usually a number or Yes/No choice), typing that choice when prompted, and hitting enter.
Numbers & Letters
Whenever nuvexport gives you a list of options, such as the first "Choose a function:" prompt, or the recorded program "Choose a show:" prompt, you should type in the the number of the option you want (or the letter if you wish to choose a lettered option) and then hit enter. For an example, here is a printout of my running of nuvexport after I have chosen a function:
You have recorded the following shows: 1. Due South (4 episodes) 2. Ghostbusters II (1 episode) 3. NFL Super Bowl XL Live (1 episode) q. Quit Choose a show:
At this point, if I wanted to choose Due South, I would type in a sinlge "1" without the quotes and hit enter. To quit, I would enter a "q" without the quotes and hit enter.
Note that, when entering letters, it does not matter whether the letter is uppercase or lower case.
Yes & No
When given an option such as the following:
Enable Myth cutlist? [Yes]
This means that you have two options, either positive or negative to enable or disable the function respectively. In this case, typing "Yes" without the quotes will enable the function, and typing "No" will disable it.
You can see from the above that the prompt ends in [Yes]. This shows the default option for the command and hitting enter without entering anything will keep this option, in this case keeping the Myth cutlist enabled.
You should note that the commands "Yes", "yes", "True" and "true" are all treated as the same and will all enable a function when entered (without the quotes). The same is true for "No", "no", "False" and "false", though obviously with the opposite effect as "Yes".
All other commands you are prompted for follow pretty much the same routine - you just enter your choice as a single string and hit enter once you've finished to move on to the next prompt. There's no need to worry about capitalisation (though you may when entering a location to export files to), and generally you can't enter more than one thing at once before carrying on.
Please Note: It seems that entering anything other than "Yes", "No" or the other six substitutable commands will result in nuvexport continuing as normal. For example, entering "Blahblahblah" at the "Enable Myth cutlist? [Yes]" prompt will result in the program continuing onto the next prompt as normal. In this case, I'm unsure how nuvexport handles the command, but I assume that it will just use the default one stated in the prompt, in this case "Yes".
So, you messed up a command and you want to start over. No problem, you can either enter "q" or "Q" without the quotes if you have been given the option "q. Quit" as one of the commands, or by simply hitting the "Ctrl" and "Z" keys on your keyboard at the same time. You will then be returned to a normal command prompt.
Nuvexport is run via the command line. Open your regular command prompt and then all you need to do is type
Regardless of what flags you use (if any), nuvexport will then begin and start reading MythTV's database to get information on your programs. This is shown by the text "Loading MythTV recording info." with a percentage mark underneathe. Once this reaches 100% you will be shown a new screen that informs you which encoder MythTV is using (see below) by the following line:
Using transcode for exporting.
In this case, it's using Transcode to, well, transcode files. If you use FFMpeg or MEncoder, the printout should change appropriately.
Directly below this printout you will be given a list of encoding options and asked to choose one.
Transcode Or FFMpeg
Just starting nuvexport with the command:
will start nuvexport in it's default mode, using FFMpeg to encode files.
One of the biggest decisions to make when running nuvexport is whether you really want to use FFMpeg, or if you want to use Transcode, or MEncoder instead as the base transcoder program. Basically nuvexport doesn't transcode anything itself, just provides easy access to other programs and their options which themselves perform the actual transcoding.
Note: If you're installing from an RPM package then the options you'll be given on which format to transcode to during the running of nuvexport may differ depending on how the package has been put together. If you find that some things such as DivX/VCD/SVCD encoding options have the “(disabled)” text next to them then you'll not be able to use them due to the currently installed version of either FFMpeg or Transcode (whichever you're using) not supporting them. The only option you have is to either find another copy of the program's package, or try to compile the program from source code and install it yourself.
Note 2: Some of the options will be disabled regardless as I'm sure I read somewhere that the PSP and iPod encoding had not been fully implemented yet.
Note 3: Apparently virtually everything (Transcode included) uses FFMpeg for various things at some point. So whatever you do you need a working copy of FFMpeg installed.
FFMpeg is the default program used for transcoding files with nuvexport. This means that if you just type “nuvexport” at the command line then it will be using FFMpeg. You can also use the “--ffmpeg” flag at the same time (eg. type “nuvexport –ffmpeg” to explicitly define the use of the program. Either way, it does the same thing.
- MPEG2->MPEG2 cut only
- .nuv and .sql
Advantages of using FFMpeg?
- Firstly it'll give you more options for an encoding format than Transcode will, namely that you can export to DivX.
- It's also known to be quicker than Transcode when encoding files, I'm guessing around 1/4 of the time.
- Transcode produces slightly higher quality results while encoding files, especially with Xvid. I can't say how much difference there is, but it's probably best if you check for yourself. Some users report that using ffmpeg produces “smear” in the video while Transcode does not.
As with FFMpeg, Transcode is also used for transcoding files with nuvexport. As it is not the default encoder for use with nuvexport you'll have to use the “--transcode” flag when you run nuvexport (eg. type “nuvexport –transcode”) to explicitly define the use of the program.
- MPEG2->MPEG2 cut only
- .nuv and .sql
Advantages of using Transcode:
- Transcode produces better quality results when using XviD, though may produce very slightly larger files as a result.
- Transcode takes longer to encode files than FFMpeg, roughly speaking it takes 4 to 5 times longer to encode a video than the actual length of the video (ie. a 1 hour video will take 4 to 5 hours). Using single pass without noise reduction should speed things up alot with very minor loss of quality.
- Transcode will give you less options of encoding formats than FFMpeg will. The most noticable abscentee is probably DivX, though Xvid is a very similar alternative.
You can also use a program called MEncoder to encode files with nuvexport. This program is installed with the MPlayer package, so if you don't have MPlayer installed you won't have MEncoder. I can't really comment on it's quality or ability as I've never used it.
What To Use
As well as using Transcode of FFMpeg, you can also make nuvexport run in debug mode by using the "--debug" flag. This causes nuvexport to go through it's normal running procedure until it gets to actually transcoding the video, at which point it doesn't actually trancscode anything but instead prints out all the commands that it would normally use to encode a video.
The debug output is useful if the program is causing errors or doing something you don't think it should, and you want to check to see what is causing these problems. Running the output commands individually and changing any you think you need to could help you to solve or problem solve the errors.
At least, that's how it's meant to work, but if you know/understand how to run Transcode or the like from the command line then you're too bright for this place, and gawd knows how you run the things on their own...
For an example, I'm going to use the following article originally from the nuvexport project page at https://svn.forevermore.net/nuvexport/wiki/debug.
nuvexport's --debug mode is basically a quick way to get it to print out the commands it would normally run, instead of running them. It's then up to you to run the commands and look for errors.
Please be aware that mythtranscode's fifodir code does not work on stale fifo's, so if there is a mkdir call for a fifodir, you also need to make sure that there isn't one already created with that name.
For example, take the following sample --debug output:
system call: mkdir -m 0755 /tmp/fifodir_28703/ forking: /bin/nice -n19 mythtranscode --showprogress -p autodetect \ -c 1110 -s 2005-02-23-15-59-00 -f "/tmp/fifodir_28703/" --honorcutlist 2>&1 forking: /bin/nice -n19 ffmpeg -f rawvideo -s 640x480 -r 29.97 \ -i /tmp/fifodir_28703/vidout -f yuv4mpegpipe - 2> /dev/null \ | /bin/nice -n19 yuvdenoise -r 16 -b 12,10,-12,-10 2> /dev/null \ | /bin/nice -n19 ffmpeg -hq -threads 2 -y -f s16le -ar 44100 -ac 2 \ -i /tmp/fifodir_28703/audout -f yuv4mpegpipe -s 640x480 -aspect 1.333 \ -r 29.97 -i - -aspect 1.333 -r 29.97 -deinterlace -croptop 10 -cropbottom 10 \ -cropleft 12 -cropright 12 -padleft 2 -padright 2 -s 620x464 -vcodec xvid \ -b 960 -qmin 6 -qmax 31 -minrate 32 -maxrate 1920 -bt 32 -bufsize 65535 \ -lumi_mask 0.05 -dark_mask 0.02 -scplx_mask 0.5 -4mv -part -acodec mp3 \ -ab 128 -f avi "./Good Eats - Tomatoes.avi" 2>&1
because there is a mkdir in there, you'll need to first run something like:
rm -rf /tmp/fifodir_28703/ mkdir -m 0755 /tmp/fifodir_28703/
Then, you'd run:
/bin/nice -n19 mythtranscode --showprogress -p autodetect \ -c 1110 -s 2005-02-23-15-59-00 -f "/tmp/fifodir_28703/" --honorcutlist 2>&1
Notice how the --debug output said "forking" -- this means that nuvexport intends to run things simultaneously, so you'll need to open another console window to run the next command:
/bin/nice -n19 ffmpeg -f rawvideo -s 640x480 -r 29.97 \ -i /tmp/fifodir_28703/vidout -f yuv4mpegpipe - 2> /dev/null \ | /bin/nice -n19 yuvdenoise -r 16 -b 12,10,-12,-10 2> /dev/null \ | /bin/nice -n19 ffmpeg -hq -threads 2 -y -f s16le -ar 44100 -ac 2 \ -i /tmp/fifodir_28703/audout -f yuv4mpegpipe -s 640x480 -aspect 1.333 \ -r 29.97 -i - -aspect 1.333 -r 29.97 -deinterlace -croptop 10 -cropbottom 10 \ -cropleft 12 -cropright 12 -padleft 2 -padright 2 -s 620x464 -vcodec xvid \ -b 960 -qmin 6 -qmax 31 -minrate 32 -maxrate 1920 -bt 32 -bufsize 65535 \ -lumi_mask 0.05 -dark_mask 0.02 -scplx_mask 0.5 -4mv -part -acodec mp3 \ -ab 128 -f avi "./Good Eats - Tomatoes.avi" 2>&1
You need to do this because this command (ffmpeg) is actually interacting with the data that mythtranscode outputs.
From here, you basically have to watch the output from both programs to see if you notice errors. Something will usually happen fairly soon (usually ffmpeg complaining about a missing codec, bad file format, etc.). If you don't understand the error, then post the info to the mythtv mailing list, or come ask someone for help in the irc channel.
Note for multipass files: You'll see debug printout virtually identical to above, but twice - for the first and final passes. Just run the code as above, eg. rm dir, mkdir, 1st fork code for First Pass in one window, 2nd fork code for First Pass in another. Wait til they both finish, then do it all again (inc. rm dir, mkdir) but use the forked code from the Final Pass instead.
Which Format To Use?
After starting nuvexport, the first main printout you should see is the following:
Using ffmpeg for exporting. What would you like to do? 1. Export to XviD 2. Export to SVCD 3. Export to VCD 4. Export to DVCD (VCD with 48kHz audio for making DVDs) 5. Export to DVD 6. Export to DivX 7. Export to ASF 8. Export to MP3 9. Export to PSP (disabled) 10. Export to iPod (disabled) 11. MPEG2->MPEG2 cut only 12. Export to .nuv and .sql q. Quit Choose a function:
The remaining options - which will vary based on the encoder you are using (FFMpeg, Transcode or Mencoder) and the versions of these you have installed (some will have options shown as disabled, note PSP and iPod are currently always dissabled) - ask you to choose a format that you wish to encode your video to. The remaining option is to quit the running of nuvexport.
On the whole, each format is quite different and used for a specific purpose, eg. transferring to DVD, CD, for use on a PC or creating an audio file. That said, I'll now go through the various formats available for both Transcode and ffmpeg, both of which make no difference on the format used (though as mentioned later, Transcode or Ffmpeg may produce better results with one than the other).
Special note: you really only want to use DVD/CD formats if you're going to burn the resulting file to a DVD or CD, otherwise the compatibility and size of the file renders it pretty pointless.
Using the XviD option will result in giving you an XviD AVI file.
XviD is basically an open-source alternative to the DivX codec, making them both very similar and also compatible with the same players (most DivX capable DVD players will play XviD files, and, if not already supported, the XviD codec can be downloaded to allow playback of the file in any of your normal Media Players on your PC). The resulting file will end in a .avi extension (a general contained format for many types of videos), the same as DivX files.
XviD will give you excellent compression while keeping a good quality file, you can easily create a file from a regular length feature film small enough to fit onto a single CD or put multiple ones on a DVD.
- Good quality (can be better than DivX)
- Small file size.
- Good compatibility.
- Can be burnt to CD/DVD.
- Can be used for any length of video.
- Not as widely used as DivX
- Less compatible than DivX.
Options you'll get when running:
This option will convert your .nuv video an SVCD compliaint MPEG file, allowing you to burn the file to an SVCD formatted CD disc. Basically an SVCD is just a better quality version of a VCD, allowing up to 60 minutes of video on a CD, and are widely compatible for use with PC's or standalone DVD and CD video players. See VCD section below for more info.
- Great quality
- Wide compatibility.
- Can be burnt to CD.
- Great for storing on a PC.
- Do you really want to bother making one?
- Less compatibility than VCD.
- Only 60 minutes of video (less than VCD).
Options you'll get when running:
1. Choose a show(s) (+ episode if applicable). 2. Where to export file(s) to. 3. Enable Myth cutlist? 4. Enable noise reduction? 5. Enable deinterlacing? 6. Crop overscan? 7. Audio bitrate. 8. VBR Quality.
This option will convert your .nuv video a VCD compliaint MPEG file, allowing you to burn the file to a VCD formatted CD disc. A VCD can be seen as the video version of an audio CD. With audio CDs, instead of holding files in a directory format like on your PC, they hold a specialised version of the data for playback on all manner of CD players and this data can only be turned back into files by ripping the data off the disc and converting it into a commonly used format (you can kind of think of it as a “single entity” instead of multiple files). VCDs do much the same thing with videos so that they can be played on a wide variety of players. VCDs will allow you to add different subtitle tracks, audio tracks, video files and menus to a single CD, but you'll need to use a burning program capable of creating a VCD to do so. A VCD will hold up to 80 minutes of video on a single CD.
- Widely compatible.
- Can be burnt to CD.
- Holds more video than an SVCD.
- Worse quality than SVCD.
- Only holds 80 minutes of video.
Options you'll get when running:
1. Choose a show(s) (+ episode if applicable). 2. Where to export file(s) to. 3. Enable Myth cutlist? 4. Enable noise reduction? 5. Enable deinterlacing? 6. Crop overscan?
The nuvexport mentions this as “a VCD with 48kHz audio for making DVDs”, though the only difference from a VCD that I can find is that it allows adding more video to a single CD, up to 99 minutes.
- Widely compatible.
- Can be burnt to CD.
- Holds more video than an VCD or SVCD.
- Worse quality than SVCD.
- Only holds 90 minutes of video.
Options you'll get when running:
The current format king for video disks. Hopefully you know what these are, a video DVD disc can hold up to two hours of great quality video or around 4 and a half gigabytes of data.
- Great quality.
- Will play in any DVD player.
- Will only burn to a DVD.
- Large file size, bad for keeping on a PC.
Options you'll get when running:
1. Choose a show(s) (+ episode if applicable). 2. Where to export file(s) to. 3. Enable Myth cutlist? 4. Enable noise reduction? 5. Enable deinterlacing? 6. Crop overscan? 7. Audio bitrate. 8. Max. VRB bitrate. 9. VBR quality.
Using this option will result in a DivX encoded AVI file.
Probably the most well known and well used format for video files stored on PCs, DivX is used due to it's great video quality compared to the small file sizes it creates from video (you can fit a 1 hour 40 minute feature film onto a single CD, 700MBs, in very good quality). DivX uses MPEG-4 compression to create a file contained within an AVI container, resulting in the file ending in .avi.
DivX is widely supported by many standalone DVD players and PCs. In recent times, open source codecs such as XviD have provided a good alternative to DivX files. Generally, if you want to store your files on your PC then either DivX or XviD should be your main choice.
- Widely used/supported.
- Small file size.
- Good quality compared to size.
- Can be worse quality than XviD.
- Not as good quality as DVD/SVCD files.
Options you'll get when running:
The ASF format is technically not a specific codec for encoding files, more a guide as to how to present the included information to a PC. Anyways, basically in nuvexport it uses the MS-MPEG4 codec. You can find out a little more about it at http://episteme.arstechnica.com/6/ubb.x?q=Y&a=tpc&s=50009562&f=67909965&m=4660966841 .
Options you'll get when running:
MP3s are the most widely used format for storing audio files due to their small size and good quality. Choosing this option will convert the sound (not the video) from your MythTV recording into an MP3. Great if you just want to listen to the audio (like from a music video), pointless if you want some video.
- A simple way to a good quality audio file.
- More control over audio format/quality than you get if creating a video.
- No video.
- You can always rip the sound from a video file at a later date.
Currently I don't think this feature has been implemented in nuvexport, but if it were then you could expect it to give you a video file in a format capable of transferring to your Playstation Portable handheld games device, that is, MPEG-4.
- If you want to transfer to a PSP, it's just what you need.
- Pointless for anything else due to the PSP's low quality video file format and generally not widely supported.
Options You'll Get When Running
1. Choose a show(s) (+ episode if applicable). 2. Where would you like to export the files to? 3. Enable Myth cutlist? 4. Enable noise reduction (slower, but better results)? 5. Enable deinterlacing? 6. Crop broadcast overscan border (0-5%) ? 7. Frame rate (high=29.97, low=14.985)? 8. Resolution (320x240, 368x208, 400x192)? 9. Video bitrate (high=768, low=384)? 10. Create thumbnail for video?
Just like the PSP option, this is to create a file to transfer to a video capable iPod portable music player.
- Again, great if you want it on an iPod.
- Same as with the PSP; pointless for anything else.
Options You'll Get When Running
1. Choose a show(s) (+ episode if applicable). 2. Where to export file(s) to. 3. Enable Myth cutlist? 4. Enable noise reduction (slower, but better results)? 5. Enable deinterlacing? 6. Crop broadcast overscan border (0-5%) ? 7. Audio bitrate. 8. Video codec (mpeg4 or h264)? 9. Variable bitrate video? * If yes to VBR, enable multipass? * If no to multipass, VBR Quality. 10. Video bitrate? 11. Width? 12. Height?
MPEG2 to MPEG2 cut.
This option will use a cutlist that you've created in MythTV with the edit recording option to cut out all the sections you've marked and save it in the same format as the original (not sure if it's still .nuv, or even if it overwrites the original .nuv file).
Obviously (well, it wasn't to me the 1st time :o) ) you need to have specified a cut list before hand for this option to work.
- No loss of quality.
- Gets rid of marked sections, freeing up hard drive space.
- You can cut out sections alot more exactly with other programs pretty easily.
- You probably want to convert it to a smaller format anyway, don't you?
Options you'll get when running:
1. Choose a show(s) (+ episode if applicable). 2. Where to export file(s) to.
Export to .nuv and .sql
This option will create a new .nuv and accompanying .sql file with info on the recording that you can import into a seperate MythTV install on another system.
- Great if it's what you want to do.
- Also good for added peace of mind when upgrading current systems.
- Well... it's pointless if you don't need to do it.
Options you'll get when running:
1. Choose a show(s) (+ episode if applicable). 2. Delete from current system when finished? 3. Where to export file(s) to. 4. Create a new directory in which to store the files?
What To Use
Simply - XviD if you know you can play it back on your equipment, DVD if you either can't use XviD or want the best quality possible. Unless of course you have reason to use another.
Choosing A Program to Transncode
This takes place in two stages, first choosing a show name (the name is taken from the name used by MythTV's EPG), and then choosing any episodes (if any) of the same show.
Basically, you'll start off with a screen like this:
You have recorded the following shows: 1. BBC News (2 episodes) 2. Due South (2 episodes) 3. Ice Hockey (1 episode) 4. Monkey (1 episode) q. Quit Choose a show:
In this example, I can see that I have four different titled shows, two of which have two episodes each recorded, the other two only have the single episode.
Note that when nuvexport says "episode", this does not mean that the show is part of a series like most soap operas or cartoons, it is just a general term to describe all recordings. When recording more than one show with the same name (as seen on MythTV's EPG) then they will both be classed as an episode of the same show, such as the "BBC News" option above.
Note: As of mythtv 0.19, all live TV (ie. not something that you have specifically scheduled to record) that you watch through MythTV is recorded as a file into your default recording's directory, and MythTV keeps info on these recordings in it's database. These recordings will auto expire after a short period of time, and you can change this time in MythTV's settings.
Choosing A Show With More Than 1 Episode Listed
Choosing a show with more than one episode will take you to a new screen like the following:
You have recorded the following episodes of Due South: 1. (1/16, 7:00 PM) 544x576 MPEG2 (4:3) The pilot episode of a quirky drama series focussing on quintessential Canadian Mountie Benton Fraser, who will stop at nothing to solve a crime. Investigating his father's murder, Fraser follows the trail to downtown Chicago. Life in the big city is very different from the frozen north, as Benton and his trusty wolf Diefenbaker soon discover. 2. (1/17, 6:58 PM) 544x576 MPEG2 (16:9) Police drama series about a Canadian Mountie in Chicago. Fraser, with his wolf in tow, is hot on the scent of his father's murderer. But as he prepares to face the hired gun, the real killer steps out of the shadows. * Separate multiple episodes with spaces, ranges with '-', or * for all shows. r. Return to shows menu q. Quit Choose a function, or desired episode(s):
The screen gives you details of each episode of a single show that you have recorded, starting with the episode number (not shown here), the title of the episode (in this case there is again none for either episode), the date recorded (Month/Day), the time the recording started, the resolution the original recording is in (in this case it is incorrect, they are actually 720*576, as shown by MPlayer), the current format the recording is in (MPEG2 if you have a DVB TV card, or whatever you have chosen to encode files to in MythTV with an analogue card), the aspect ratio of the original recording (again, the second episode is actually incorrect, as shown by MPlayer. I will discuss what to do in this situation later), and also a description of the episode as taken from MythTV's EPG.
You can choose one or more episodes by typing in the number of an episode, followed by any addition episode numbers each separated by a space, a "-", or a "*". For example, if I just wanted to transcode episode 2 (recorded on 1/17), I would type the following and hit enter:
If I wanted to transcode both shows, I would type:
I am also given the option to return to the main shows list to choose a different show, or to quit nuvexport.
After choosing an episode to transcode, I will be taken to a screen like this (for the 1/17 recording, originally 2 in the episode list):
You have chosen to export 1 episode: 1. Due South: (1/17, 6:58 PM) 544x576 MPEG2 (4:3) Police drama series about a Canadian Mountie in Chicago. Fraser, with his wolf in tow, is hot on the scent of his father's murderer. But as he prepares to face the hired gun, the real killer steps out of the shadows. * Separate multiple episodes with spaces, or ranges with '-' c. Continue n. Choose another show q. Quit Choose a function, or episode(s) to remove:
This screen gives me the details of the show(s) I have chosen to transcode, and gives me the option to either remove one of these shows (chosen in the same way as above), to continue to the transcoding options, to choose another show to encode aswell as this one, or to quit nuvexport.
If you type "n" and hit enter, you will be taken back to the original show choice screen, though this time the episode list for the chosen show will have changed to represent the fact that you already have one of the episodes chosen for transcoding, and also show an option to go straight to the encoding options screen with the previously chosen episode, much like choosing the "c" option in the previous screen. With the above example, the resulting screen will look like:
You have recorded the following shows: 1. BBC News (2 episodes) 2. Due South (1 episode) 3. Ice Hockey (1 episode) 4. Monkey (1 episode) d. Done selecting shows q. Quit Choose a show:
If I now choose the Due South option again, I will be shown the same screen as the episode selection screen previously, only with the previsouly chosen recording missing from the episode list.
Choosing A Show With 1 Episode Listed
If you choose a show with only a single episode listed (say, a uniquely named film you have recorded, or an episode of a series of which you have only recorded this single episode), you will be taken to a screen exactly the same as the one above where you have chosen an episode to transcode (starting "You have chosen to export X episode:").
As an example, say I choose the show Monkey and haven't chosen any shows or episodes to transcode previously. I will be shown a screen like:
You have chosen to export 1 episode: 1. Monkey: The Great Journey Begins (2/17, 6:00 PM) 544x576 MPEG2 (4:3) Cult serial from Japan following the origins of Buddhism. Tripitaka and Monkey arrive at a village which comes under regular attack from a greedy monster named Pigsy. * Separate multiple episodes with spaces, or ranges with '-' c. Continue n. Choose another show q. Quit Choose a function, or episode(s) to remove:
If you have previously chosen another recording to encode then this will also be shown in the list. All options are the same as the equivalent screen when choosing an episode above.
From here, I can either choose another show to add to the list, or continue to transcode this show.
What To Choose
All shows will use the same transcoding options chosen, so if you want there to be any differences between the quality or transcoding options chosen for a show, you'll have to do it in a seperate run of nuvexport (you can just open another command shell and run nuvexport in there if you really want to do it at the same time, though this will slow things down for both recordings).
Transcoding takes a long time, especially if using Transcode (around 20 hours for a 2 hour show on an Athlon 2500+ processor). Unless you're planning on waiting days for all encodes to complete, you may want to do them individually. I find two 45 hour shows using Transcode with multipass and noise reduction turned on will happily complete overnight.
Add note on differing ratios between files --Pepsi max2k 12:41, 8 October 2006 (UTC)
Where To Export Files To
The first option you'll be presented with after choosing your recordings to trascond, is where you want the resultant transcoded file to be saved to. The default option will look like this:
Where would you like to export the files to? [.]
This means that the file will be saved to the directory that you were in (shown on the command prompt) when you started nuvexport. If you wish to keep the default option, just hit enter. If you wish to change the directory, enter in the full path of the directory you wish to save the file to, like
and hit enter. The trailing / makes no difference, so you can just as easily type /home/user/movies instead.
What To Use
If you dual boot, especially between Linux and Windows, then you may want to save the files to a shared FAT32 formatted partition for easy access to the file from windows.
If you have a single location you usually save files to then you can change nuvexport's default export location in the nuvexportrc file (see final section of this guide). This will then be shown instead of the [.] default location when you run nuvexport, and if needed you can change the location in just the same way as you do with the default option.
Myth Cutlist Option
The cutlist option can be changed by typing Yes or No when given the option to enable the cutlist (the default is yes). You can also just hit enter to accept the default configuration.
- Choosing Yes for this option will enable the cutlist if present.
- Choosing No will disable the cutlist whether present or not.
This option is used along with MythTV's inbuilt editing tools which can add cutpoints to a recording, marking parts of the file to be ignored during playback / transcoding. Alternatively MythTV's commercial flagging can be used to automatically cut out parts of a recording (hopefully just the commercial parts, though i've found it's not the best at this, and prefer to manually edit myself). See the Removing Commercials wiki page for more info on MythTV's editing abilities. For both, you'll want to take note of where the edit points are in the file (ie. the length of each part between the edits) - i'll explain why at the very end of this section.
Chosing Yes to the cutlist option in nuvexport tells the program to only transcode the parts of the recording that have not been edited out with the cutlist. This can save a lot of time when transcoding.
Please note that in the past, nuvexport's recognition of edit point times hasn't been totally exact, so you may want to stick your edit points around a second before / after the required part starts / ends to avoid losing any information. You can then cut out the remaining parts perfectly with a seperate video editing program such as avidemux (available for both Linux and Windows).
Chosing No to this option will ignore the cutlist and transcode the whole of the recording, regardless of whether any manual editing or commercial flagging has taken place.
What To Use
Use it, always. Think about it - from when you start a recording, there may be 4 minutes til the show starts, 8 minutes of show, 4 minutes of commercials, 8 minuts of show, and another 5 minutes recorded after the show. That's nearly half and half show / non show recording, so cutting it out can save you all that time.
Just keep in mind that the timings may not be exact, and you should do any fine editing of the file in a seperate editing program (it only takes an extra minute, as long as you remembered to record where all the commercials were ;o) )
Noise Reduction Option
The noise reduction option can be changed by typing Yes or No when given the option to enable noise reduction (the default is yes). You can also just hit enter to accept the default configuration.
- Choosing Yes for this option will perform noise reduction on the file while transcoding (accomplished by enabling the yuvdenoise filter in Transcode and FFMpeg).
- Choosing No will not run any noise reduction.
It can also be enabled using the flags --denoise (or --nodenoise to disable it).
Noise reduction (also known as "denoising") is used to remove "noise" - slight fuzziness of the picture - from the video recording, improving the picture quality. The improvement you will notice will likely depend on your source recording. If there is some noise, it should improve the quality. If your original recording has very little noise, likewise the improvement you will witness by using noise reduction will also be small.
The noise reduction with nuvexport (when using either the Transcode of FFMpeg encoders) is accomplished by enabling the Yuvdenoise filter.
For more information on the yuvdenoise filter, please visit the following page on the Transcode website: http://www.transcoding.org/cgi-bin/transcode?Filter_Plugins/Filter_Yuvdenoise
There are various modes that Yuvdenoise can run in. By default it runs in mode 2 with nuvexport, this being the "Fast mode" which uses "only Pass II (bitnoise-reduction) for low to very low noise material". In otherwords, if you do have a real noisy signal (probably only likely if you're using an analogue broadcast source, not digital tv) then you may wanna use the slower, more thorough mode. See the nuvexportrc notes below for this.
Officially, using this filter will increase the time to encode the file by a factor of three (ie. it takes 3 times longer). In reality, I can tell you that's pretty near the truth. Expect the thing to slow down your transcoding by at least twice the time it would take without.
Please open each image in seperate, full sized windows to a) view the full size version and b) so you can switch between windows and the images should be perfectly aligned to view differences between each.
You'll probably note the slight lines in the sky caused by the multipass. Ermm.. I'm at a loss to explain that... Multi should be better.. but anyways... This is officially the best quality you can get as far as noise reduction goes. You'll notice that the colour in the next image is slightly different (mainly in the right sand dune). That's actually the correct colour, this one is discoloured (slightly darker), but frankly i think this one looks better.
Note the slight bluryness of the rock structure compared to the previous image, the bluryness of the horses rear, slight bluring of the ground, the very minor loss of sharpness to the edge of the text, and the patchyness of the sky to the left. As before, the differing colour from above is slightly different. This image actually contains the closest colour match to the original recording (ie. *the same*).
Ok, the sky isn't so liney without multipass, but checkout the rock structure - much more blury than even multi + no noise reduction. The ground has also lost a lot of detail compared to using multipass.
Pretty much the same differences between no multi denoise & nodenoise as with multi denoise & no denoise. The sky gets more patchy, ground looses detail, all lines are more blured, different colouring... The worst Noise Reduction situation (obviously - it's disabled). Compared to the first image, the differences in the main rock structure would prompt me to buy glasses if I didn't know an encoding filter could solve the same problem.
As with many other things, the default option for noise reduction can be changed in the nuvexportrc file (see penultimate section on this page). This is accomplished by including either the line
noise_reduction = yes
to enable noise reduction by default, or
noise_reduction = no
to disable it by default.
As mentioned earlier, you may want to disable the "fast mode" of yuvdenoise if you have a particually noisy recording. This can be accomplished in the nuvexportrc file by commenting out the line
fast_denoise = yes
Also in nuvexportrc, you can allow the yuvdenoise filter to actually carry out it's own deinterlacing if you are using the FFMpeg encoder. You should note that FFMpeg's own deinterlacing filter works much better so I'll let you search for the option youself if you really want it.
What To Use
If speed isn't important, enable it. It does no harm and will does some good for the picture.
Just take a look at the differences between the multi-denoise image and multi-denoise image. If you don't like the very minor darkening caused by noise reduction, and don't mind the minor loss of sharpness and added patchyness, then disable it. Otherwise, if you want to keep the best detail with slight (and arguably improving) darkening, then enable.
To enable deinterlacing of the file via a flag, use "--deinterlace". Otherwise, type Yes or No when given the option to deinterlace (the default is yes).
- Choosing Yes for this option will perform deinterlacing on the newly created video file so that it is permanently deinterlaced. I've no idea what type of deinterlacing filter is actually used.
- Choosing no will leave the video file alone, retaining it's interlaced picture.
More info on what interlacing and deinterlacing is can be found at http://www.100fps.com
But here's a quick overview: A video recording consists of a number of frames. Each frame is played back one after another real quick to give a moving image - the video. Each frame is actually made up of two images, woven between each other (interlaced) to help smooth playback.
All TV broadcasts are interlaced, and TV's are produced to show these interlaced broadcasts without the strange interlaced lines.
PC monitors don't like interlaced video, and will show the interlaced lines. Don't ask me why.
Chosing whether to deinterlace your video or not can be slightly complicated.
- Most media players can deinterlace video files themselves. I know Xine /Kaffeine on Linux have an option for it.
- TV monitors are designed for optimal playback of interlaced video.
- Portable media players will not deinterlace stuff, and may show horribly distorted video if it is interlaced.
- Interlaced video should actually be better quality (they show slightly more detail that deinterlacing removes).
Unfortunately, although TV monitors are designed to effectively deinterlace video themselves, having played interlaced files on it via an XviD file on my DVD player, the image retains the original interlaced lines. I've no idea if this is a problem with my player, or a more general problem.
Also, playing video on my TV with my graphics card connected directly to it suggests that my graphics card (made by ATI) is only outputting the deinterlaced signal. I know Nvidia cards are better at this stuff.
Possibly the most important factor in deciding is this:
- If you choose to deinterlace the file, it will be permanently stored deinterlaced with the deinterlacing algorithm used at the time you encoded it. If a better a way of doing it is invented in the future, you'll be out of luck and won't have any use for it. In this case, it could be seen as better to keep the original file how it is so that you can take advantage of any deinterlacing options in media players on your PC that may well improve in future.
What To Use
Right, the big question, and you really wanna take a few factors into account:
1. Playing on a PC monitor suits deinterlaced video, though you can do this on the fly with some media players. In this case, the results are little different than choosing the deinterlacing option.
3. Playing on a TV via other media. In my case, interlaced video looks horrible. So you may wanna deint.
4. Playing on a portable media player. Deinterlace it.
5. I want the best quality possible. Leave it interlaced. In my experience, it'll look horrible on whatever you try to view it on, and you'll have to transcode the video to a deinterlaced file to make it look good on a lot of things. This in turn will actually loose quality due to transcoding it again. Ok, the deinterlacing method used may not be the best available, but you'll probably be grateful if you play it on anything other than a TV, and in some cases even on a TV.
Personnaly, I'll never leave a file interlaced again.
Crop Broadcast Overscan Option
The "crop broadcast overscan" is available due to many television broadcasts having a slight black border - padding - around them. This is added by the broadcasters as the screen of many TVs actually extends beyond the physical TV frame, and therefore the padding is added to allow the broadcast to better fit the viewable area of the TV screen.
The end result of using this option on a recording with the padding is that a small amount of the video is cut from around the borders, also resulting in a cleaner edge to the picture. The examples below show this, and you should note that the large(ish) black area to the left of the image is due to the resolution width I used being longer than the actual video image (see notes on resolution width/height) – it hopefully won't appear in your videos but is used here as it shows off the “bleeding” effect in the un-cropped image better. In the first image it seems the area that is eventually cropped in the second image (about 10 pixels between the black border and image) is actually a repetition of the main image, so cropping shouldn't actually loose any of the actual picture, though whether you'd notice if it did or not is another thing.
Note: Using the crop broadcast overscan option on a video that doesn't have the black padding around the edges to begin with may end up with you having black edges around your new encoded video. You should probably check the original .nuv video file by playing it in MPlayer or another media player to see if it has any padding to the left/right.
The following images are the top right corner of one of my XviD encoded videos. The slight difference in quality between the two shouldn't have anything to do with the cropping, just my PC being a little strange..
Note the slight “bleeding” of the picture into the black border.
Note the dissapearance of the small (2 – 3 pixel) black border and the removal of about 10 pixels at the edges of the pictures. Also note the cleanness of the edge to the picture/black border.
What To Use
That said, if you are only ever planning on playing the file on a regulart CRT TV, then you may well wish to keep the overscan. Without it, the video will extend to the very edges of the CRT screen, making some of the video image none viewable and making the whole image seem slightly zoomed in. You could also get rid of the border if you ever needed to, though this would likely involve re-encoding the file and loosing a little quality over the original.
Take pics of cropped / uncropped playing on my crt TV + monitor. --Pepsi max2k 17:02, 15 October 2006 (UTC)
Audio Bitrate Option
About Audio Bitrates
Audio data makes up the second largest part of the file information in a video file, the first being the actual video. This means that using different audio bitrates can significantly decrease or increase the eventual size of the transcoded file.
Different formats of videos use different formats of audio to go with them. In nuvexport's case, the most appropriate audio format is chosen for the video format you wish to transcode to. Although there may be some difference between the audio formats, there's not much you can do as far as changing them goes - if you want better audio then either increase the bitrate or you'll need to use a different video format to encode to with a better audio format.
Generally, the higher the number the better. Audio contains two main numbers detailing their quality.
Secondly, the bitrate - the amount of bits used to store audio data every second - makes a huge difference in audio quality. A few years ago when I used Napster (the real version, not the crappy legal one) virtually everything was stored at 128 kbps. As internet speeds have become faster, so the bitrate of various files has become greater. Nowadays, most decent online music stores will sell you music at 192 kbps. This should be pretty telling of the bitrate that is deemed acceptable quality, at least for music.
Of course - music is one thing, and the majority of the time you're encoding voice, which requires a lot less bandwidth (lower bitrate) to create a good reproduction of the original. Nuvexporet's default for many cases is 128 kbps. As mentioned, people used to trade music files at this bitrate, so it can't be to bad. For most TV recordings it'll be pretty good, and totally acceptable for the majority of us.
Again, if you do have a good audio setup at home, you may want to put a little more effort into your audio thinking. On a good system, the difference between 96 kbps and 192 kbps will probably be pretty audible, even if the former would be perfectly acceptable to a lot of us. The difference between the various bitrates has been widely detailed on numerous websites - just do a google search for "audio bitrate comparison" and i'm sure you'll get all the info you need.
As a guide, UK DVB-T (Freeview) broadcasts usually use an audio bitrate of 192 kbps. This can be as high as 384 kbps, and I've heard of the main BBC channels using 256 kbps, but my recordings never show anything other than 192 kbps. Becuase of this it is pointless in using anything higher than 192 kbps as a bitrate for your recordings as the quality won't get any better if you chose a higher bitrate than the original.
XviD and DivX
XviD and DivX files generally use MP3 encoded audio at 44100 Hz and between 8 and 320 kbps.
The default option in nuvexport is 128 kbps MP3, and this can be changed between 8 and 320.
SVCD videos contain MP1 audio at 44100 Hz between 32 and 384 kbps.
The default option in nuvexport is 192 kbps, and this can be changed between 32 and 384.
DVD videos contain MP2 audio at 48000 Hz between 32 and 1526 kbps.
The default option in nuvexport is 384 kbps, and this can be changed between 32 and 1526.
ASF files can technically contain any type of audio and video codec at any rate.
In nuvexport, the MP3 codec is used and therefore, like DivX, can be changed between 8 and 320.
The Ipod video is encoded with AAC audio at 48000 Hz between 8 and 320 kbps.
In nuvexport the default option is 64 kbps, and this can be changed between 8 and 320.
What To Use
Unless you're in a position to state that you can tell the difference between 128k and 192k audio on your system when watching videos, and are affected by this difference, then I can safely say that you can stick with the default options for audio on most of the above formats. You really won't lose much, if any, information from the audio by chosing anything around 128 kbps, and this is also the de-facto standard for audio on many video files available over the internet.
That said, for the ASF and Ipod options, you may want to increase the 64 k bitrate to 128 k as the difference will be noticable. That said, these formats are meant for short-running shows crammed into tiny drives on portable music players and therefor would both suit a smaller file size and listened to through headphones that aren't meant to provide the best audio to the listener.
Variable Bitrate Video Option
Rewrite to stress CBR *def.* lower file size --Pepsi max2k 19:18, 12 October 2006 (UTC)
The variable bitrate video option refers to the way in which the video images are encoded. Commonly, videos are encoded with Constant Bitrate (CBR) meaning that each frame in the video has the same number of bits (same amount of information) making up the image in the frame. Variable Bitrate (VBR) means that each frame will use a bitrate appropriate to the amount of information that is in that frame.
Using constant bitrate, each scene would use the same amount of bits (determined by the Video Bitrate option in nuvexport) to make up each scene. Using variable bitrate, the bits would be allocated where they are most needed (averaging out to the Video Bitrate option in nuvexport - eg. if you used a 1000 kbps bitrate, around 900 could be given to the street scene frame and only 100 to the black frame).
Officially, VBR should produce a video of smaller size compared to a CBR file with the same bitrate. Unfortunately that doesn;t appear to be the case in nuvexport, and almost all VBR files will be slightly larger than their CBR counterparts.
Also of note is the fact that, being less common than CBR, VBR is also supported on less playback devices. If in doubt you should check the documentation for your equipment but most modern DVD and portable media players should hand VBR video OK.
For more information on VBR, please see the following websites:
As with the noise reduction example images, you may well wish to open each image in seperate, full sized windows to a) view the full size version and b) switch between windows and the images should be perfectly aligned to view differences between each.
Firstly - a few notes.
2) The actual quality does seem to vary between CBR and VBR seeming to have the greater quality in seperate images. Generally, where CBR images seem to show greater quality, these are simple frames with little information in and the VBR command obviously believe it acceptable to save the bits from these frames to use elsewhere.
4) Overall the differences were extremely small, but seem to go in VBR's favour. Just.
Above shows a minor loss of quality in the CBR image compared to the VBR one - to be expected as this is a relatively detailed scene. The ground is overall more blurred in the CBR image, most notably in the far off sand dunes at the back left of the image.
Note the extra texture detail in the columns, floor and arched rock in the VBR image, blured in the CBR one. Again, a more detailed image so you'd expect this.
A strange one this. There is a difference, but the very slight sharpening of the hyroglyphics on the back wall and texture of the front rock wall actually occurs in the CBR image, with the VBR one showing these parts slightly blurrier. This is probably something to do with the image being relatively simple, and the VBR has decided to save some bits on this image.
As with the previous image, the CBR one here is actually more detailed than the VBR one, with some of the texture (specifically small potholes) more pronounced on the CBR image, with an overall more blurred feel to the VBR one. Again, this is a very simple image, so someone's obviously decided you don't need to see that much detail in it and saves the bits for somewhere else.
This is a cropped part of a fith frame because saving the whole image as a jpeg file actually ended up showing no difference whatsoever between the two. Unfortunately the second has now been saved twice (damn GIMP's horrendously unuseable user interface) so the differences now seem more pronounced than they are in the original frame. Nevertheless, the CBR image is once again more blured than the VBR image, noticably in the hair behind the ear and beard infront of the ear.
VBR: Good with the detailed. CBR: Bad with the detailed.
VBR: Bad with the simple. CBR: Good with the simple.
When chosing options for nuvexport, you will be asked the following question:
Variable bitrate video? [Yes]
To accept the default answer (Yes) just hit enter, and then you will be asked about multipass and / or vbr quality options. If you wish to use Constant Bitrate instead of Varibable Bitrate to encode your video then type No. You can also change the default option in the nuvexportrc file.
What To Use
Unless you (really) wish to play your transcoded file on a piece of equipment that specifically does not support VBR video (and you don't want to update your equipment), or you have a specific need for using CBR, then VBR is pretty much the way to go. It'll leave most of the recording looking the best it possibly can do at your chosen bitrate.
The only other reason to use CBR is if you have a strict file size requirement and can't be bothered to go through my near-perfect VBR bitrate calculation method (see begging of this guide) or you don't have the time to perform a VBR multipass (2x as long as CBR).
I've never used anything but VBR.
The multipass option is only available if chosing Yes to variable bitrate video, as it a technique specifically used with VBR encoding to ensure a chosen bitrate averages out correctly throughout a whole file.
During a multipass encoding, the encoder will perform a "first pass" on the recording, analyzing it and keeping a record (stored in a seperate file) of where to use more bits and where to use less bits for frames in the video. It will distribute the bits in order to keep the overall bitrate as close as possible to a given average bitrate given by the user. This is what you will be asked by nuvexport next if you chose yes to VBR and multipass.
Using VBR Multipass should theoretically give you the best possible quality for an encoded video file, but obviously due to the fact that it performs two "passes" on the recording, it takes exactly twice as long as a single pass (using either CBR or VBR Quality).
For more information on multipass encoding, have a read of this article at Afterdawn.com.
Following are four comparison frames taken from two XviD files (of a 1 minute 23 second clip), both using exactly the same encoding options other than:
The second was encoded using the closest VBR Quantizer option possible, 3, producing an eventual file size of 12,945,698 bytes (12.3 Mb).
In the first two images, the Quantizer image is quite clearly more blured than the Multipass image. Being a very simple image, I'd have expected the other way around, but never mind...
If there's a difference in this one, I ain't seeing it. The JPEG file sizes also suggest very little difference.
This time the Multipass image is more blurred. Infact, the Quantizer version is virtually identical to the Constant Bitrate encoded version of the same frame - see the CBR pic here. Note that the CBR bitrate was set to 1000 kbps, and the Multipass set to 1100 kbps. So in this case the extra 100 kbps would obviously make no difference to the scene.
In the final two images you can see that the Multipass image is again slightly more blurred than the Quantizer version, noticably around the male's forhead and the text on the ID card.
What To Use
Infact, it would seem the only reasonable reason to use multipass over the quantizer option is the control you are given over the exact eventual file size, whereas with quantizer you are given a limited range of options that one can only presume will produce output virtually identical to a corresponding bitrate (see VBR Quality option below).
The only real reason to use a VBR Quality option is if you do not have the time to spare to run multipass's two passes on the video, taking twice as long as the quantizer's one pass.
Because of this, I would always recommend using Multipass over VBR unless you are time limited, and use the method given in the "Preparing You Recordings" section to calculate the optimal bitrate for your recordings.
VBR Quality Option
More correctly known as the Quantization or Quantizer value, the VBR Quality option is only available if chosing No for the multipass option (and therefore yes to variable bitrate video).
If you chose not to run multipass encoding on a VBR file, there is no time for the encoder to determine how to distribute the bits evenly throughout the whole file, and so will encode the video using a predetermined best-guess method to encode various parts at lower bitrate and other parts at higher bitrates.
The VBR quality option is used to determine this eventual quality of the VBR video file using a numbered scale from 0 to 31, 0 being the best quality option and 31 being the worst quality.
Due to the fact VBR does not run a first pass to determine where best to distribute the bits throughout the file, the quality of using VBR without multipass and a VBR Quality value instead will be of lesser quality than using multipass when comparing a multipass file with a bitrate compared to a quality based file or a similar quality value.
Differences Between Quality Options
A quantizer value of 1 is considered overkill for many applications. Likewise 31 is out of the question for anything. Most places will recommend a quality between 4 and 6, and I can confirm that quality differs little between these and is quite watchable. Personally I'd try and use 3 if you have the Mb to spare, it's noticably better quality than 4. Q1 is very good quality, though if you want quality that good you might as well be burning a DVD and possibly not transcoding at all.
A test clip of 65 seconds was used to demonstrate differences between the various quality options. Below I'll give details on the eventual file size with the different Q options, equivalent CBR or VBR Multipass bitrate, the apparent quality of the files while watching and some screenshots of various frames.
Quality 1: 45.3 Mb
Quality 3: 10.1 Mb (equivalent to 1100 kbps)
Quality 4: 7.4 Mb
Quality 5: 6.1 Mb
Quality 6: 5.1 Mb (around 520 kbps)
Quality 10: 3.6 Mb
Quality 15: 3.0 Mb (around 240 kbps)
Quality 25: 2.5 Mb
Quality 31: 2.4 Mb
1: Very sharp, great q.
3: Little washed out, still good q.
4: Washed out, slightly blurred, still good q.
6: Washed out, blury, but still quite watchable.
10: Blurry & artifacts around edge of images. Less watchable on large screen.
15: Blurry, edges fucked, noticable even on small screen.
25: Web stream like quality, poor to watch on small screen.
31: Don't even think about it full screen. Even on an iPod it'll give you a headache watching.
In the above images you can see the image progressively getting more and more blurred. Q1 deffinately looks more sharper than Q3, thought the extra 35 Mb needed to accomplish this is deffinately overkill. Differences between Q3 - Q4 and Q4 - Q6 are small, again just more blurring, but the lowest quality I'd be happy with is Q4 unless space was really a problem. Q10 is quite blurred and starting to lose alot of detail, while Q15 is also gaining colouration differences. Q25 is horrible, Q31 looks like it's been put through the washer.
Differences for above and below are pretty much the same as the first lot, but are a little less obvious to spot.
Video Bitrate Option
Only available if chosing No to VBR or Yes to VBR then Yes to Multipass.
The Video Bitrate is the single most important factor in determining the final visual quality of your transcoded recording. Bitrate is the number of bits used to store information in a file in a given timeframe. In nuvexport, this is represented in kilobits per second (kbps). The more bits you assign, the better the picture will look.
The evntual file size of a recording is determined by two main factors. The greatest of these is the video bitrate, the second is the audio bitrate. The video bitrate is by far the greater of these two, but note that they are both represented in terms of kbps, therefore a recording with, say, 1000 video bitrate and 128 audio bitrate will have a final total bitrate of around 1128 kbps, and you could probably create a decent estimate from that figure for eventual size of the file based on the total running time.
Obiously, this also means that using a lower audio bitrate means you can use a larger video bitrate without increasing the file size.
- amount of fast moving action in the scenes
- the desired quality
- the desired final video file size
- the compression type used (each codec has it's own specific overhead)
Therefore, for a given file size, you will reguarly need to use a different bitrate option depending on what recording you are transcoding, what codec you are transcoding it to, etc.
As with the transcoding of any file, however great a bitrate option you chose, you can never exceed the quality of the original, ie. you cannot transcode a 5000 kbps file at 6000 kbps and expect it to be any better quality than transcoding at 5000 kbps.
Officially, VCR is supposed to have a bitrate of around 2000 kbps, though the difference between a VCR and XviD at 1000 kbps is not really noticable. Also, PAL has an official rate of between 4000 and 6000 kbps, and HDTV is greater than 15,000 kbps.
- XviD, DivX:
- Default is 960.
- A common average is around 1000.
- The maximum bitrate you can (should) use is around 5000.
- The minimum is (I presume) 1.
- Although officially supporting a bitrate up to 2600 kbps, you can only choose quality options in nuvexport.
- VCDs only support a bitrate of 1150 kbps and therefor there is no option to change this in nuvexport.
- I'm guessing the same as VCD.
- For DVDs you get to chose both the max bitrate and a quality number.
- Default is 6000.
- A common average is around 5000.
- The maximum bitrate is around 9000.
- The minimum is (I presume) 1.
- Default is 256.
- Maximum is up to about 6000.
- Minimum is 1.
- There is no default, and I couldn't tell you what an average is. Whatever you have room for I guess.
- Max is 768.
- Min is 384.
- iPod (MPEG4)
- Max 2500.
- Min 1.
- iPod (H.264)
- Max 768.
- Min 1.
The following examples were made using XviD and Constant Bitrate where so as to ensure the images were made up of the exact amount of bits given. If you use VBR, the quality of different frames will vary but average out around the same quality.
Please note that the resolution of the file should not have any affect on the quality in terms of bitrate as, when viewed at the same size (fullscreen), both images should contain the same amount of bits and therefore look exactly the same. See the resolution section for more.
Before I start, here's a list of the file sizes they created (for the 65 second clip):
- 250 Kbps: 3.1 Mb
- 500 Kbps: 5.0 Mb
- 750 Kbps: 6.8 Mb
- 1000 Kbps: 8.8 Mb
- 1250 Kbps: 10.7 Mb
- 1500 Kbps: 12.3 Mb
- 2000 Kbps: 13.8 Mb
- 5000 Kbps: 14.7 Mb
As you can see, the differences between 1250 & 1500, and 2000 & 5000 are, well, non-existent. That's not to say that overall the whole movie won't benefit, just it won't be too noticable. Surprisingly, 500 kbps is quite watchable in it's native resolution. 250 is very blurred, 750 is ok at full screen. 1000 is perfectly fine, and the difference between that and 5000 kbps isn't really noticable.
What To Use
Before finally chosing a bitrate, you should be aware that some devices have minimum / maximum bitrate limits for some codecs. As long as you keep withing normal limits you should be ok, but if you want to produce, say, 6000 kbps XviD files you should probably check that your DVD player / PMP supports this.
For simple cartoon like, short shows you can get away with a bit less and still have the thing very watchable. I use around 500 kbps for simple, plain background 10 minute cartoons, giving me an end file size of 50 Mb.
If you want more quality or are storing single shows on DVDs, you should use a much higher bitrate, around 5000 kbps.
At the end of the day, anything above 800 kbps will look OK in many situations, and anything above around 1100 will look fine and have a lot of detail. The only real reason to change bitrates is your file size.
If there's a bitrate you're happy with and you don't care about sizes, just use that all the time.
Resolution (Width/Height) Option
nuvexport will automatically detect the aspect ratio of the original video file for you. It will suggest a default width for you (624 pixels) which you can either keep or change. After hitting enter, nuvexport will provide a recommended heigh value for the video file based on the entered width and the original aspect ratio.
Checking ratio first
The first thing you wanna do when choosing a width and height is check the resolution of the original video that you wish to encode. The best way to do this is open them in Mplayer or another media player to see if it opens in a wide, thin window or in a squareish one, meaning it's either widescreen or regular 4:3 aspect ratio.
Another thing you'll notice when you do this is the size of the window. I live in a PAL broadcast area where all over-the-air video is broadcast in 720x576 for 4:3 ratio and 1024x576 for 16:9 widescreen video. This is the true size of the recorded video image within the .nuv files.
Recordings Shown With Wrong Ratio Detected
Unfortunately if you start to record a widescreen show/advert then the whole recording will be recognised as widescreen, and viceversa with 4:3. If you watch the show in MythTV it'll automatically resize the output whenever it changes ratio, but if you encode these recording the normal way then you'll end up with a 4:3 recording stretched to the widescreen ratio, either with black borders at the top/bottom or with the left and right edges chopped off. Never fear though, you can force nuvexport to encode the thing in the right ratio, but it's a little more complicated than just altering the width and height.
# # If nuvexport is having trouble detecting the aspect ratio of your recordings # (MythTV still hard-codes all software-encoded files as 1:1 regardless of # the true aspect), set this option to one of the following: # # force_aspect = [ 1:1 4:3 16:9 2.21:1 ]
All you need to do is uncomment the final line and delete all but the aspect ratio that you want to use, so that the final line looks something like this:
force_aspect = 4:3
With the above line, nuvexport will recognize all recordings as a 4:3 aspect ratio and encode them as such. Remember to change this line back to being commented out (with a # infront of it) afterwards, otherwise you may end up wondering why your widescreen recordings are all square!
If you want to keep a video with both widescreen and 4:3 ratio stuff in, then I'd either choose to force a 4:3 ratio and encode at the default width/height, or force a 16:9 ratio (if you need to) and encode at the default with height. This way, the video image should be stretched/squashed into the end resolution, and you should be able to change the default resolution of the video while playing it back in a media player (Mplayer gives options to switch between 4:3 or 16:9 ratios). That way, the video image will be reshaped into the correct ratio whenever you need to. Whether this affects the quality of the image, I'm yet to tell.
Calculate The Right Resolution
Due to limitations in the encoding software (and graphics hardware), nuvexport (nor any other encoding program) will not let you have perfect widths and heights for your resolution of video, as both options must be multiples of 16 (not one 16, one 9) and 9 is not a multiple of 16. For example, when choosing a width and height for a widescreen (16:9) video, both options can only be multiples of 16. Because of this, you cannot choose a perfect 16:9 ratio for the end video file. By default nuvexport will choose a 624 width and 352 height for a widescreen video. Those who paid attention in maths will notice that 352 is not an exact multiple of 9 (the closest is 351, 39 times nine). Regardless, this does not actually affect the original video image, as detailed a few paragraphs down.
For more information on why widths and heights can only be a multiple of 16, take a look at this message board thread, http://forum.doom9.org/archive/index.php/t-17895.html, specifically the third to last post which mentions that, given an original 640 x 360 recording, the offset in height is better than lowering the width (and therefore overall image size) and loosing quality, but given that most (at least in the UK) broadcast images are at least 720 x 576 then you'd be lowering the quality either way. Unless of couse you use 720 as default height... oh gawd... don't get me started again...
Affect on Quality
The end resolution of the file should not affect its quality. The bit rate for the video remains the same regardless, meaning there is as much information in a large size video than there is in a smaller one with the same bit rate. Because of this, when viewed at the same size, the image will look exactly the same regardless of the actual size used.
Well, I say the size won't affect the quality, but while trying to create a 1024 x 768 resolution file from a widescreen recording, I found that the resultant picture was a little more “patchy” than a file at the original resolution when both were viewed at the same size. It's hard to get a picture to demonstrate this as, when paused, both images look virtually identical. But basically you can expect to see largish blocks of similar colour on moving images, basically meaning less fine detail than when using the original video's resolution (or smaller). So I'd suggest sticking with the default options for witdh and height.
Basically, your original video will keep it's original width to height ratio but the picture width/height as a whole will change and be filled with black where it is not filled by the original video picture.
To explain, I have a few images below. All are screenshots of an identical frame from a video encoded from an original widescreen (16:9 ratio) source. That is, the actual picture is 16 digits wide to every 9 digits high. They were all encoded exactly the same way other than having different widths and heights entered.
624 x 352
In the above image, I have chosen 624 for the image width (the default) and 352 for the height (also the default). As you can see, the result is that the original 1024x576 widescreen image that has been resized down to a 624 width. Technically that should mean a 351 heigh if keeping a true 16:9 ration, but seeings how you can't do that (as mentioned above) then there's possibly a black line of a single pixel's height on either the top or bottom edge. If you can spot it, I'll give you a tenner.
720 x 576
This is the official width and height a regular 4:3 ratio show broadcast in PAL. The above example shows how the original widescreen wideo has been resized to 720 pixels wide and the equivalent height needed to keep it's 16:9 ratio, where it has been filled with blackness.
720 x 400
The closest you can get to a widescreen ratio with 720 as the width, though this image shows that the end video image is slightly smaller than the full video window size, resulting in black borders to the left and right, much like above.
What To Use
As mentioned earlier, the best possible quality should in theory be achieved by retaining the original file's resolution. As I found while transcoding a widescreen recording to it's original 1024 width, the end image actually turned out to be a little patchy. I've also read elsewhere that actually having a smaller resolution will produce a better quality video (something to do with num. of bits in each pixel or something...). And anyway, if you want to retain best posible quality, why the hell are you transcoding anyway? Keep the original MythTV recording on hand if you really need it.
With the above in mind, if you really want to, you can edit the .nuvexportrc file to transcode to a default 640 pixel width, and it should calculate the height on it's own, but remember this will be a multiple of 16 (368 by default) and will result in possible black borders around the edge of the file).
Ohh yes, by now you've decided what options to use, and are getting bored of changing them each time. Well, all your problems are solved with the nuvexportrc file, which you may have seen mentioned in many previous sections. Here's where I explain all...
First I should say that Nuvexport also checks your /home/user folder for a hidden copy of this file before looking in /etc. So, if you don't want to mess up the default version of the file, then you can copy it to /home/user and rename it to .nuvexportrc, and customise away. If you mess up, you can always re-copy the original file again.
The file itself is pretty self explanatory, so I won't go into it much. But you can expect to find options to change the default starting encoder (to ffmpeg, transcode, or mencoder), the default encoding mode (divx, xvid, etc..), the default aspect ratio (which I went over in the aspect ratio section), and generally anything that you can change in the main program.
Nuvexportrc Only Commands
When presenting the list of available recordings to transcode, the above will ensure that only ones which have been edited (contain a cutlist) are shown. Handy if you always cut out parts from recordings and don't want to accidentaly start transcoding a non-edited file.
date=%m/%d, %i:%M %p
This allows you to alter the makeup of the dates presented in nuvexport. Above is the default (month/day, hour:minute AM/PM). See nuvexport for more.
crop_top = 2
Along with _bottom, _right and _left, you can fine tune your cropping percentage for various sides of the recording.
gencutlist = no
This tells MythTV to generate a cutlist from any commercial detection it has automatically performed. Saves you editing yourself, but only if you're happy with what commercial detection picks up in the first place.
fast_denoise = no
Theoretically this should tell the encoder to perform a slower, more comprehensive de-noising of a file, though not only does it decrease quality if you have a good signal in the first place, it doesn't actually work at all with any recent transcoding program, so forget about it. See the Noise Reduction section for more.
force_aspect = 16:9
Or 4:3, 1:1 or 2.21:1. This ensures that nuvexport transcode to the correct screen ratio if it's having problems figuring it out for itself.
File Name Format
filename=%t - %s
Run Automatic Commands After Nuvexport Finishes
This section is really for me to point out one handy command:
nuvexport && shutdown -h now
Personally I put +1 incase I need to exit nuvexport but don't want to shutdown (happens alot, as I wizz through commands and usually get one wrong). I can now oppen another command prompt and type "shutdown -c" to cancel the shutdown.
Note that the shutdown command needs you to be logged in as root to run, so you'll need to type "su" to change to a root command prompt before running nuvexport. You'll get a little message from nuvexport complaining about being logged in as root but you can safely ignore this.
Fine Editing With Avidemux
As mentioned earlier, once you have a completed transcoded recording it may still contain small sections you wish to remove. You can do this very quickly and simply with a program called Avidemux. The latest version, Avidemux 2.3, is available from http://fixounet.free.fr/avidemux/ and also in various package repositories for various linux distrobutions. It is available in both Windows and Linux forms.
For full details on how to edit a file using Avidemux, check the Simple Editing section on the Avidemux page of this wiki. It also includes details on how to create an XviD with Avidemux as an alternative to using nuvexport.
If you wish to read more about the various options available for the XviD codec in Avidemux, have a read of http://ronald.vslcatena.nl/docs/xvidfaq.html
Creating Subtitles For You Recordings
View the following page for details on how to create subtitles for your transcoded program.