-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with newer ffmpegs (interlace-mode) #137
Comments
Actually, having done some more testing right now it doesn't appear |
Command to test different ffmpec commandlines:
According to the EMBL-Spec:
|
@Florob setting the
|
From what I've heard the behavior seems to depend on the input too. Adding the flag in exactly that place to our |
Unfortunately, this depends on FFmpeg version. Some big changes have been going on. Just today was another commit that affected this, and passing interlaced flag to playout still seems impossible (but that's not related to this problem). |
It seems we need a more controlled approach to this. Maybe setting up multiple ffmpeg-versions, testing each with both options given would make a more informed decision possible |
I conducted a matrix-test on this issue. For ffmpeg 2.5, 2.6, 2.7, 2.8, 3.0, 3.1, 3.2, 3.3 and master I compiled a static binary based on the latest patch-level for the respective version, linked with the latest decklink sdk. You can download the binaries here. For all of these binaries, I conducted the following tests:
You can find the build instructions and the actual command run for each of these tests here: The raw test-results can be found here: I structured and color-coded the results into an spreadsheet, which can be found here: The results are quite interesting: My observations are as followes:
regarding
regarding
My conclusion is therefore as follows:
|
What does respecting |
It seems there is another issue playing a role in this. Testing on gstreamer 1.8.3 (the version packaged in xenial-updates), matroskademux seems to mis-interpret the EBML-Header value. For empiric observation I created mkv-files with each of the observed interlace-modes (absent, 0, 1 and 2): https://c3voc.mazdermind.de/permanent/voctomix-issue-137-ffmpeg-interlaced-mkv/all-mode-mkvs.zip running all of these files against a simple gstreamer pipeline (see test-procudure) results in this output:
So it seems the interlaced-field is treated as a boolean field, with absence or 0 being interpreted as no interlacing whereas 1 and 2 being interpreted as interlaced content. This is on par with the code found in This contradicts the Matroska Specification stating
From the code it looks like the FieldOrder Flag is totally ignored by the matroskademux Edit: reported bug at gstreamer bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=787206 |
@Florob at c3voc we run a very crude mode, where we feed interlaced video into voctomix, pretending it is progressive and deinterlacing whatever comes out of the other end. This mode of operation is not desirable but I have not been able to work enough with one of the Panasonic cameras to see if it can actually send 1080p25 via SDI, so for the time being we still run this crude hack. With ffmpeg master it will require us to fake the input being progressive, despite it being correctly identified as interlaced. But you're right in the point that such a hack should not be in the voctomix example script. I modified my comment above to reflect that. |
Accepting that this is a bug in gstreamer which is present in all recent relases and given that we want voctomix to be compatible with the ffmpeg- and gstreamer-versions out there, I'd like to propose to add a work-around to voctomix. Requiring a master-build of gstreamer or an old ffmpeg-Version is not a desirable option to me. To be specific I would port the fix I made for the multiview-monitor to voctomix. The warning should point out that voctomix was informed that the source-video is interlaced but this might actually be untrue, because there is a bug in the matroska-demuxer of gstreamer. |
I would disagree with "that she or he is responsible to only feed progressive content to voctomix" because it is our reality to tunnel interlaced content - which is perfectly fine. The warning text you propose could mislead users to thinking that they have to deinterlace content before feeding it into voctomix, which is not true. What voctomix actually needs is getting fed with content that is flagged as progressive. |
I think a lot of this boils down to discussion we could also have on #106. That said, what we do want is loads of flexibility in handling/reinterpreting content. Simply because incorrectly flagged content is so common. I.e. even in the absence of the gstreamer bug I think we'd still want this. Example: |
@Florob In my mind the point of this Issue is to allow sourcing content with recent ffmpeg versions (whichever kind of content that is). The whole voctomix core is not capable of handling content marked as interlaced so at some point in the input chain something has to mark the content as progressive. Ideally this would be ffmpeg as the root source, but the gstreamer bug does prevent this. Next in line is our TCPAVSource implementation. Following your preference I go forward and disallow sources which are marked as mixed or interlaces, printing a warning which is along the lines of
Setting this option would inject the capssetter, but this has to be a deliberate decision. Regarding the decklinksources aready running yadif I opened #153 to update the example-scripts |
This will win the Pulitzer award for the most verbose warning message ;) Thumbs up for that one. edit by @MaZderMind: moved discussion about deinterlacer in the decklink-sources to #154 |
What's missing for this to be implemented? |
Only Time, I guess.
|
I think this topic is affecting the demo's too, they wont run with the default config provided complaining about different cap settings |
@hayden-t most probably. It might be a good Idea to add the |
will try this, are we talking core config file ? i had some luck with mixed mode but this may be better. |
Newer ffmpegs set the fields in the mkv stream different, when the interlace-mode is unknown.
Older ffmpegs just the the mode to progressive which is the value voctomix expects. Newer versions set it to undefined (which means that each frame has its own interlaced-flag). Voctomix can't handle this format.
Setting
-field_order 0
on ffmpeg forces ffmpeg to write the interlace-mode as progressive. We should check if older ffmpegs can live with this additional flag and extend all ffmpeg-based example-script with it.Edit: Additionally voctocore should print out a helpful message when such a situation is encountered with a hint on how to change the sourcing ffmpeg script, to make it compatible again.
The text was updated successfully, but these errors were encountered: