Index: libs/libmythtv/recordingprofile.h
===================================================================
--- libs/libmythtv/recordingprofile.h	(revision 9579)
+++ libs/libmythtv/recordingprofile.h	(working copy)
@@ -38,6 +38,7 @@
 class ImageSize;
 class TranscodeResize;
 class TranscodeLossless;
+class TranscodeFilters;
 
 class RecordingProfile: public ConfigurationWizard
 {
@@ -102,6 +103,7 @@
   private slots:
     void ResizeTranscode(bool resize); 
     void SetLosslessTranscode(bool lossless);
+    void FiltersChanged(const QString &val);
 
   private:
     ID                       *id;
@@ -109,6 +111,7 @@
     ImageSize                *imageSize;
     TranscodeResize          *tr_resize;
     TranscodeLossless        *tr_lossless;
+    TranscodeFilters         *tr_filters;
     VideoCompressionSettings *videoSettings;
     AudioCompressionSettings *audioSettings;
     QString                   profileName;
Index: libs/libmythtv/recordingprofile.cpp
===================================================================
--- libs/libmythtv/recordingprofile.cpp	(revision 9579)
+++ libs/libmythtv/recordingprofile.cpp	(working copy)
@@ -676,6 +676,19 @@
     };
 };
 
+class TranscodeFilters: public CodecParam, public LineEditSetting {
+public:
+    TranscodeFilters(const RecordingProfile& parent):
+        CodecParam(parent, "transcodefilters"),
+        LineEditSetting() {
+        setLabel(QObject::tr("Custom Filters"));
+        setHelpText(QObject::tr("Filters used when transcoding using "
+                                "this profile. Format:\n"
+                                "[[<filter>=<options>,]...]"
+                                ));
+    };
+};
+
 class ImageSize: public VerticalConfigurationGroup {
 public:
     class Width: public SpinBoxSetting, public CodecParam {
@@ -755,7 +768,7 @@
     : id(new ID()),        name(new Name(*this)),
       imageSize(NULL),     videoSettings(NULL),
       audioSettings(NULL), profileName(profName),
-      isEncoder(true)
+      isEncoder(true)     
 {
     // This must be first because it is needed to load/save the other settings
     addChild(id);
@@ -769,6 +782,7 @@
     profile->setLabel(labelName);
     profile->addChild(name);
 
+    tr_filters = NULL;
     tr_lossless = NULL;
     tr_resize = NULL;
 
@@ -776,8 +790,10 @@
     {
         if (profName.left(11) == "Transcoders")
         {
+            tr_filters = new TranscodeFilters(*this);
             tr_lossless = new TranscodeLossless(*this);
             tr_resize = new TranscodeResize(*this);
+            profile->addChild(tr_filters);
             profile->addChild(tr_lossless);
             profile->addChild(tr_resize);
         }
@@ -786,8 +802,10 @@
     }
     else
     {
+        tr_filters = new TranscodeFilters(*this);
         tr_lossless = new TranscodeLossless(*this);
         tr_resize = new TranscodeResize(*this);
+        profile->addChild(tr_filters);
         profile->addChild(tr_lossless);
         profile->addChild(tr_resize);
         profile->addChild(new AutoTranscode(*this));
@@ -799,6 +817,8 @@
 void RecordingProfile::ResizeTranscode(bool resize)
 {
     MythWizard *wizard = (MythWizard *)dialog;
+    if (!wizard)
+        return;
     //page '1' is the Image Size page
     QWidget *size_page = wizard->page(1);
     wizard->setAppropriate(size_page, resize);
@@ -807,6 +827,8 @@
 void RecordingProfile::SetLosslessTranscode(bool lossless)
 {
     MythWizard *wizard = (MythWizard *)dialog;
+    if (!wizard)
+        return;
 
     bool show_size = (lossless) ? false : tr_resize->boolValue();
     wizard->setAppropriate(wizard->page(1), show_size);
@@ -816,6 +838,8 @@
     wizard->setNextEnabled(wizard->page(0), ! lossless);
     wizard->setFinishEnabled(wizard->page(0), lossless);
     
+    if (tr_filters)
+        tr_filters->setEnabled(!lossless);
 }
 
 void RecordingProfile::loadByID(int profileId) 
@@ -846,13 +870,15 @@
 
         audioSettings = new AudioCompressionSettings(*this, profileName);
         addChild(audioSettings);
-
+        
         if (profileName && profileName.left(11) == "Transcoders")
         {
             connect(tr_resize, SIGNAL(valueChanged   (bool)),
                     this,      SLOT(  ResizeTranscode(bool)));
             connect(tr_lossless, SIGNAL(valueChanged        (bool)),
-                    this,        SLOT(  SetLosslessTranscode(bool)));
+                    this,      SLOT(  SetLosslessTranscode(bool)));
+            connect(tr_filters, SIGNAL(valueChanged(const QString &)),
+                    this,      SLOT(FiltersChanged(const QString &)));
         }
     }
 
@@ -860,6 +886,20 @@
     load();
 }
 
+void RecordingProfile::FiltersChanged(const QString &val)
+{
+    if (!tr_filters || !tr_lossless)
+      return;
+   
+    // If there are filters, we can not do lossless transcoding 
+    if (val.stripWhiteSpace().length() > 0) {
+       tr_lossless->setValue(false);
+       tr_lossless->setEnabled(false);
+    } else {
+       tr_lossless->setEnabled(true);
+    }
+}
+
 bool RecordingProfile::loadByType(QString name, QString cardtype) 
 {
     QString hostname = gContext->GetHostName();
@@ -937,10 +977,16 @@
 int RecordingProfile::exec()
 {
     MythDialog* dialog = dialogWidget(gContext->GetMainWindow());
+
     dialog->Show();
     if (tr_lossless)
         SetLosslessTranscode(tr_lossless->boolValue());
-
+    if (tr_resize)
+        ResizeTranscode(tr_resize->boolValue());
+    // Filters should be set last because it might disable lossless
+    if (tr_filters)
+        FiltersChanged(tr_filters->getValue());
+    
     int ret = dialog->exec();
 
     delete dialog;
Index: libs/libmyth/settings.h
===================================================================
--- libs/libmyth/settings.h	(revision 9579)
+++ libs/libmyth/settings.h	(working copy)
@@ -214,6 +214,9 @@
 
 class ConfigurationDialog: virtual public Configurable {
 public:
+    ConfigurationDialog() : 
+        Configurable(), dialog(NULL) {};
+
     // Make a modal dialog containing configWidget
     virtual MythDialog* dialogWidget(MythMainWindow *parent,
                                      const char* widgetName = 0);
Index: programs/mythtranscode/transcode.cpp
===================================================================
--- programs/mythtranscode/transcode.cpp	(revision 9579)
+++ programs/mythtranscode/transcode.cpp	(working copy)
@@ -378,7 +378,7 @@
     QString encodingType = nvp->GetEncodingType();
     bool copyvideo = false, copyaudio = false;
 
-    QString vidsetting = NULL, audsetting = NULL;
+    QString vidsetting = NULL, audsetting = NULL, vidfilters = NULL;
 
     int video_width = nvp->GetVideoWidth();
     int video_height = nvp->GetVideoHeight();
@@ -397,6 +397,7 @@
         }
         vidsetting = profile.byName("videocodec")->getValue();
         audsetting = profile.byName("audiocodec")->getValue();
+        vidfilters = profile.byName("transcodefilters")->getValue();
 
         if (encodingType == "MPEG-2" &&
             profile.byName("transcodelossless")->getValue().toInt())
@@ -413,6 +414,7 @@
         }
         else if (profile.byName("transcoderesize")->getValue().toInt())
         {
+            nvp->SetVideoFilters(vidfilters);
             newWidth = profile.byName("width")->getValue().toInt();
             newHeight = profile.byName("height")->getValue().toInt();
 
@@ -443,6 +445,8 @@
                     .arg(video_width).arg(video_height)
                     .arg(newWidth).arg(newHeight));
         }
+        else  // lossy and no resize
+            nvp->SetVideoFilters(vidfilters);
 
         // this is ripped from tv_rec SetupRecording. It'd be nice to merge
         nvr->SetOption("inpixfmt", FMT_YV12);
