Unable to RENDER: produces almost empty file

Hi to all.

When I try to render, Kdenlive terminates all the operations in less than one second and produces almost empty files. I tried to reproduce those files using different players but they just show nothing to me: the files result to be empty.

I've been trying to render using different codecs (Xvid4, Raw DV, Flash) and also rendering without audio but it doesn't solved.

Also I've been trying this:
http://www.kdenlive.org/forum/kdenlive-doesnt-start-after-installation#c...

but it didn't help.

Any suggestion, please?
Thank you.

Kdenlive Version 0.7.5
Using KDE 4.2.2 (KDE 4.2.2)
Ubuntu 9.04 - kernel 2.6.28-15-generic #49-Ubuntu SMP
Acer Aspire 5730z

Forums:

Trying to delete the file $HOME/.kde/share/config/kdenliverc might solve the problem if you have a wrong path stored for melt.

Otherwise, try to create a very simple project file (with only one color clip in timeline). Then open the render dialog, select the codec you want and instead of doing "Render to file", click on the small arrow on the side of the button and select: "Generate script". This will create a file called:

script001.sh, the path to the file is shown in the dialog.

Then, open a terminal, go to the folder where the script was created and type:

./script001.sh

What is the result?

Thanks for your reply.

>> Trying to delete the file $HOME/.kde/share/config/kdenliverc might solve the problem if you have a wrong path stored for melt.

This didn't solve the problem.

>> Otherwise, try to create a very simple project file (with only one color clip in timeline).

I created a 5 seconds red color clip but the problem persists. The output of the script is:

//STARTING RENDERING: false , false , "/usr/bin/melt" , "hdv_1080_50i" , "avformat" , "-" , "consumer:/media/Common/KDENLIVE/scripts/script002.sh.mlt" , "/media/Common/KDENLIVE/untitled.avi" , () , ("acodec=libmp3lame", "ab=128k", "ar=44100", "vcodec=libxvid", "minrate=0", "b=12000k", "aspect=@16/9", "mbd=2", "trellis=1", "mv4=1", "pass=1", "s=640x480") , -1 , -1
Started render process: "/usr/bin/melt" "consumer:/media/Common/KDENLIVE/scripts/script002.sh.mlt profile=hdv_1080_50i -consumer avformat:/media/Common/KDENLIVE/untitled.avi progress=1 acodec=libmp3lame ab=128k ar=44100 vcodec=libxvid minrate=0 b=12000k aspect=@16/9 mbd=2 trellis=1 mv4=1 pass=1 s=640x480"
Rendering of "/media/Common/KDENLIVE/untitled.avi" finished
Started render process: "/usr/bin/melt" "consumer:/media/Common/KDENLIVE/scripts/script002.sh.mlt profile=hdv_1080_50i -consumer avformat:/media/Common/KDENLIVE/untitled.avi progress=1 acodec=libmp3lame ab=128k ar=44100 vcodec=libxvid minrate=0 b=12000k aspect=@16/9 mbd=2 trellis=1 mv4=1 pass=2 s=640x480"
Rendering of "/media/Common/KDENLIVE/untitled.avi" finished

-----

I've also tried to generate a script for the file I was going to render. It's a .avi file (dimension 1280 x 720; codec ITU H.264; framerate 24 frames per second) and I wanto to resize it to 640x480. The output of the script is:

[p]//STARTING RENDERING: false , false , "/usr/bin/melt" , "hdv_1080_50i" , "avformat" , "-" , "consumer:/media/Common/KDENLIVE/scripts/script001.sh.mlt" , "/media/Common/KDENLIVE/untitled.avi" , () , ("acodec=libmp3lame", "ab=128k", "ar=44100", "vcodec=libxvid", "minrate=0", "b=12000k", "aspect=@16/9", "mbd=2", "trellis=1", "mv4=1", "pass=1", "s=640x480") , -1 , -1
Started render process: "/usr/bin/melt" "consumer:/media/Common/KDENLIVE/scripts/script001.sh.mlt profile=hdv_1080_50i -consumer avformat:/media/Common/KDENLIVE/untitled.avi progress=1 acodec=libmp3lame ab=128k ar=44100 vcodec=libxvid minrate=0 b=12000k aspect=@16/9 mbd=2 trellis=1 mv4=1 pass=1 s=640x480"
Rendering of "/media/Common/KDENLIVE/untitled.avi" finished
Started render process: "/usr/bin/melt" "consumer:/media/Common/KDENLIVE/scripts/script001.sh.mlt profile=hdv_1080_50i -consumer avformat:/media/Common/KDENLIVE/untitled.avi progress=1 acodec=libmp3lame ab=128k ar=44100 vcodec=libxvid minrate=0 b=12000k aspect=@16/9 mbd=2 trellis=1 mv4=1 pass=2 s=640x480"
Rendering of "/media/Common/KDENLIVE/untitled.avi" finished[/p]

In both cases the problem persists.

I see that you are resizing the video for export. Do you have the same problem if you do not resize?
To check if the problem is with MLT, you can also try that:

melt colour:red in=0 out=50 -consumer avformat:test.avi acodec=libmp3lame ab=128k ar=44100 vcodec=libxvid minrate=0 b=12000k aspect=@16/9 mbd=2 trellis=1 mv4=1 pass=2 s=640x480

It should write a file called test.avi that is a 2 seconds red clip...

executing that line from terminal produced no red clip. Actually a black and 2 seconds clip.

melt colour:red in=0 out=50 -consumer avformat:test.avi acodec=libmp3lame ab=128k ar=44100 vcodec=libxvid minrate=0 b=12000k aspect=@16/9 mbd=2 trellis=1 mv4=1 pass=2 s=640x480
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
|1=-10| |2= -5| |3= -2| |4= -1| |5= 0| |6= 1| |7= 2| |8= 5| |9= 10|
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
+---------------------------------------------------------------------+
| H = back 1 minute, L = forward 1 minute |
| h = previous frame, l = next frame |
| g = start of clip, j = next clip, k = previous clip |
| 0 = restart, q = quit, space = play |
+---------------------------------------------------------------------+
consumer_avformat.c: audio codec libmp3lame unrecognised - ignoring
consumer_avformat.c: video codec libxvid unrecognised - ignoring
test.avi_2pass.log: No such file or directory
Current Position: 50

***

On the other hand, trying to render withouth resizing went ok and misteriously is now ok to render with resizing. I think it's a sort of casual behaviour, isn't it?

Any suggestion, please?

Looks like you are missing some codecs. Did you install all the ffmpeg unstripped stuff?

sudo apt-get install libavcodec-unstripped-52 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0

Should do the trick.

out of no where I am getting the same problem. all of a sudden rendering to either xvid avi or x264 mp4 returns a no data in stream file or a zero length file. here's my info if needed
ubuntu 10.04 with sanub PPA
melt = 0.5.6-0ubuntu0~sunab~lucid1
ffmpeg = FFmpeg version SVN-r25041, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 4 2010 08:58:47 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
x264 = git
kdenlive = 7.7.1 (from ubuntu repos)

Like I said, everything was working when I creating a x264/acc .mp4 a few nights ago and now I don't get anything? If I run mediainfo on the file this is what it returns.
Complete name : /media/HDCM_BACKUP/cappin_vids/need_to_upload/pcp snd 9-3-10.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 159 MiB

any help would be appreciated. i ran the above mlt command also and all i get is black also, no red. well, not to mention when I try to play it with mplayer from command line all that shows is a super quick black box due to it only being 2 seconds long but I don't see any red flash.

That is an extremely new version of ffmpeg; it might have broken h264 export. x264 encoding in ffmpeg is notorious for suddenly changing option/parameter requirements. It will take me a little while to update and test this.

The above melt command using xvid is incorrect because it supplied pass=2, when pass=1 was not run. Therefore, when pass 2 runs, it looks for log files generated by pass 1 and fails. Try it without the pass option and also with vcodec=mpeg4.

I just tested today's checkouts of x264 and ffmpeg, built from source, and it worked for me using kdenlive's render options. So, that's not it. It is possible the mlt package was not rebuilt using the version of ffmpeg that you are using. How did you install ffmpeg and x264? If they did not come from sunab's repo, then his repo may not be synchronized with whatever repo you grabbed x264 and ffmpeg from. Certainly, if you build those from source yourself, then it will be a problem. You can not arbitrarily update dependencies like that.

ok, running the mlt command with no pass=2 and with mpeg4 worked.

