]> git.sesse.net Git - kdenlive/commitdiff
Revert commit 5845. The consumer producer does not automatically get invoked.
authorTill Theato <root@ttill.de>
Sun, 28 Aug 2011 23:31:12 +0000 (23:31 +0000)
committerTill Theato <root@ttill.de>
Sun, 28 Aug 2011 23:31:12 +0000 (23:31 +0000)
svn path=/trunk/kdenlive/; revision=5846

export/profiles.xml
renderer/renderjob.cpp
src/renderwidget.cpp

index f0e62e947ead9d4551032416648718d2e6b1ce56..c91281b8ea0b7c36a8a84136242e5aade19218fb 100644 (file)
@@ -1,51 +1,51 @@
 <profiles version="0.1">
 <group name="HDV" renderer="avformat" extension="m2t" type="av">
-  <profile name="PAL 1080 50i" standard="PAL" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=12 trellis=1 aspect=@16/9 pass=%passes" />
-  <profile name="PAL 1080 25p" standard="PAL" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=12 trellis=1 aspect=@16/9 pass=%passes" />
-  <profile name="PAL 720 25p" standard="PAL" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1280x720 b=19700k g=12 trellis=1 aspect=@16/9 pass=%passes" />
-  <profile name="NTSC 1080 60i" standard="NTSC" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=15 trellis=1 aspect=@16/9 pass=%passes" />
-  <profile name="NTSC 1080 30p" standard="NTSC" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=15 trellis=1 aspect=@16/9 pass=%passes" />
-  <profile name="NTSC 720 30p" standard="NTSC" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1280x720 b=19700k g=15 trellis=1 aspect=@16/9 pass=%passes" />
+  <profile name="PAL 1080 50i" standard="PAL" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=12 trellis=1 mlt_profile=hdv_1080_50i pass=%passes" />
+  <profile name="PAL 1080 25p" standard="PAL" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=12 trellis=1 mlt_profile=hdv_1080_25p pass=%passes" />
+  <profile name="PAL 720 25p" standard="PAL" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1280x720 b=19700k g=12 trellis=1 mlt_profile=hdv_720_25p pass=%passes" />
+  <profile name="NTSC 1080 60i" standard="NTSC" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=15 trellis=1 mlt_profile=hdv_1080_60i pass=%passes" />
+  <profile name="NTSC 1080 30p" standard="NTSC" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1440x1080 b=25000k g=15 trellis=1 mlt_profile=hdv_1080_30p pass=%passes" />
+  <profile name="NTSC 720 30p" standard="NTSC" args="f=mpegts acodec=mp2 ab=384k ar=48000 ac=2 vcodec=mpeg2video s=1280x720 b=19700k g=15 trellis=1 mlt_profile=hdv_720_30p pass=%passes" />
 </group>
 
 <group name="Raw DV" renderer="avformat" type="av" extension="dv">
-  <profile name="DV PAL 4:3" standard="PAL" args="f=dv pix_fmt=yuv420p s=720x576 aspect=@4/3" />
-  <profile name="DV PAL 16:9" standard="PAL" args="f=dv pix_fmt=yuv420p s=720x576 aspect=@16/9" />
-  <profile name="DVCPRO25 PAL 4:3" standard="PAL" args="f=dv pix_fmt=yuv411p s=720x576 aspect=@4/3" />
-  <profile name="DVCPRO25 PAL 16:9" standard="PAL" args="f=dv pix_fmt=yuv411p s=720x576 aspect=@16/9" />
-  <profile name="DVCPRO50 PAL 4:3" standard="PAL" args="f=dv pix_fmt=yuv422p s=720x576 aspect=@4/3" />
-  <profile name="DVCPRO50 PAL 16:9" standard="PAL" args="f=dv pix_fmt=yuv422p s=720x576 aspect=@16/9" />
-
-  <profile name="DV NTSC 4:3" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 aspect=@4/3" />
-  <profile name="DV NTSC 16:9" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 aspect=@16/9" />
-  <profile name="DVCPRO25 NTSC 4:3" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 aspect=@4/3" />
-  <profile name="DVCPRO25 NTSC 16:9" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 aspect=@16/9" />
-  <profile name="DVCPRO50 NTSC 4:3" standard="NTSC" args="f=dv pix_fmt=yuv422p s=720x480 aspect=@4/3" />
-  <profile name="DVCPRO50 NTSC 16:9" standard="NTSC" args="f=dv pix_fmt=yuv422p s=720x480 aspect=@16/9" />
+  <profile name="DV PAL 4:3" standard="PAL" args="f=dv pix_fmt=yuv420p s=720x576 mlt_profile=dv_pal" />
+  <profile name="DV PAL 16:9" standard="PAL" args="f=dv pix_fmt=yuv420p s=720x576 mlt_profile=dv_pal_wide" />
+  <profile name="DVCPRO25 PAL 4:3" standard="PAL" args="f=dv pix_fmt=yuv411p s=720x576 mlt_profile=dv_pal" />
+  <profile name="DVCPRO25 PAL 16:9" standard="PAL" args="f=dv pix_fmt=yuv411p s=720x576 mlt_profile=dv_pal_wide" />
+  <profile name="DVCPRO50 PAL 4:3" standard="PAL" args="f=dv pix_fmt=yuv422p s=720x576 mlt_profile=dv_pal" />
+  <profile name="DVCPRO50 PAL 16:9" standard="PAL" args="f=dv pix_fmt=yuv422p s=720x576 mlt_profile=dv_pal_wide" />
+
+  <profile name="DV NTSC 4:3" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 mlt_profile=dv_ntsc" />
+  <profile name="DV NTSC 16:9" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 mlt_profile=dv_ntsc_wide" />
+  <profile name="DVCPRO25 NTSC 4:3" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 mlt_profile=dv_ntsc" />
+  <profile name="DVCPRO25 NTSC 16:9" standard="NTSC" args="f=dv pix_fmt=yuv411p s=720x480 mlt_profile=dv_ntsc_wide" />
+  <profile name="DVCPRO50 NTSC 4:3" standard="NTSC" args="f=dv pix_fmt=yuv422p s=720x480 mlt_profile=dv_ntsc" />
+  <profile name="DVCPRO50 NTSC 16:9" standard="NTSC" args="f=dv pix_fmt=yuv422p s=720x480 mlt_profile=dv_ntsc_wide" />
  </group>
 
 <group name="AVI DV" renderer="avformat" type="av" extension="avi">
-  <profile name="DV PAL 4:3" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv420p acodec=pcm_s16le s=720x576 aspect=@4/3" />
-  <profile name="DV PAL 16:9" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv420p acodec=pcm_s16le s=720x576 aspect=@16/9" />
-  <profile name="DVCPRO25 PAL 4:3" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x576 aspect=@4/3" />
-  <profile name="DVCPRO25 PAL 16:9" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x576 aspect=@16/9" />
-  <profile name="DVCPRO50 PAL 4:3" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x576 aspect=@4/3" />
-  <profile name="DVCPRO50 PAL 16:9" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x576 aspect=@16/9" />
+  <profile name="DV PAL 4:3" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv420p acodec=pcm_s16le s=720x576 mlt_profile=dv_pal" />
+  <profile name="DV PAL 16:9" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv420p acodec=pcm_s16le s=720x576 mlt_profile=dv_pal_wide" />
+  <profile name="DVCPRO25 PAL 4:3" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x576 mlt_profile=dv_pal" />
+  <profile name="DVCPRO25 PAL 16:9" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x576 mlt_profile=dv_pal_wide" />
+  <profile name="DVCPRO50 PAL 4:3" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x576 mlt_profile=dv_pal" />
+  <profile name="DVCPRO50 PAL 16:9" standard="PAL" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x576 mlt_profile=dv_pal_wide" />
 
-  <profile name="DV NTSC 4:3" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 aspect=@4/3" />
-  <profile name="DV NTSC 16:9" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 aspect=@16/9" />
-  <profile name="DVCPRO25 NTSC 4:3" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 aspect=@4/3" />
-  <profile name="DVCPRO25 NTSC 16:9" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 aspect=@16/9" />
-  <profile name="DVCPRO50 NTSC 4:3" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x480 aspect=@4/3" />
-  <profile name="DVCPRO50 NTSC 16:9" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x480 aspect=@16/9" />
+  <profile name="DV NTSC 4:3" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 mlt_profile=dv_ntsc" />
+  <profile name="DV NTSC 16:9" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 mlt_profile=dv_ntsc_wide" />
+  <profile name="DVCPRO25 NTSC 4:3" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 mlt_profile=dv_ntsc" />
+  <profile name="DVCPRO25 NTSC 16:9" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv411p acodec=pcm_s16le s=720x480 mlt_profile=dv_ntsc_wide" />
+  <profile name="DVCPRO50 NTSC 4:3" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x480 mlt_profile=dv_ntsc" />
+  <profile name="DVCPRO50 NTSC 16:9" standard="NTSC" args="f=avi vcodec=dvvideo pix_fmt=yuv422p acodec=pcm_s16le s=720x480 mlt_profile=dv_ntsc_wide" />
 </group>
 
 <group name="DVD" renderer="avformat" type="av">
 <groupname id="dvd">DVD</groupname>
-  <profile name="PAL 4:3 VOB" standard="PAL" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 b=5000k maxrate=8000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 s=720x576 g=15 me_range=63 trellis=1 aspect=@4/3 pass=%passes" />
-  <profile name="PAL 16:9 VOB" standard="PAL" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 b=5000k maxrate=8000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 s=720x576 g=15 me_range=63 trellis=1 aspect=@16/9 pass=%passes" />
-  <profile name="NTSC 4:3 VOB" standard="NTSC" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 s=720x480 b=6000k maxrate=9000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 g=18 me_range=63 trellis=1 aspect=@4/3 pass=%passes" />
-  <profile name="NTSC 16:9 VOB" standard="NTSC" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 s=720x480 b=6000k maxrate=9000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 g=18 me_range=63 trellis=1 aspect=@16/9 pass=%passes" />
+  <profile name="PAL 4:3 VOB" standard="PAL" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 b=5000k maxrate=8000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 s=720x576 g=15 me_range=63 trellis=1 mlt_profile=dv_pal pass=%passes" />
+  <profile name="PAL 16:9 VOB" standard="PAL" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 b=5000k maxrate=8000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 s=720x576 g=15 me_range=63 trellis=1 mlt_profile=dv_pal_wide pass=%passes" />
+  <profile name="NTSC 4:3 VOB" standard="NTSC" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 s=720x480 b=6000k maxrate=9000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 g=18 me_range=63 trellis=1 mlt_profile=dv_ntsc pass=%passes" />
+  <profile name="NTSC 16:9 VOB" standard="NTSC" extension="vob" args="f=dvd vcodec=mpeg2video acodec=ac3 s=720x480 b=6000k maxrate=9000k minrate=0 bufsize=1835008 packetsize=2048 muxrate=10080000 ab=192k ar=48000 g=18 me_range=63 trellis=1 mlt_profile=dv_ntsc_wide pass=%passes" />
 </group>
 
 <group name="MPEG-2" renderer="avformat" extension="mpg" type="av">
index 0cadeabfdb0c11f95fb7f60efb789b61c95e879f..0f2271d4dd3912baf3cdccf1513a499a5167610f 100644 (file)
@@ -72,7 +72,10 @@ RenderJob::RenderJob(bool erase, bool usekuiserver, const QString& renderer, con
 
     m_args << preargs;
     //qDebug()<<"PRE ARGS: "<<preargs;
-    m_args << "-profile" << profile;
+    if (scenelist.startsWith("consumer:")) {
+        // Use MLT's producer_consumer, needs a different syntax for profile:
+        m_args << "profile=" + profile;
+    } else m_args << "-profile" << profile;
     m_args << "-consumer" << rendermodule + ':' + m_dest << "progress=1" << args;
 
     m_dualpass = false;
index bb19f875372f8c3bcc1db4517c1a750eba9a4c4c..e4b6b9eaa4e086d3f8909c413aa6846b9947ed01 100644 (file)
@@ -791,6 +791,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut, const
         // Add current size parameter
         renderArgs.append(subsize);
     }
+    bool resizeProfile = (subsize != currentSize);
     QStringList paramsList = renderArgs.split(" ", QString::SkipEmptyParts);
 
     QScriptEngine sEngine;
@@ -801,6 +802,10 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut, const
     for (int i = 0; i < paramsList.count(); ++i) {
         QString paramName = paramsList.at(i).section('=', 0, 0);
         QString paramValue = paramsList.at(i).section('=', 1, 1);
+        // If the profiles do not match we need to use the consumer tag
+        if (paramName == "mlt_profile=" && paramValue != m_profile.path) {
+            resizeProfile = true;
+        }
         // evaluate expression
         if (paramValue.startsWith('%')) {
             paramValue = sEngine.evaluate(paramValue.remove(0, 1)).toString();
@@ -809,7 +814,10 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut, const
         sEngine.globalObject().setProperty(paramName.toUtf8().constData(), paramValue);
     }
 
-    render_process_args <<  (scriptExport ? "$SOURCE" : playlistPath);
+    if (resizeProfile)
+        render_process_args << "consumer:" + (scriptExport ? "$SOURCE" : playlistPath);
+    else
+        render_process_args <<  (scriptExport ? "$SOURCE" : playlistPath);
     render_process_args << (scriptExport ? "$TARGET" : KUrl(dest).url());
     render_process_args << paramsList;