Interlaced ProRes-Kostya exporting

Hello!
I have found on FFmpeg-user forum that only ProRes-Kostya codec with “-vf setfield=tff” option gives correct interlaced ProRes in QT mov. However, adding this option in “Other” tab (and interlaced setting in VIdeo tab) did nothing but progressive ProRes. Is it possible to implement this option when exporting with intermediate/ProRes-Kostya?
Thanks
houdini

Reference: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2016-February/030864.html

That is a ffmpeg command line option that tells it to output top field first. Shotcut is not simply a ffmpeg command line frontend like many transcoding GUIs. The way the two handle filters is very different. The equivalent thing in Shotcut is to go to Encode > Video and set Scan mode to Interlaced and Field order to Top Field First.
I just made a test, and it works as expected. Here is the otuput from MediaInfo:

Scan type                                : Interlaced
Scan type, store method                  : Interleaved fields
Scan order                               : Top Field First

Also, be aware that if you do anything that affects an interlaced image’s vertical resolution, then it is automatically deinterlaced because MLT does not have a field-aware scaler.

I indeed set Scan mode to Interlaced and Field order to Top Field First to no avail.

My input source in MediaInfo (180i50 AVCHD mts):
Scan type: Interlaced
Scan type, store method: Separated fields
Scan order: Top Field First

My output mov from Shotcut in MediaInfo (Intermediate/ProRes-Kotsya mov):
Scan type: Progressive
Original scan type: Interlaced
Original scan order: Top Field First

In my reference I think the author use “-vf setfield=tff -flags +ilme+ildct” to flag simultaneously the container “-vf setfield=tff” and the frames '-flags +ilme+ildct"

It works for me on Windows with v16.09 - using either a clip-based project or timeline - using either Settings > Video Mode > Automatic or 1080p.

MLT already does the equivalent “under-the-hood” using the FFmpeg library APIs.

Simply load the source clip, and export it using the appropriate settings. Do not add anything else to the Other box. Verify the new output is incorrect. If so, right-click the job in Shotcut and choose View XML. Save that and attach it here.

I use Shotcut v16.09.01 on OS X El Capitan. I exported as you told me with same results when exporting from the timeline or playlist with Settings>Video Mode>Automatic or HD 1080i 25 fps and did nothing else to the Other box. Attached is the XML export file test_timeline_mov.txt (4.4 KB)
I would like to thank you for Shotcut development!

I use last MediaInfo v0.7.88 as previous versions may have vocabulary changes for interlacing infos…

After a search I found that in my output mov from MediaInfo:
Scan type: Progressive
Original scan type: Interlaced
Original scan order: Top Field First

“Scan type: progressive” means that the mov container has got a “fiel” atom set as progressive but the raw stream is correctly encoded interlace top field first. I can change the “fiel” atom progressive to interlace with JES Extensifier.

OK, using mediainfo v0.7.83 on one of my OS X machines, I get the same result as you now. I think the problem may be here: https://github.com/mltframework/mlt/blob/master/src/modules/avformat/consumer_avformat.c#L1877

Maybe I should be using AV_FIELD_TT instead of AV_FIELD_TB, AV_FIELD_BB instead of AV_FIELD_BT, but I think I based my decision on this:

Anyways, I will look into it further; maybe somehow the MLT frame is being incorrectly flagged as progressive.

On Ubuntu 16.04, using MediaInfo v0.7.82, and on Windows 10, using MediaInfo v0.7.86 both display “Scan type: Interlaced” for me and “Scan type, store method : Interleaved fields” in place of the “Original scan type” field.

When I make the code change I mention above on Ubuntu, then “Scan type, store method” changes to “Separated fields”. I think “Interleaved fields” is more accurate. However, both FFmpeg and Apple QuickTIme docs say TT vs. TB is about stored vs. displayed order and nothing about interleave vs. separated. So, I do not understand what MediaInfo is trying to claim here.

Here is a post about Quicktime interlacing in MediaInfo may be related to that matter. Quite arduous for me to understand!

https://sourceforge.net/p/mediainfo/bugs/822/

Note that ffmbc encoding to interlaced ProRes mov gives correct results with MediaInfo rather to ffmpeg.

The Apple Technical Note TN2162 explains a lot. I found that on one OS X machine I get correct output with fiel hex 02 09, but on another one I do not - both using the same 1080i50 AVCHD clip. But they have different number of CPUs. Try this: in Export > Video turn off Parallel processing. I reproduced your problem on the machine with more CPUs, but when I turn that off I get correct output.

On my Mac Mini (Macmini6,2) Intel Core i7 2,3 GHz I did not get correct ouput with Export > Video > Parallel processing turn off :frowning:

Hi!
I can bet that this profile ProRes-Kostya was created by me long time ago when I was working on video of my son whose name is Kostya. And did some experiments with it… I wonder how this my pure local custom profile got into other public places, because I didn’t send it anywhere and didn’t upload for any discussions or Git or whatever…

Any clue how this could happen?

for reference http://codecs.multimedia.cx/?p=388 :slight_smile:

Ah! I see what is coincidence… Very funny. :slight_smile:
Please dismiss :slight_smile: