This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Rendering of myvideo.mp4 aborted only in console

Tags: console, terminal, script, render, ssh console, terminal, script, render, ssh console, terminal, script, render, ssh
(comma "," separated)
User avatar
w32blaster
Registered Member
Posts
6
Karma
0
OS
Hi guys,

I have a strange problem: I have the error "Render of myvideo.mp4 aborted, result video will probably be corrupted" only in console, but everything works pretty well in Terminal. Let me explain in more details.

I try to execute rendering from the command line using script, generated by Kdenlive. I mean, when I render my video, I choose "generate script" rather than "render to file" in Kdenlive. Then, I try to execute the script found in ~/kdenlive/scripts directory in the console emulator Terminal or Terminator. It works as expected and I see my video file and I can play and see its content.

But the next step I try to execute the same script by SSH or from command line (switching to it using keys Ctrl + Alt + F1 in my Ubuntu). Unfortunately, this operation has never succeeded for me. I can't understand, what is the difference between Terminator and pure command line. I have read many threads for in this forum, but I didn't find any answers for me.

I used umlauts (non-standard UTF symbols) in my title clips. For testing purposes I remove all of them, but it didn't help me. I played with different rendering parameters, but I failed again. Dear developers, can you please help me to find the reason of this strange behaviour?

Here is my script content:

Code: Select all
#! /bin/sh

export KDENLIVE_RENDER_LOG=true

SOURCE="/path/to/my/script.sh.mlt"
TARGET="/path/to/my/output.mp4"
RENDERER="/usr/bin/kdenlive_render"
MELT="/usr/bin/melt"

PARAMETERS="-pid:27218 $MELT hdv_1080_50i avformat - $SOURCE $TARGET f=mp4 hq=1 acodec=aac ab=192k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 vb=12000k g=250 bf=3 b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=@16/9 pass=2 threads=32 real_time=-1 -verbose"
$RENDERER $PARAMETERS


(I played with different values for threads= parameter, but I still don't have a positive result). Usually I execute it with the command:

Code: Select all
sh -x script.sh


I found also file /tmp/kdenlive_render.log.XMTJ9360 with log output, it is just aborted without any meaningful information. Like so:

Code: Select all
...
ReceivedStderr from melt: Current Frame: 9130, percentage: 53
ReceivedStderr from melt: Current Frame: 9141, percentage: 53
ReceivedStderr from melt: Current Frame: 9152, percentage: 53
ReceivedStderr from melt: Current Frame: 9157, percentage: 53
ReceivedStderr from melt: Current Frame: 9160, percentage: 53
Rendering of /path/to/my/output.mp4 aborted, resulting video will probably be corrupted.


Here are my environment versions:

Qt: 4.8.6
KDE Development Platform: 4.13.3
Kdenlive: 0.9.6
melt 0.9.0
Ubuntu 14.04

If you require any other information, let me know and I will post it for you.

Thank you in advance.
vpinon
KDE Developer
Posts
708
Karma
6
OS
Hello,

Strange indeed... What is happening in your project near frame 9160? Is it a title clip (with special font, effect)?
I see that you run "plain" trusty packages (Kdenlive 0.9.6, mlt 0.9.0), many bugs have been fixed since then in both programs, an upgrade through ppa:sunab/kdenlive-release might be helpful...

BR,

Vincent.
User avatar
w32blaster
Registered Member
Posts
6
Karma
0
OS
Thank you for your fast reply!

After few experiments, I have strong feeling, that the reason of such weird behaviour is a Title Clip, because my film has being rendered without any problems when I remove all the titles.

To confirm my theory, I created a simple project with only two videos and rendered it in two ways (from Terminator and from pure command line). The result was expecting positive. Then I created a simple Title Clip (black colour, "Ubuntu" font, no umlauts) and applied with effect "Addition" (I also tried "Affine" as well). It produces ordinary producer in MLT file, like so:

Code: Select all
 <producer in="0" out="124" id="7">
  <property name="mlt_type">producer</property>
  <property name="length">125</property>
  <property name="eof">pause</property>
  <property name="resource"/>
  <property name="progressive">1</property>
  <property name="aspect_ratio">1</property>
  <property name="seekable">1</property>
  <property name="mlt_service">kdenlivetitle</property>
  <property name="xmldata">&lt;kdenlivetitle width="1920" duration="125" height="1080" out="125" LC_NUMERIC="en_GB.UTF-8">
 &lt;item z-index="0" type="QGraphicsTextItem">
  &lt;position x="483" y="456.6666666666666">
   &lt;transform>1,0,0,0,1,0,0,0,1&lt;/transform>
  &lt;/position>
  &lt;content font-color="255,255,192,255" font-outline-color="0,0,0,255" font-pixel-size="120" font-italic="0" font-underline="0" font-weight="50" font="Ubuntu" font-outline="0">Test Clip Aborted&lt;/content>
 &lt;/item>
 &lt;startviewport rect="0,0,1920,1080"/>
 &lt;endviewport rect="0,0,1920,1080"/>
 &lt;background color="0,0,0,0"/>
&lt;/kdenlivetitle>
</property>
  <property name="force_reload">0</property>
  <property name="meta.media.width">1920</property>
  <property name="meta.media.height">1080</property>
 </producer>


Nothing extraordinary, as you can see. Firstly, I rendered it using console emulator and I received correct file:

Image

Secondly, I pressed Ctrl + Alt + F1 and entered to the console mode and executed the same script. This time the rendering process was finished successfully, but instead of titles I saw just a white rectangular.

Image

Well, it is a bit different result as I had with my personal video, but in any case there is something really strange going on with titles.

And as you suggested, I upgraded my Kdenlive. I installed it from your PPA's, but I had the error message:
kdenlive: /usr/lib/x86_64-linux-gnu/libmlt.so.6: version `MLT_0.9.2' not found (required by /usr/lib/libmlt++.so.3).
After short googling I found the post with tutorial how to fix it. Now I have:

Qt: 4.8.6
KDE Development Platform: 4.13.3
Kdenlive: 0.9.10
melt 0.9.3

Unfortunately, after updating I still have all the problems. At this moment I render my movies using remote desktop X2Go, where I just open Terminal and execute render script. But it is not convenient, thus I still trying to find a proper method how to render a movie from command line without GUI.

BR,
Ilja.
vpinon
KDE Developer
Posts
708
Karma
6
OS
Oh, I'm just remembering that yes Qt (used for title clips) needs a X11 display just to render the images (would need a web search to find info source).

Quick alternate: use SVG/PNG images for fixed texts & graphics...

The titler has to evolve for years, but it is never our priority :-\
User avatar
w32blaster
Registered Member
Posts
6
Karma
0
OS
I just tried both SVG and PNG images and result is the same: when I render it from Terminal it works as expected; when I do it from console then only white rectangular appears instead of titles (as it was displayed on the screenshot above).

Can you suggest any other solutions/workarounds, please?
User avatar
cweiske
Registered Member
Posts
4
Karma
0
I had the same problem with kdenlive 0.9.10 on Ubuntu 14.04:
Clips with an umlaut (ä, ö, ü, ß) in them would not show up - or only show up partially.

This only happened when starting kdenlive with a non-UTF-8-locale like "C":
Code: Select all
$ LC_ALL=C kdenlive

When starting it with my normal german locale - de_DE.UTF-8 - it worked fine. I just had to re-edit the title clip and save it again to fix it.

The reason for this is that the special characters cause the .mlt file (which is passed to melt for rendering) - to be broken and to contain invalid XML segments.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]