The Wayback Machine - https://web.archive.org/web/20210124113042/https://github.com/OpenShot/libopenshot/issues/581
Skip to content
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

MTS files don't work in all the daily builds #581

Open
01BartvR opened this issue Oct 13, 2020 · 13 comments
Open

MTS files don't work in all the daily builds #581

01BartvR opened this issue Oct 13, 2020 · 13 comments

Comments

@01BartvR
Copy link

@01BartvR 01BartvR commented Oct 13, 2020

Question:
MTS files don't work in daily builds (Open Shot 2.5.1) from september until now. I've tried several workarounds and they are succesful (converted to mp4 files) But that is a temporary solution. A MTS-file doesn't work in a daily build. The program crashes.
There are a lot of Sony and Panasonic camera owners that use the mts format. I think that I am not the only one that encounters this problem.

System Details:
Open Shot 2.5.1

  • Operating System Windows 10 home
@ferdnyc
Copy link
Collaborator

@ferdnyc ferdnyc commented Oct 15, 2020

@01BartvR

Hmm, you say this started in September?

The most likely cause is probably 650adf6, but that's only a guess based on the timeframe.

Do you have a sample .MTS file that OpenShot crashes on? That'd be helpful, in looking at this. If you have one that's under 2MB, you can archive it into a ZIP file and attach it to a Github issues comment directly.

@01BartvR
Copy link
Author

@01BartvR 01BartvR commented Oct 15, 2020

I have tiny (2MB ! ) sample of a .mts shot.
demo 1OpenShot 2.5.1.mts file.zip

@ferdnyc
Copy link
Collaborator

@ferdnyc ferdnyc commented Oct 15, 2020

@01BartvR

The zip contains this file: demo 1OpenShot 2.5.1.mts file.mp4 which OpenShot has no problem importing. Is that the correct sample?

@ferdnyc
Copy link
Collaborator

@ferdnyc ferdnyc commented Oct 15, 2020

(I also tried converting it to .MTS on my end, but the resulting file still opened fine — that may be due to the MP4 origin, though. So, I want to be sure I'm starting with a file that we know is causing problems for you.)

@01BartvR
Copy link
Author

@01BartvR 01BartvR commented Oct 16, 2020

I've checked it twice and just to be certain I send you another sample. Both MTS samples are doing fine with the original OpenShot 2.5.1release, but it doesn't work when I use a daily build (even a daily build from 15 Oct.)
demo 2 OpenShot 2.5.1 mts sample.zip

@01BartvR
Copy link
Author

@01BartvR 01BartvR commented Oct 16, 2020

An additional comment: MTS files work with VideoLan (VLC Mediaplayer) on my computer

@ferdnyc
Copy link
Collaborator

@ferdnyc ferdnyc commented Oct 17, 2020

@01BartvR

So you're saying the file in that ZIP you posted won't open in OpenShot?

I'm just confused because, looking at the second file you posted:

  1. it imports fine for me (I mean, it's black for the first 2-3 seconds, but that's true in any video player I try as well), but more importantly
  2. it doesn't appear to be an MTS file at all

I was expecting an MPEG Transport Stream (what used to be a .ts file, before three-letter-extensionism took over), while this file appears to be a perfectly ordinary MP4 containing AVC and AAC encoded streams:

image

@01BartvR
Copy link
Author

@01BartvR 01BartvR commented Oct 17, 2020

I think I know what the problem is. But first I want to thank you for the effort you made
Last week I sent you an original file from my camera (Panasonic AG-AC90). Because the file is too big to send with GitHub I cut the big file with Open Shot and made a tiny film. The original MTS file becomes in that way a MP4 file.
Today I made a new little original MTS film with my camera. I have to use a different format (1280x720) on my camera, otherwise it is too big to send ( 2 sec. - 2,6 MB)
00104.zip

@ferdnyc
Copy link
Collaborator

@ferdnyc ferdnyc commented Oct 17, 2020

@01BartvR Ah, perfect! That was exactly what I needed, thanks.

Yes, I can confirm that OpenShot is unable to correctly process the supplied MTS file as an input video; attempts to read it quickly break down into a storm of invalid read operations, hundreds of frames away from the intended location. (And that file doesn't even have hundreds of frames in it!)

The bug is definitely somewhere in the libopenshot backend; I'm going to transfer this issue over there so that it has a better chance of being seen by the right developers.

@ferdnyc ferdnyc transferred this issue from OpenShot/openshot-qt Oct 17, 2020
@jonoomph
Copy link
Member

@jonoomph jonoomph commented Oct 19, 2020

I tested the file this morning, and it appears that we read in the first 8 video packets successfully (i.e. thumbnail works in OpenShot), but something goes horribly wrong when we decode the first few audio packets... all the timestamps seem to start at frame 98, and thus, the first 98 video frames have no audio packets... which freezes up OpenShot while it tries to figure this out.

However, after a long pause, I am able to playback the video (with glitchy audio). I would suggest converting your MTS files into MP4 before editing... as a general work-around, it is a much nicer format for video editing. I will add this test file to my "queue" of broken videos, and try and find a better algorithm for mismatching audio timestamps.

@01BartvR
Copy link
Author

@01BartvR 01BartvR commented Oct 20, 2020

Thank you for the effort you made. I used the workaround in daily builds (MTS>MP4) for quite a while. Curiously mts files work fine in the original OpenShot 2.5.1 release. I hope you find a solution.

@ferdnyc
Copy link
Collaborator

@ferdnyc ferdnyc commented Oct 21, 2020

@01BartvR That makes sense, yeah. The libopenshot audio processing is undergoing a fairly substantial rewrite from the 2.5.1 code (libopenshot 0.2.5), with the aim of addressing some longstanding reports of users experiencing audio artifacts in their output — things like clicking and popping at clip borders, other types of distortion, etc.

Part of that effort entails some changes being made to the way libopenshot initially reads and stores audio data from the input files. You've discovered a file type that causes the new input processing code some headaches, it seems.

(So, thanks again. The time to find these things is now, before the code is finished. Rather than to have bug reports start flooding in after the next release.)

Hopefully this will be addressed before then. But as things stand, the Daily Build versions won't fully support TS files for at least some of the current development cycle.

@stale
Copy link

@stale stale bot commented Jan 19, 2021

Thank you so much for submitting an issue to help improve OpenShot Video Editor. We are sorry about this, but this particular issue has gone unnoticed for quite some time. To help keep the OpenShot GitHub Issue Tracker organized and focused, we must ensure that every issue is correctly labelled and triaged, to get the proper attention.

This issue will be closed, as it meets the following criteria:

  • No activity in the past 90 days
  • No one is assigned to this issue

We'd like to ask you to help us out and determine whether this issue should be reopened.

  • If this issue is reporting a bug, please can you attempt to reproduce on the latest daily build to help us to understand whether the bug still needs our attention.
  • If this issue is proposing a new feature, please can you verify whether the feature proposal is still relevant.

Thanks again for your help!

@stale stale bot added the stale label Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants