Better quality output switches for MLT in export options ?

Asked by GMaq

**Note**
I posted this originally at the user forum but thought it made more sense here, I will remove my post at the user forum.

Hi,

I am by no means an ffmpeg expert but my first open-source gig was writing many of the presets that come included with "WinFF". I absolutely am a super-fan of Openshot but I have to admit to being a little troubled by the quality of output specifically for MPEG-2 DVD and H.264 for portable devices. I have muddled around in the Openshot preset .xml files and am not 100 percent sure how the syntax works or what the availability is of advanced ffmpeg options within the MLT framework.

For instance using the following ffmpeg pipe command from Cinelerra (video rendering only) is giving me far better DVD output quality and interlaced field handling than the standard Openshot export:
[code]-target ntsc-dvd -bf 2 -flags ildct+ilme -f mpeg2video %[/code]

Additionally Openshot exports for an iPod at TV screen resolution are very blocky and pixelated at the stock "low" bitrate setting of 1.25mb/s which is a very high bitrate for an H.264 portable preset, the following ffmpeg iPod WinFF preset gives incomparably better visual quality at a lower bitrate:
[code]-acodec libfaac -ab 112k -ac 2 -s 640x480 -vcodec libx264 -vpre hq -vpre ipod640 -crf 21 -bt 256k -f ipod[/code]

also it is an important thing to note that the iPod/iPhone example above is using "-crf" Constant Rate Factor which is a much better scenario for one-pass H.264 encoding.

What is my point?

 Certainly not that Openshot is bad, it is an incredible accomplishment, nor am I trying to boast about one preset over another, these are very common ffmpeg options and I'd like to see them available in Openshot. I truly believe that the ability to accomodate some of these advanced ffmpeg tweaks and settings into the Export functionality would be something to be considered because there is a definite visual improvement from a few minor ffmpeg tweaks. I completely understand that Openshot exporting needs to be point and click simple, that is precisely why all of the extra quality switches were intentionally hidden in WinFF presets so that the end user could still just point and click and the extra stuff was all taken care of behind the scenes.

I love Openshot and 110% support it, but at the present time I still am using WinFF and Cinelerra to get the output quality I want, I respectfully suggest that improving some the export presets would be an area for some further consideration. Has a "pipe" option or frameserving to a different encoder of choice (ie HCEnc in Wine) or even direct ffmpeg export ever been considered, or are these things already possible?

Question information

Language:
English Edit question
Status:
Answered
For:
OpenShot Video Editor Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Girard (eolinwen) said :
#1

Hi Gmaq,

Thanks for you help and your support, there is a patch done (with this bug : https://bugs.launchpad.net/openshot/+bug/591922) who correct this bad parameters for the DVD preset. Perhaps that parameters could do the things better.
About the H2654 preset, i don't know, using it rarely. I have learn something about the crf " Constant Rate Factor and that 's right that you have better result with H264 at a second pass.
Thanks for all.

Revision history for this message
Ilya Murav'jov (muravjov-il) said :
#2

As for DVD options:
1) -target ntsc-dvd: already in the patch
2) -bf 2: it is by default for ffmpeg (binary), probably for MLT too
3) -f mpeg2video: is on if -target ntsc-dvd is there
4) -flags ildct+ilme: this is 'interlaced field handling'; cant say anything is it definitely good

Revision history for this message
GMaq (info-bandshed) said :
#3

Hi,

Thanks guys,

I have found an annoying bug in ffmpeg that may cause more trouble.

 I have noticed that the most recent versions of ffmpeg seem to have broken 4:3 aspect ratio in 'target ntsc-dvd'. Even with the flagged -aspect 4:3 the resulting files are reporting an aspect ratio of 3:2 and are not accepted by Bombono DVD. This happens with ffmpeg DVD exports from WinFF and Cinelerra right now, in fact the ONLY way I can get a DVD compliant mpeg file that Bombono will accept right now is to use mpeg2enc piped from Cinelerra. I haven't used mencoder but I haven't liked it for DVD in the past.

I have not tried the Openshot patch yet with Bombono but until they fix this in ffmpeg it could continue to be an issue, is the Openshot patch in bzr yet to try or does it need manual patching still?

Revision history for this message
Olivier Girard (eolinwen) said :
#4

Thanks to you two.
Yesterday, i will said no but i have seen a lot of mail of Jonathan that i have not yet reading.
And i know that the trunk has been updated this last days but i'm not sure that the patchs will have taken in.
i'll let you know if i know more.

Revision history for this message
Olivier Girard (eolinwen) said :
#5

Well, it is in the trunk now so soon as the time, i will test. I hope before the end of this week.

Can you help with this problem?

Provide an answer of your own, or ask GMaq for more information if necessary.

To post a message you must log in.