OpenShot / openshot-qt

OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality video editing and animation solutions to the world.
http://www.openshot.org
Other
4.33k stars 540 forks source link

Files sometimes get clipped in timeline #5538

Open jhankin1 opened 4 months ago

jhankin1 commented 4 months ago

Describe the bug: Sometimes, the last few seconds of the clip disappear when it's imported in the timeline. Here is a link to one of the offending clips.

https://drive.google.com/file/d/1SWt9ha0t2tLputTp4aW7pcrY0TeP8ycO/view?usp=drive_link

Steps to reproduce the behavior:

  1. Import file into OpenShot
  2. Drag file into timeline

Expected behavior: The file should show up with its full length (about one minute and one second).

System Details:

Log Files:

libopenshot.log openshot-qt.zip

Colorjet3 commented 4 months ago

Hello @jhankin1

  1. Is this video your source file and not the exported file?
  2. What type of a file is your source file (.mp4? .mov? etc?).
  3. You say that this only happens sometimes? Please elaborate on this. Is it just dragging onto the timeline when it happens? Are thee anything you are doing in OpenShot that might cause this? etc?
jhankin1 commented 4 months ago
  1. It's one of my source files.
  2. It is an MP4 -- the very video you can see.
  3. It seems like only recent dash cam footage is affected, so it's probably the result of a firmware update of some kind. (I think the camera updates itself over the air.) The bug happens without jumping through any hoops. I've actually had issues with BlackVue dash cams in past years -- a few years ago, I submitted a bug report because OpenShot couldn't handle the audio. Even today, I have to convert the audio to a form that OpenShot supports in order to work with it.
Colorjet3 commented 4 months ago

Thank you @jhankin1 for that information.

I know that other advanced audio editors sometimes will analyze imported files and perform the necessary conversion to be able to process them. OpenShot does not have that and thus you must sometimes go through a conversion process. I've seen this happen with .mkv files as well.

The conversion process is the the solution for now. Feel free to close the ticket unless there is something more you need regarding this issue.

jhankin1 commented 4 months ago

Before we ring the bell on this issue, I'd like to point out that your response only addresses the audio, which I presented only as a color detail, not part of the complaint. Did you follow the steps in the original post? When you dragged the video into your timeline, did it show up with the full one minute and one second, or did part of the video not show up, like in my case? If your OpenShot is working, that means I'm going to have to figure out how to re-install with the default settings, and I'm not sure how I would do that. I also doubt it would work.

Colorjet3 commented 4 months ago

Hello @jhankin1 I missed the whole 1 min. and one second so my apologies for that. I just retested with the latest dev daily build #12442 and can replicate your issue.

  1. I downloaded the attached video.
  2. In Windows File Explorer I right click your file and Properties | Detail tab. Video length show as 00:01:00.
  3. I ran it through a converter (ShutterEncoder). Checking the Properties | Detail tab the Video length is now 00:01:01. This is interesting that Windows File Explorer only shows 1:00 on the original file.
  4. Imported both the original and the converted files into Openshot and the original clip Duration (Properties of the clip) is 54.21 and the converted one is 54.22.

Not sure what is going on. I am going to ask the lead developer to look into this.

Colorjet3 commented 4 months ago

Hello @jhankin1 I have pinged the lead developer.

Meanwhile I some additional research and found that the mismatch of length can exist with Variable Frame Rate (VFR) videos. Does your camera record in VFR format? If so, and according to literature on the web, VFR videos are recorded at different frames which in turn cause some frames to be displayed longer or shorter.

So, OpenShot most likely is setting the frame rate to match the Profile you have chosen (the default is 30fps). So the duration of the video isn't going to match your original video. This would then mean that you are not missing any frames. It just that all your frames are set to 30fps.

jhankin1 commented 4 months ago

Thank you for researching this. Unfortunately, though, I have checked this, and I am losing frames. I have noticed, though, that some applications can convert the clips to MKV format, then if I import the converted files into OpenShot, they show up with the correct length, and no frames appear to be lost. This is a painfully slow workaround, though, so I hope a genuine fix comes about.

Colorjet3 commented 4 months ago

Yes, I have noticed that some other video editor handle this much gracefully. I am going to flag this as a "Bug" also.

Hopefully, the lead developer will review this at some point and have come up with a solution and implement.