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

DNxHD export artifacts

Tags: None
(comma "," separated)
stefanodroghetti
Registered Member
Posts
11
Karma
0

DNxHD export artifacts

Mon Aug 25, 2014 9:13 am
Using ffmpeg to convert Canon 1980x1080 25p clips to DNxHD works like a charm, while avconv creates strange artifacts. Problem solved installing ffmpeg instead of avconv thanks to good PPA in Ubuntu.

The real problem is when I export a Kdenlive project to DNxHD: the artifacts are back. Probably, mlt has the new "engine" which creates the same problems with DNxHD?

Here's Ubuntu repositories for ffmpeg in 14.04:
Code: Select all
ppa:mc3man/trusty-media


Here's the command I use to convert Canon MTS files to DNxHD:
Code: Select all
ffmpeg -i file.MTS -r 25 -vb 120000k -threads 2 -vcodec dnxhd -acodec copy -f mov file.mov

If many files:
Code: Select all
for i in ./*.MTS; do ffmpeg -i "$i" -r 25 -vb 120000k -threads 2 -vcodec dnxhd -acodec copy -f mov ./`basename $i .MTS`.mov; done


If I use avconv instead of ffmpeg, no errors but clips have so many artifacts. Like this:
Image

So, I convert them with ffmpeg, then I import them in Kdenlive. I do a nice job in editing, I press "Export red button and I choose my favorite near-lossless master format: DNxHD, which I normally create by myself after "Download export prifiles" doesn't work anymore in Kdenlive.
I use this export profile:
Code: Select all
f=mov
mlt_profile=atsc_1080p_25
vb=185M
vcodec=dnxhd
acodec=pcm_s16le
ar=48k
ac=2


But I tried many other ways, and the result is always a video with the same horrible artifacts I avoided using ffmpeg instead of avconv in the first transcoding.

Any suggestion?

I use:
Kdenlive 0.9.8 (from Sunab stable repositories for Ubuntu 14.04, in Xubuntu 14.04 64bit LTS)
mlt 0.9.0
stefanodroghetti
Registered Member
Posts
11
Karma
0

Re: DNxHD export artifacts

Mon Aug 25, 2014 9:33 am
Actually, if I add this parameter
Code: Select all
mbd=2

artifacts are gone. But conversion is incredibly slower. :-( More than 5 times slower.
sgofferj
Registered Member
Posts
31
Karma
0
OS

Re: DNxHD export artifacts

Sun Sep 14, 2014 11:37 am
avconv on Ubuntu is extremely immature, buggy and slow. I just ran into some weird problems with mp4/xvid-rendering... S. http://ubuntuforums.org/showthread.php?t=2244006

Edit:
You did change the renderer in Settings -> Configure kdenlive -> Environment -> MLT environment -> FFmpeg from avconv to ffmpeg, right?
stefanodroghetti
Registered Member
Posts
11
Karma
0

Re: DNxHD export artifacts

Sat Sep 20, 2014 2:19 pm
Yes I did but nothing changes. That option turns avconv to ffmpeg only when you convert files from the source windows, in order to make source clips more compliant to the project specifications. That doesn't affect rendering, which uses Melt. So, I think the problem is that Melt uses avconv instead of mmpeg. So the key could be how to tell Melt to use ffmoeg instead of avconv.

Update: in a recent project, even with mbd=2 I found small artifacts.
User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS

Re: DNxHD export artifacts

Wed Sep 24, 2014 11:12 am
I think the problem is that Melt uses avconv instead of fmpeg

Are you sure about this? I would have thought changing the settings in MLT environment is going to change what MLT uses to render.

Settings -> Configure kdenlive -> Environment -> MLT environment -> FFmpeg
ddennedy
Registered Member
Posts
1315
Karma
1

Re: DNxHD export artifacts

Wed Oct 01, 2014 7:04 pm
ttguy wrote:
I think the problem is that Melt uses avconv instead of fmpeg

Are you sure about this? I would have thought changing the settings in MLT environment is going to change what MLT uses to render.


Do you really think MLT is simply a command line frontend that generates avconv/ffmpeg command line options? It uses libavformat and related libs and APIs of whatever it was built with. There is no way to switch it without rebuilding MLT. The only thin a setting could control is what Kdenlive uses for the Transcode function, which is done outside MLT.


User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS

Re: DNxHD export artifacts

Wed Oct 01, 2014 10:05 pm
Thanks Dan for clearing that up. I thought wrong then.

I had this image of kdenlive passing a parameter to melt telling it to use ffmpeg or avconv. But I was dreaming I guess. :<
User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS

Re: DNxHD export artifacts

Wed Oct 01, 2014 10:10 pm
Maybe you could try a daily build version of Kdenlive - these use ffmpeg by the looks and they run in their own little sandbox.
pnikiel
Registered Member
Posts
4
Karma
0

Re: DNxHD export artifacts

Sat Oct 11, 2014 7:42 am
Hi,
I can also confirm the problem completely, actually both parts of it:
1) transcoding to DNxHD with avconv produces unacceptable artifacts, while transcoding using ffmpeg works like a charm
2) rendering to DNxHD using melt produces artifacts

I however made one additional step: I built ffmpeg from sources and installed it to a separate location, and then built melt from sources statically linked to that ffmpeg, and unfortunately I still see the artifacts…

any ideas from experts on what i could try next?
pnikiel
Registered Member
Posts
4
Karma
0

Re: DNxHD export artifacts

Sat Oct 11, 2014 10:39 am
one correction: i wasn't loading proper MLT library while doing the test described above, stay tuned, I will provide results.
pnikiel
Registered Member
Posts
4
Karma
0

Re: DNxHD export artifacts

Sat Oct 11, 2014 12:47 pm
Okay, here is how to fix these artifacts:
- uninstall kdenlive and mlt (both melt and libmlt*) from Ubuntu
- get kdenlive from sources using this script:
http://www.mltframework.org/bin/view/MLT/BuildScripts
(Click on "show kdenlive")

Works great. I can get back to editing my movie, yeah ;-)


Bookmarks



Who is online

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