i have been using a bash script from google to keep my ffmpeg from svn and x264 from git updated. the script is here:
http://code.google.com/p/x264-ffmpeg-up-to-date/

i was afraid that's what happened. i am unaware of how to go back to a build of ffmpeg and x264 from git so that it works with sanub PPA of melt. Is that the best solution or should I just build melt myself?

thanks for working with a somewhat newbie as far as compiling from source. all these dependencies and video editing stuff is beyond my knowledge I just love using it. thanks for any assistance you can provide.

ok, well I am trying to build mlt from source using your build tips on the mlt wiki or what have you. I am having issues. My ffmpeg is compiled using this:
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab

when I try to compile mlt I use this:
./configure --enable-gpl --disable-mmx --avformat-swscale --avformat-static=/usr/local/src/ffmpeg --avformat-ldextra="-lmp3lame -lfaad -lfaac -lxvidcore -lx264 -lvorbis -ltheora -lvorbisenc -logg -lbz2"

I am getting this error on the configure:
Configuring framework:
Configuring modules:
Configuring modules/avformat:
Configuring modules/core:
Configuring modules/dgraft:
Configuring modules/dv:
- libdv not found: disabling
Configuring modules/effectv:
Configuring modules/feeds:
Configuring modules/frei0r:
- frei0r plugin disabled. Install frei0r-plugins and make sure frei0r.h is available.
Configuring modules/gtk2:
Configuring modules/jackrack:
- jackrack not found: disabling
- ladspa not found; disabling
Configuring modules/kdenlive:
Configuring modules/kino:
- libquicktime not found: only enabling dv avi support
Configuring modules/linsys:
Configuring modules/lumas:
Configuring modules/melt:
Configuring modules/motion_est:
Configuring modules/normalize:
Configuring modules/oldfilm:
Configuring modules/plus:
Configuring modules/qimage:
Qt version 4.x detected, will compile Qt4 qimage producer
Configuring modules/resample:
- libsamplerate not found: disabling
Configuring modules/sdl:
Configuring modules/sox:
Configuring modules/vmfx:
Configuring modules/vorbis:
Configuring modules/xine:
Configuring modules/xml:
Configuring melt:
Configuring mlt++:
Configuring swig:
GPL License Used

and these errors on make command:
http://pastebin.com/WR2RRu2P

any help would be greatly appreciated. I just don't get why this used to work, r24084 of ffmpeg worked. so you're saying that sanub built his .5.6 mlt against a certain FFMPEG install? I didn't realize I shouldn't have updated my ffmpeg to the latest svn.

I know I could probably get svn of ffmpeg from 24084 and build that as I know it works but I figured I'd try to keep the latest svn of ffmpeg and try to compile mlt. Any help would be greatly appreciated.

First, man, that x264-ffmpeg-up-to-date script is very dangerous! There are many packages dependent on ffmpeg, and that is going to really mess up your well-managed system.

In general, you do not want to build mlt from source unless you also want to build Kdenlive from source. However, since there has been very little changes to the MLT ABI, this would not be a problem today. However, this could change at any time, which is why it is bad practice in general. Assuming you still do want to build from source, one difficulty is chasing down all of the dependencies and installing the respective -dev packages. The output you see from mlt configure is a big hint. The basic solution is to review those warnings and look for the related -dev package. Next, we could look at your mlt configure line, and there are some problems I have with it, but you need to understand another big problem: where will you install this? into /usr or /usr/local where it will be unmanaged by packages? Are you in a position to maintain this and remember how to do it again? What if you decide to switch back to someone's packages?

I believe the shortest, easiest and most reliable resolution to get Kdenlive working is to force install the ffmpeg and x264 packages from sunab - he supplies some! I do not know if his ffmpeg breaks other dependents like gstreamer-ffmpeg or VLC and so on. He may have taken that into consideration and chosen to stick to a ffmpeg version that plays well with others.

I have tried to use sanub's repos. the only thing that says it's for lucid is melt, the others are for intrepid and older releases of ubuntu. If I do set all 3, sanub, sanub2, and ffmpeg-trunk. I get this dependency issue

The following packages have unmet dependencies:
kdenlive: Depends: libavfilter-extra-0 but it is not going to be installed
E: Broken packages

