A question or two for any Ubuntu nuvexport user who might be using Kyle&#39;s script (<a href="http://tacomafia.net:8080/blog/2006/mythexport/">http://tacomafia.net:8080/blog/2006/mythexport/</a>) to export files.<br><br>I downloaded from Kyle&#39;s site and had to bash the heck out of the script just to get it to run I was getting errors and it was just jumping to &quot;Unable to open file..&quot; It didn&#39;t like the if statements below... just curious if I missed something or if it&#39;s just an Ubuntu thing?<br>
<br><i><b># Proper arguments check<br>if [[ $# -ne 2 ]]<br>then<br>&nbsp;&nbsp;&nbsp; echo &quot;ERROR: Invalid arguments&quot;<br>&nbsp;&nbsp;&nbsp; echo &quot;USAGE: mythexport [infile] [title]&quot;<br>&nbsp;&nbsp;&nbsp; exit 1<br>fi<br><br># If .mpg file exists<br>
if [[ -r &quot;$indir$infile&quot; ]]<br>then<br>&nbsp;&nbsp;&nbsp; # The &quot;command&quot;</b></i><br><br><br>The other question I have is that my recording looks terrible after nuvexport finished it, it&#39;s blocky and just looks horrific. It&#39;s using xvid so I should think it would be decent... I&#39;m new to nuvexport so maybe I&#39;ve missed something obvious???<br>
<br><i><b>#<br># nuvexportrc:<br>#<br>#&nbsp; This file contains the configuration for nuvexport, and should be installed<br>#&nbsp;&nbsp;&nbsp; as /etc/nuvexportrc.&nbsp; You can also copy this file to ~/.nuvexportrc, where<br>#&nbsp;&nbsp;&nbsp; nuvexport will look first, if you wish to create settings local to a<br>
#&nbsp;&nbsp;&nbsp; specific user.<br>#<br>#&nbsp; support for nuvexportrc is still new, so expect that more default options<br>#&nbsp;&nbsp;&nbsp; will be added as time goes on (so you&#39;ll know what you can edit).&nbsp; In the<br>#&nbsp;&nbsp;&nbsp; meantime, you can poke around in the code for add_arg() calls to see which<br>
#&nbsp;&nbsp;&nbsp; options are available.<br>#<br><br>#<br>#&nbsp; Anything placed within the &lt;nuvexport&gt; section will be interpreted<br>#&nbsp;&nbsp;&nbsp; as a global option.&nbsp; Use this section for options that don&#39;t relate<br>#&nbsp;&nbsp;&nbsp; specifically to any particular exporter.<br>
#<br>&lt;nuvexport&gt;<br><br>#<br>#&nbsp; Set export_prog to ffmpeg, transcode or mencoder, depending on your<br>#&nbsp;&nbsp;&nbsp; preference of program for exports.&nbsp; This is equivalent to --ffmpeg,<br>#&nbsp;&nbsp;&nbsp; --transcode or --mencoder<br>#<br>
&nbsp;&nbsp;&nbsp; export_prog=ffmpeg<br><br>#<br>#&nbsp; Any other parameters set in this file are equivalent to using the equivalent<br>#&nbsp;&nbsp;&nbsp; setting as a commandline option.&nbsp; For boolean options like --deinterlace<br>#&nbsp;&nbsp;&nbsp; (--nodeinterlace), use deinterlace=yes (or no, true or false) instead.<br>
#&nbsp;&nbsp;&nbsp; Actual commandline options will override anything in this file.<br>#<br><br>#<br>#&nbsp; Preferred mode -- if you don&#39;t set this, nuvexport will ask you what you<br>#&nbsp;&nbsp;&nbsp; would like to do.&nbsp; Use --mode or any of the mode symlinks (like<br>
#&nbsp;&nbsp;&nbsp; nuvexport-xvid) to override.<br>#<br>&nbsp;&nbsp;&nbsp; mode=xvid<br><br>#<br>#&nbsp; Setting underscores to yes will convert whitespace in filenames to an<br>#&nbsp;&nbsp;&nbsp; underscore character (which some people seem to prefer)<br>#<br>&nbsp;&nbsp;&nbsp; underscores=no<br>
<br>#<br>#&nbsp; Setting require_cutlist to yes will tell nuvexport to show only those<br>#&nbsp;&nbsp;&nbsp; recordings that have a cutlist<br>#<br>#&nbsp;&nbsp;&nbsp; require_cutlist=no<br><br>#<br>#&nbsp; By default, nuvexport picks what it thinks is a good name for your file<br>
#&nbsp;&nbsp;&nbsp; (doing its best to avoid printing &quot;Untitled&quot; into the filename).&nbsp; Setting<br>#&nbsp;&nbsp;&nbsp; name will let you change the output format of the filename generated by<br>#&nbsp;&nbsp;&nbsp; nuvexport.&nbsp; Even after this formatting, nuvexport will still do some basic<br>
#&nbsp;&nbsp;&nbsp; replacements to make sure that illegal filename characters (eg. /\:*?&lt;&gt;|)<br>#&nbsp;&nbsp;&nbsp; are replaced with a dash (or &quot; with a &#39;).&nbsp; The following format variables<br>#&nbsp;&nbsp;&nbsp; are supported:<br>#<br>#&nbsp;&nbsp;&nbsp; %f -&gt; full path to the filename<br>
#&nbsp;&nbsp;&nbsp; %c -&gt; the chanid of the show<br>#&nbsp;&nbsp;&nbsp; %a -&gt; start time in YYYYMMDDHHMMSS format<br>#&nbsp;&nbsp;&nbsp; %b -&gt; end time in YYYYMMDDHHMMSS format<br>#&nbsp;&nbsp;&nbsp; %t -&gt; title (show name)<br>#&nbsp;&nbsp;&nbsp; %s -&gt; subtitle (episode name)<br>#&nbsp;&nbsp;&nbsp; %h -&gt; hostname where the file resides<br>
#&nbsp;&nbsp;&nbsp; %m -&gt; showtime in human-readable format (see --date below)<br>#&nbsp;&nbsp;&nbsp; %d -&gt; description<br>#&nbsp;&nbsp;&nbsp; %% -&gt; a % character<br>#<br>&nbsp;&nbsp;&nbsp; filename=%t - %m<br><br>#<br>#&nbsp; By default, nuvexport uses an American-style date to represent showtimes in<br>
#&nbsp;&nbsp;&nbsp; lists and filenames.&nbsp; Use --date to override that with the format of your<br>#&nbsp;&nbsp;&nbsp; choosing.&nbsp; See the UnixDate section `perldoc Date::Manip` for formatting<br>#&nbsp;&nbsp;&nbsp; options.<br>#<br>&nbsp;&nbsp;&nbsp; date=%m.%d.%y<br><br>#<br>#&nbsp; Nuvexport has the option to crop a percentage of the border of each recording<br>
#&nbsp; in order to get rid of the unsightly edges of the tv signal.&nbsp; The default 2%<br>#&nbsp; approximates the overscan of an average TV, but you can alter this from 0 to<br>#&nbsp; 5% to fit your preferences.&nbsp; Please keep in mind that this amount is removed<br>
#&nbsp; prior to making any aspect conversions like removing black bars from 4:3<br>#&nbsp; recordings to make a 16:9 export.<br>#<br>&nbsp;&nbsp;&nbsp; crop_pct = 2<br><br>#<br>#&nbsp; Alternatively, you can override the general crop_pct to crop a different<br>
#&nbsp; amount from specific sides of the recording.<br>#<br>#&nbsp;&nbsp; crop_top&nbsp;&nbsp;&nbsp; = 2<br>#&nbsp;&nbsp; crop_right&nbsp; = 2<br>#&nbsp;&nbsp; crop_bottom = 2<br>#&nbsp;&nbsp; crop_left&nbsp;&nbsp; = 2<br><br>&lt;/nuvexport&gt;<br><br>#<br>#&nbsp; The sections below work as above, with each more specific section overriding<br>
#&nbsp;&nbsp;&nbsp; the more generic.<br>#<br><br>&lt;generic&gt;<br><br>#<br># Default to export to the current directory<br>#<br>&nbsp;&nbsp;&nbsp; path = /shared/.mythtv/out<br><br>#<br># Use the cutlist (not to be confused with the commercial flag list) when<br>
#&nbsp;&nbsp;&nbsp; exporting.<br>#<br>&nbsp;&nbsp;&nbsp; use_cutlist = yes<br><br>#<br># Tell mythcommflag to generate a cutlist from the commercial flags before<br>#&nbsp;&nbsp;&nbsp; exporting.&nbsp; Don&#39;t forget to enable use_cutlist above, too.<br>#<br>&nbsp;&nbsp; gencutlist = yes<br>
<br>#<br># Contrary to popular belief, enabling multipass will not make your recordings<br>#&nbsp;&nbsp;&nbsp; look better.&nbsp; What it will do, however is guarantee that the bitrate you<br>#&nbsp;&nbsp;&nbsp; choose will be the average bitrate of your entire encode (meaning that your<br>
#&nbsp;&nbsp;&nbsp; exports will end up being about the same size per-minute), and that you<br>#&nbsp;&nbsp;&nbsp; will receive the best overall quality for a files of the same size.<br>#<br>&nbsp;&nbsp;&nbsp; multipass = no<br><br>#<br># Disabling noise reduction can speed up your exports dramatically, but at the<br>
#&nbsp;&nbsp;&nbsp; expense of some quality.&nbsp; You can also access this on the commandline via<br>#&nbsp;&nbsp;&nbsp; the --denoise (or --nodenoise) flag.<br>#<br>&nbsp;&nbsp;&nbsp; noise_reduction = no<br><br>#<br># Deinterlace the video so that it looks better on software players.<br>
#<br>&nbsp;&nbsp;&nbsp; deinterlace&nbsp;&nbsp;&nbsp;&nbsp; = yes<br><br>#<br># Crop about 2% from the border of the recording before encoding.&nbsp; This is done<br>#&nbsp;&nbsp;&nbsp; to get rid of part of the broadcast signal that is usually obscured by the<br>#&nbsp;&nbsp;&nbsp; tv&#39;s overscan.<br>
#<br>&nbsp;&nbsp;&nbsp; crop = yes<br><br>#<br>#&nbsp; You can create settings for each export module type.&nbsp; These are the<br>#&nbsp;&nbsp;&nbsp; second-most generic sections, and will only be reached if there are no<br>#&nbsp;&nbsp;&nbsp; matches in the full or generic module names.<br>
#<br>#&nbsp; If you have a particularly dirty signal, you might want to try to disable<br>#&nbsp;&nbsp;&nbsp; fast_denoise (it&#39;s actually part of yuvdenoise, which both the ffmpeg<br>#&nbsp;&nbsp;&nbsp; and transcode exporters call).&nbsp; It can be almost twice as slow as the<br>
#&nbsp;&nbsp;&nbsp; default &quot;fast&quot; normal noise reduction, but it considerably more effective.<br>#&nbsp;&nbsp;&nbsp; The latest version of yuvdenoise (which is called directly by the ffmpeg<br>#&nbsp;&nbsp;&nbsp; exporters) does not support this option, so it is ignored in that case.<br>
#<br>&nbsp;&nbsp;&nbsp; fast_denoise = yes<br><br>#<br>#&nbsp; If nuvexport is having trouble detecting the *input* aspect ratio of your<br>#&nbsp;&nbsp;&nbsp; recordings (MythTV used to hard-code all software-encoded files as 1:1<br>#&nbsp;&nbsp;&nbsp; regardless of the true aspect), set this option to one of the following:<br>
#<br>#&nbsp;&nbsp; force_aspect = [ 1:1 4:3 16:9 2.21:1 ]<br><br>&lt;/generic&gt;<br><br>&lt;ffmpeg&gt;<br>#<br>#&nbsp; ffmpeg is almost twice as fast if you disable noise reduction<br>#<br>&nbsp;&nbsp;&nbsp; noise_reduction = no<br>#<br>#&nbsp; By default, nuvexport&#39;s ffmpeg module lets ffmpeg handle deinterlacing.<br>
#&nbsp;&nbsp;&nbsp; I&#39;ve found that this provides the best results, but if you wish to let<br>#&nbsp;&nbsp;&nbsp; yuvdenoise do it instead, set deint_in_yuvdenoise to a true value.<br>#<br>#&nbsp;&nbsp;&nbsp; deint_in_yuvdenoise = no<br>#<br>&lt;/ffmpeg&gt;<br><br>
&lt;transcode&gt;<br><br>#<br>#&nbsp; Mythtranscode will always be used for nupplevideo recordings because<br>#&nbsp;&nbsp;&nbsp; transcode can&#39;t read them, but setting force_mythtranscode to yes will<br>#&nbsp;&nbsp;&nbsp; force nuvexport to call mythtranscode when using the transcode exporter for<br>
#&nbsp;&nbsp;&nbsp; mpeg recordings, too.&nbsp; This may help problems that some people have been<br>#&nbsp;&nbsp;&nbsp; having with transcode not recognizing certain dvb recordings, as well as<br>#&nbsp;&nbsp;&nbsp; transcode not working properly on certain ivtv recordings.<br>
#<br>&nbsp;&nbsp;&nbsp; force_mythtranscode = yes<br><br>#<br>#&nbsp; Setting both force_mythtranscode and mythtranscode_cutlist to yes will tell<br>#&nbsp;&nbsp;&nbsp; nuvexport to use mythtranscode&#39;s built-in cutlist functions, rather than<br>#&nbsp;&nbsp;&nbsp; having transcode use its own.&nbsp; I&#39;ve found that the cutlists for a handful<br>
#&nbsp;&nbsp;&nbsp; of ivtv recordings that do not work properly with transcode&#39;s internal<br>#&nbsp;&nbsp;&nbsp; cutlist handler.<br>#<br>&nbsp;&nbsp;&nbsp; mythtranscode_cutlist = yes<br><br>&lt;/transcode&gt;<br><br>&lt;mencoder&gt;<br>&lt;/mencoder&gt;<br><br>
#<br>#&nbsp; You can also create settings for generic export module names.&nbsp; These will<br>#&nbsp;&nbsp;&nbsp; only be overridden by full module names.<br>#<br><br>&lt;XviD&gt;<br><br>&nbsp;&nbsp;&nbsp; vbr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = yes&nbsp;&nbsp; # Enable vbr to get the multipass/quantisation options<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (enabling multipass or quantisation automatically enables vbr)<br>&nbsp;&nbsp;&nbsp; multipass&nbsp;&nbsp;&nbsp; = no&nbsp;&nbsp; # You get either multipass or quantisation; multipass will override<br>&nbsp;&nbsp;&nbsp; quantisation = 4&nbsp;&nbsp;&nbsp;&nbsp; # 4 through 6 is probably right...&nbsp; 1..31 are allowed (lower is better quality)<br>
<br>&nbsp;&nbsp;&nbsp; a_bitrate&nbsp;&nbsp;&nbsp; = 256&nbsp;&nbsp; # Audio bitrate of 128 kbps<br>&nbsp;&nbsp;&nbsp; v_bitrate&nbsp;&nbsp;&nbsp; = 960&nbsp;&nbsp; # Remember, quantisation overrides video bitrate<br><br>&nbsp;&nbsp;&nbsp; width&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 624&nbsp;&nbsp; # Height adjusts automatically to width, according to aspect ratio<br>
&nbsp;&nbsp;&nbsp; height&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = auto<br><br>&lt;/XviD&gt;<br><br>#<br>#&nbsp; Default mp3 bitrate in MythTV is 128<br>#<br>&lt;MP3&gt;<br>&nbsp;&nbsp;&nbsp; bitrate = 256<br>&lt;/MP3&gt;<br><br>#<br>#&nbsp; If you want to provide settings for a very specific export module, you can<br>
#&nbsp;&nbsp;&nbsp; use its full name, and it will override any more generic settings.<br>#<br><br>#<br># The MP4 encoder for ffmpeg has a couple of options unique to itself<br>#<br>&lt;ffmpeg::MP4&gt;<br><br># Codec to use (mpeg4 or h264).&nbsp; Please note that h264 support requires the<br>
# SVN version of ffmpeg (not CVS!).&nbsp; In fact, even the mpeg4 codec works<br># better with the SVN version.<br>&nbsp;&nbsp;&nbsp; mp4_codec = mpeg4<br><br># Framerate to use:&nbsp; auto, 25, 23.97, 29.97.&nbsp; PAL will always be 25 fps, and<br># auto will set 29.97 for everything over 320x288 and 23.97 for the rest.<br>
&nbsp;&nbsp;&nbsp; mp4_fps = auto<br><br>&lt;/ffmpeg::MP4&gt;<br><br>#<br># As does the PSP exporter<br>#<br>&lt;ffmpeg::PSP&gt;<br><br># PSP framerate (high=29.97, low=14.985)<br>&nbsp;&nbsp;&nbsp; psp_fps = low<br><br># PSP resolution (320x240, 368x208 or 400x192)<br>
&nbsp;&nbsp;&nbsp; psp_resolution = 320x240<br><br># PSP video bitrate (high=768, low=384)<br>&nbsp;&nbsp;&nbsp; psp_bitrate = high<br><br># Create a thumbnail to go with the PSP video export?<br>&nbsp;&nbsp;&nbsp; psp_thumbnail = yes<br><br>&lt;/ffmpeg::PSP&gt;<br>
<br>#<br># You can also add flags to the one and only mencoder option<br>#<br>&lt;mencoder::XviD&gt;<br><br>&nbsp;&nbsp;&nbsp; multipass = no<br><br>&lt;/mencoder::XviD&gt;<br><br>#<br># You can also make specific profiles called with the --profile parameter that<br>
# will override other config options (but not commandline arguments).<br>#<br># For example, you could make a profile that would encode your favorite show<br># with your favorite settings.<br>#<br>&lt;profile::sample&gt;<br>
<br>&nbsp;&nbsp;&nbsp; title&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = test<br><br>&nbsp;&nbsp;&nbsp; export_prog = transcode<br>&nbsp;&nbsp;&nbsp; mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = xvid<br>&nbsp;&nbsp;&nbsp; confirm&nbsp;&nbsp;&nbsp;&nbsp; = true<br><br>&lt;/profile::sample&gt;<br><br></b></i><br>The last question I have is related to Myth&#39;s User Job&#39;s - I had setup in Post Recording to run nuvexport but it didn&#39;t seem to kick off after the recording finished. Where is the log associated with Post Recording that I can track down the error or is Post Recording not the correct place to run the nuvexport job?<br>
<br>Thanks.<br>AJM,<br><i><b><br><br><br><br><br><br><br></b></i><br>