i do not have medibuntu repos enabled either. I am not sure what's going on. I don't know how to "FORCE" the install of kdenlive as you say.

deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

deb http://us.archive.ubuntu.com/ubuntu/ lucid-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-security main restricted
deb http://us.archive.ubuntu.com/ubuntu/ lucid-security universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-security universe
deb http://us.archive.ubuntu.com/ubuntu/ lucid-security multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-security multiverse
deb http://us.archive.ubuntu.com/ubuntu/ lucid-proposed restricted main multiverse universe

#added for docky

deb http://us.archive.ubuntu.com/ubuntu/ lucid-backports restricted main multiverse universe

#added for mlt 0.5.6
deb http://ppa.launchpad.net/sunab/ppa/ubuntu lucid main
deb-src http://ppa.launchpad.net/sunab/ppa/ubuntu lucid main
#added for ffmpeg/kdenlive/mlt
deb http://ppa.launchpad.net/sunab/ffmpeg-trunk/ubuntu lucid main
deb-src http://ppa.launchpad.net/sunab/ffmpeg-trunk/ubuntu lucid main
deb http://ppa.launchpad.net/sunab/sunab2/ubuntu lucid main
deb-src http://ppa.launchpad.net/sunab/sunab2/ubuntu lucid main

At this point I don't really care what gets installed. I just want a working kdenlive again like I had 4 days ago. I just can't find the combination of ffmpeg, mlt, ffmpeg libraries, and kdenlive that works anymore. I have veen tried building ffmpeg r24084 again but that fails also with this message at make and then at checkinstall.

libswscale/rgb2rgb.c: In function ‘palette8tobgr16’:
libswscale/rgb2rgb.c:234: error: implicit declaration of function ‘av_bswap16’
make: *** [libswscale/rgb2rgb.o] Error 1

checkinstall also fails:
========================= Installation results ===========================
INSTALL libavdevice/libavdevice.a
INSTALL libavfilter/libavfilter.a
INSTALL libavformat/libavformat.a
INSTALL libavcodec/libavcodec.a
INSTALL libpostproc/libpostproc.a
CC libswscale/rgb2rgb.o
libswscale/rgb2rgb.c: In function ‘palette8tobgr16’:
libswscale/rgb2rgb.c:234: error: implicit declaration of function ‘av_bswap16’
make: *** [libswscale/rgb2rgb.o] Error 1

**** Installation failed. Aborting package creation.

Cleaning up...OK

I tried emailing sanub but haven't heard anything back yet.

ok. i had a major brain fart and apparently kdenlive was writing zero size files because my hard drive that kdenlive was trying to save the rendered file to was full. Now I am all good. I ended up with this combination of software.

ffmpeg = medibuntu repo (SVN-r0.5.1-4:0.5.1-1ubuntu1)
libavcodec-extra-52 and all other ffmpeg libraries (4:0.5.1-1ubuntu1+medibuntu1)
mlt = sanub2 PPA (0.5.7+git20100907.c8b11129-0ubuntu0~sunab~lucid1)
kdenlive = sanub2 PPA (0.7.7.1+svn20100907.r4857-0ubuntu0~sunab~lucid1 )

I will say the new kdenlive has a slicker look and I can now see the audio wave pictoral within the timeline so I know where to cut if I am looking for a no audio point. I can now encode to x264 and aac again. I love it!!!

When I upgraded to ubuntu 12.04 - precise encoding of Xvid files started to fail on me and produce an empty file.
And the error log was similar to Munaciello's error from 9/3/2009.

Rendering of /home/ttguy/Videos/home_movies_vol23a-test.avi crashed
[dv @ 0x20f75d60] Estimating duration from bitrate, this may be inaccurate
-snip-
[consumer avformat] audio codec libmp3lame unrecognised - ignoring [consumer avformat] video codec libxvid unrecognised - ignoring
-snip-
[dv @ 0xb5b0c320] Estimating duration from bitrate, this may be inaccurate
[avi @ 0xb680adc0] no streams

This was solved by following some guidance from http://ubuntuforums.org/archive/index.php/t-1117283.html which suggested to install libavcodec-extra-53

sudo apt-get install libavcodec-extra-53

Which I did. This does not immediately fix the problem. You then need to open Kdenlive and run Settings>Run Config Wizard again.
After this - bingo - can encode Xvid