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

Openshot preview does not match exported clip (1/4 speed slice not exporting correctly) #1438

Closed
jmollo310 opened this issue Mar 29, 2018 · 54 comments
Labels
🐞 bug A bug, error, or breakage of any kind stale This issue has not had any activity in 60 days :(

Comments

@jmollo310
Copy link

jmollo310 commented Mar 29, 2018

System Details:

  • Operating System / Distro: Windows 10 1920x1080 NVidia GeForce 1060 3GB, intel i7-700, RAM 16 GB
  • OpenShot Version: 2.4.1
    Issue Description and steps to reproduce:
    Using prerecorded nvideo shadowplay clips of PUBG game, I do the following:
  1. Enter 1 clip as track 0
  2. Enter 2nd (very large clip) as track 1
  3. Slice track 1 first keeping right side
  4. Align tracks
  5. Slice track 1 keeping left side
  6. Copy track 1 and place copy in track 2
  7. Set track 2 to slow 1/4 speed
  8. Export clip

Exported clip shows a stopped stuttered frame where the 1/4 speed track 2 should be and it's about 15 seconds before track 2 slice should be beginning.
Here is a youtube clip showing entire process: https://youtu.be/YdCV-dmZ7GQ

@peanutbutterandcrackers
Copy link
Contributor

I am not so sure about the issue itself but could you perhaps please give the latest daily build a shot? Please head over to the download page and click on 'daily builds' button and grab the latest one; uninstall the current OpenShot version and install the latest build, and see if this still persists in the latest version. Thanks!

@peanutbutterandcrackers
Copy link
Contributor

peanutbutterandcrackers commented Mar 30, 2018

P. S: Thank you for the good report. It is very thorough. I'm sure it will help the devs understand the issue really well (and hopefully fix it really soon).

@jmollo310
Copy link
Author

jmollo310 commented Mar 31, 2018 via email

@jmollo310
Copy link
Author

jmollo310 commented Mar 31, 2018 via email

@jmollo310
Copy link
Author

Also, if you have a ftp site, I have the actually files that I can upload. One is 8 GB though and the other only 100 MB

@DylanC
Copy link
Collaborator

DylanC commented Mar 31, 2018

@jmollo310 - Perhaps can you upload the 100MB zip somewhere and provide us a link?

@jmollo310
Copy link
Author

jmollo310 commented Mar 31, 2018 via email

@peanutbutterandcrackers
Copy link
Contributor

@jmollo310 - Dropbox, perhaps? o.O

@DylanC - You sure you are willing to test that big file, Cap'ain? :D

@DylanC
Copy link
Collaborator

DylanC commented Apr 6, 2018

@peanutbutterandcrackers - Of course! :)

@jmollo310
Copy link
Author

jmollo310 commented Apr 7, 2018 via email

@jmollo310
Copy link
Author

I think the link works as it lets me start the download.

@peanutbutterandcrackers
Copy link
Contributor

@DylanC - Cap'ain? We need your help here, good sir!

@DylanC DylanC added the testing label Apr 17, 2018
@DylanC
Copy link
Collaborator

DylanC commented Apr 17, 2018

@peanutbutterandcrackers I'll have a look.

@DylanC
Copy link
Collaborator

DylanC commented Apr 18, 2018

@jmollo310 - Do you have a smaller example? Maybe 2Gb or something? I have the folder downloaded but not enough disk space to extract it.

@jmollo310
Copy link
Author

jmollo310 commented Apr 18, 2018 via email

@DylanC
Copy link
Collaborator

DylanC commented Apr 18, 2018

@jmollo310 - I think I'm just a little bit short on storage then. 😆 I used to have lots of flash drives but they seem to be missing. I do have a 2Gb flash drive on hand which is of no use really. I think its time to buy some new flash drives or use my external backup hard drive temporarily.

@DylanC
Copy link
Collaborator

DylanC commented Apr 23, 2018

@jmollo310 - Hi there, I've tried this tonight. I had to follow the youtube video as the instructions were kinda confusing. I made something kinda similar with the video clips you provided:
image

However, the Exported video turned out to be the same as the preview inside Openshot. Not sure what else I could try here. @peanutbutterandcrackers - Keeping you in the loop here.

@DylanC
Copy link
Collaborator

DylanC commented Apr 23, 2018

@jmollo310 - I should mention I was using the latest daily build instead of v2.4.1. Maybe you could give that a try?

@DylanC DylanC removed the testing label Apr 24, 2018
@jmollo310
Copy link
Author

jmollo310 commented Apr 25, 2018 via email

@DylanC
Copy link
Collaborator

DylanC commented Apr 25, 2018

@jmollo310 - Yes, I tested on Windows 10 but it was a daily build and not the v2.4.1 release. Did you try out a daily build?

@jmollo310
Copy link
Author

jmollo310 commented Apr 26, 2018 via email

@N3WWN
Copy link
Contributor

N3WWN commented Apr 26, 2018

I wonder if the issue has to do with the export being at a different frame rate than the project itself.

The project profile is HDV 720 24p (24 fps) but you export at 25 fps with profile HD 1080p 25fps.

Try creating a new project and change the project profile to HD 1080p 25fps before adding any of the clips to the timeline.

@jmollo310
Copy link
Author

jmollo310 commented Apr 26, 2018 via email

@N3WWN
Copy link
Contributor

N3WWN commented Apr 26, 2018

Did you set the profile BEFORE adding anything to the timeline or AFTER adding items to the timeline?

I just replicated your issue exactly by following the steps in your YouTube video and posted the result here:

https://youtu.be/PhAVKET7Z3s

The rendered video had no sound and the slow motion portion was static, just as you described.

Taking the exact same project, hitting the red render button and immediately hitting the Export Video resulted in the rendered video working exactly as expected, as you can see here:

https://youtu.be/5C8EtJVqM-Y

If you're going to change the frame rate of the rendered video, you must do it as the very first thing that you do with the project. The issue is with how keyframes are set and stored in the projects. When you export/render at a different frame rate, the location of the keyframes changes. This is mentioned in other issues, such as #519 , #640 , #1034 , #1041 and #1098 . It is a known bug that does not yet have a solution.

As a little more depth into the issue, the long clip was at position 20.86s (at the end of the clip on Track 0 aka frame 500.64) and you cut it at 23:42:11 and 23:47:24. Those were at frame 34139 and 34258 of the project, respectively, at 24 frames per second.

Project frame 34139 is clip frame 33638.36.
Project frame 34258 is clip frame 33757.36.

When you exported, you changed the frame rate to 25 frames per second, which shifts the keyframes by 1 frame for every second. At exactly 23min42sec into the timeline, we're talking about a -1422 frame offset at 25 fps for keyframes set at 24 fps. That is why the frame that is static is from earlier in the clip than the cut section should include.

FYI, the static frame is from 22:50:24 (frame 32904) on the timeline, which is visible before the slices were made.

I'm not familiar enough with the internal math to predict which frame will be selected at different frame rates or to explain why the frame is static, especially when time dilation is involved. 😉

@DylanC
Copy link
Collaborator

DylanC commented Apr 26, 2018

@N3WWN - Your ability to reproduce issues like this one is truly amazing!

@N3WWN
Copy link
Contributor

N3WWN commented Apr 26, 2018

@DylanC Thank you, sir! 🙇

@jmollo310
Copy link
Author

jmollo310 commented Apr 26, 2018 via email

@jmollo310
Copy link
Author

jmollo310 commented Apr 26, 2018 via email

@ferdnyc
Copy link
Contributor

ferdnyc commented Apr 28, 2018

Another option (that I just thought of) may be better: If the profile is changed to one that has a different frame rate, warn the user that the profile is incompatible (frame rate is different) and that this could have unexpected results. Along with that warning, offer to create a new profile in the .openshot_qt/profiles directory under the user's info.HOME_PATH which will maintain the current frame rate but will otherwise change profiles.

I have to say I don't like this idea. The profiles exist for a reason, and arbitrary frame rates aren't valid for every format. If you have a project set up with some 15fps profile, and you change to one of the 1080p HD profiles, creating a 15fps 1080p profile is doing the user a disservice. 15fps is not a legal frame rate for ATSC or HDV video so that autogenerated profile is invalid.

@ferdnyc
Copy link
Contributor

ferdnyc commented Apr 29, 2018

Yeah, so... this part?

It's actually harder to map a set of frame numbers in one frame rate to frame numbers in completely different one, than to just map time signatures to a given frame rate. (The only way to do frame#:frame# mapping, really, is to convert input frame# into a time value, then convert that time value back into the nearest output frame#. So really, you end up mapping from time signatures to frame numbers either way.)

Completely, gloriously false. I could not possibly have said something more wrong, unless perhaps I'd asserted that 2 + 2 = 5. I forgot that we were dealing with linear frame numbers, not a combined time-signature+frame-number format. (Like 00:00:00.nn where nn is a frame# within that second of video in the range 0 – (fps-1).)

When you're dealing with linear frame numbers, converting from one rate to another is a simple matter of multiplying every frame number by the ratio of target rate to source rate. So, to convert from 24fps to 60fps, you simply multiply every frame number by 60 ÷ 24 = 2.5 and then round. Or, in our case, to account for the 1-based numbering the formula is (frame# - 1) × 2.5 + 1. (And, yes, that adjustment makes me further sympathetic to the argument that our frame numbering should be 0-based.)

So, given that reality, technically it does present a third option for dealing with this.

Option C: Adjust frame#-based keyframes on project fps change, copy-and-align on export

This would leave the existing frame-number-based method of storing keyframe positions, but borrows the copy-and-conform idea I presented in Option B above, as a way of dealing with export rate mismatches.

Nothing changes about how the keyframe data is stored. Whenever the project frame rate is changed, the parameter list is walked, and every keyframe position adjusted using the formula (frame# - 1) × (new_fps/old_fps) + 1. At every export, the parameter list is copied, walked to update every keyframe position to (frame# - 1) × (export_fps/project_fps) + 1, and then the copied-and-adjusted parameter list is interpolated and applied to the exported video.

...Honestly, I don't know. The idea of frame#-based positioning still makes me uneasy, as we've seen how fragile it can be. But, if managed correctly it's not completely unworkable. And while the playhead is being used as the interface to adjust parameter values, it does make some things simpler to position them by frame# instead of time. In the short-to-middle term, this is probably the least work of all the options, and requires touching the least code.


Update: Fixed a stupid confusion regarding the parameter (not "effects") list.

@DylanC
Copy link
Collaborator

DylanC commented May 2, 2018

@ferdnyc - Should this issue be closed or marked as an enhancement? Not quite sure where this 33 comment issue stands anymore. 😆

@ferdnyc
Copy link
Contributor

ferdnyc commented May 2, 2018

IMHO, marked as a bug. OpenShot's handling of frame-rate changes is broken. If the frame rate on an existing project is changed, any previously-set parameter keyframe locations get smeared across the timeline. If the project is exported into a video format with a frame rate that doesn't match the project frame rate, the export is performed incorrectly.

@DylanC DylanC added the 🐞 bug A bug, error, or breakage of any kind label May 2, 2018
@N3WWN
Copy link
Contributor

N3WWN commented May 2, 2018

Another option (that I just thought of) may be better: If the profile is changed to one that has a different frame rate, warn the user that the profile is incompatible (frame rate is different) and that this could have unexpected results. Along with that warning, offer to create a new profile in the .openshot_qt/profiles directory under the user's info.HOME_PATH which will maintain the current frame rate but will otherwise change profiles.

I have to say I don't like this idea. The profiles exist for a reason, and arbitrary frame rates aren't valid for every format. If you have a project set up with some 15fps profile, and you change to one of the 1080p HD profiles, creating a 15fps 1080p profile is doing the user a disservice. 15fps is not a legal frame rate for ATSC or HDV video so that autogenerated profile is invalid.

I had not considered that only certain profiles are valid. I know that some profiles are more optimal for some services/devices due to being native resolution/refresh rate/etc, but that was as far as I knew.

In #519 (comment) , someone asked if we could simply grey out profiles which are incompatible. Right now, "incompatible" is likely only a profile with a different frame rate.

The end-game solution is to be able to freely change frame rates mid-project or during export, but until then, I wonder if this wouldn't be a good stopgap measure?

@ferdnyc
Copy link
Contributor

ferdnyc commented May 3, 2018

On export, almost certainly. Except for perhaps the most basic case where the timeline consists of only a single clip, you can't export to any video format with a fps that doesn't match the project frame rate, or the export will break. So we shouldn't let the users try, since we know the video that comes out will be incorrect. If they want to export at a certain frame rate, they need to set the project to that frame rate.

And there's the rub. As far as allowing the user to change the project rate... that's trickier. Because, yes, the solution to exporting is that you SHOULD set the project rate to the export rate, before doing the export. And AIUI currently (and I don't imagine that my understanding of all the issues here is complete, as it is a nebulous problem) ...AIUI currently, changing the project framerate is sometimes, but not always a problem.

It's a problem when there are parameters with existing keyframe points on the timeline, as they won't be updated correctly. If the timeline consists only of clips, changing the frame rate shouldn't break anything. If the user hasn't set any manual keyframes, but their project consists of both clips and transitions/effects (which are positioned on the timeline by time index, but may have keyframe points set that control the progress of the effect/transition — or may not? does every effect/transition set keyframes?)... I'm not sure how/if we can predict when it'll be problematic.

But I think if OpenShot were to disallow ever changing the project frame rate, we'd get complaints from equally frustrated users who need to, and now have no recourse but to start recreating their entire project from scratch. So, while doing that may "cover our asses" in terms of allowing the user to not perform unsafe operations, I'm not sure it's really any better for them.

@ferdnyc
Copy link
Contributor

ferdnyc commented May 3, 2018

And I'm just realizing, now, that I never tested whether my add/remove track fix in #1546 properly handles effects and transitions. Off to do that...

ETA: Glad I checked. Effects are fine, because they're anchored to a particular clip. But transitions need to be updated on add/remove track just like clips. And now they are.

@jmollo310
Copy link
Author

jmollo310 commented May 3, 2018 via email

@jmollo310
Copy link
Author

jmollo310 commented May 3, 2018 via email

@ferdnyc
Copy link
Contributor

ferdnyc commented May 3, 2018

Thanks for your input, John. You make some good points, and honestly it's really valuable having the input of less experienced users on these issues, since they (you) bring a perspective on OpenShot that isn't "tainted" by familiarity with its quirks and baked-in assumptions. To address some specifics:

  1. If you save a project at the wrong settings. Can you change those
    settings then reopen?
  2. What prevents one from remapping the export resolution and rate to the
    current project? If the clip times, transitions, effects etc are save
    merely as data, couldn't that be applied to any resolution and rate?

Currently no, on point 1, unfortunately. The core issue here is that, for various historical reasons, certain elements of OpenShot projects are stored positioned by their frame number (a simple integer, like "frame 1074", for example), and... well, you can probably see what happens when you change the frame-rate, either in the project or on export. "Frame 1074" moves to a completely different place, and that isn't properly handled in OpenShot at this time. It could and ultimately should be, and that lack of correct handling is the core of the bug.

  1. Perhaps there is a need for a "New Project" wizard where the settings
    are created based upon the expectation of what type of export the user
    wants to create.

I think that's a good idea just in general, and ultimately an "enhancement" component of this issue, that may be the right way to go for OpenShot. (It would also allow us to do other "setup" things we may want to do, like create a project folder where all of the various files for the project are meant to be stored. Which would solve a lot of other problems we've been fighting with file locations, save paths, recovery, and the like.) But while that would allow us to set users' expectations better (which is certainly a valuable thing in its own right), it wouldn't get us any closer to giving users the ability to modify project frame rate which, ultimately, I think is an ability that has to be provided in some form.

  1. Perhaps there could be a basic and advanced mode where the basic mode
    requires setting the project resolution and framerate first and only allows
    export to that. Advanced, would allow the user to set the project then
    export differently.

If we can solve the export-at-a-different-frame-rate problem, then it'll be solved, and there will be no reason to prevent any users from doing that. Until it's solved, the problem is that any sort of "Advanced" mode like that isn't possible. It's our bug preventing users from successfully doing something that they should be able to do, rather than a conscious decision to "restrict" any operations.

What we really need is an "Advanced" version of the code where this bug is fixed. 😁

@ferdnyc
Copy link
Contributor

ferdnyc commented May 3, 2018

John's questions did lead me to another thought (how Socratic!), regarding my Option C proposal above.

I'd been focused on being able to do the frame-rate conversions "live" whenever the user selected a different profile, whether in the project settings or on export. But what if it wasn't done on live data, but rather as a one-shot conversion process applied to a project file when loading? Here's my sketchy outline of a though:

Option D, maybe?

  1. We still remove the ability to export at a frame rate that doesn't match the project, because we know that's broken and will likely remain broken for the foreseeable future.
  2. When the user changes the project profile, choosing a profile with a different frame rate causes OpenShot to display a message reading something like, "Changing the project frame rate requires closing your current project and reloading with the new profile. OK to save your work now and convert this project to [Profile Name]?" with Cancel/Yes buttons. Cancel aborts the profile change. Yes causes the regular "File→Save Project" process to start (either saving to the existing file, or popping up a file chooser if they haven't yet selected a filename/location).
  3. Once the file is saved, OpenShot closes the project, then automatically reopens it and runs it through a modified version of the normal project-data import process. This process converts all of the stored frame numbers from the old profile FPS to the new one while it's loading the project.
  4. After conversion, the user is presented with their project timeline configured for the new profile, with all of the keyframe locations updated properly.
  5. (Maybe the save path of the project file is also cleared, and a message box comes up at the end of the conversion to report the process' success, and to remind the user that their converted project data hasn't been saved to disk, so they should do that if they don't want to lose their work. It'll be their choice whether they overwrite the unconverted file, or they save the converted project to a different location.)

Sequestering the frame-number remapping process to one particular path in the code might make things simpler, and even moreso than my previous proposals, would allow the rest of the code to stay unchanged, remaining blissfully unaware of these issues.

The one possible complication here is the unordered-by-design nature of the project files' JSON data. I had initially thought of just setting a variable in the project file that says "convert me from N fps to M fps", which would be done the next time it's loaded. But since it may be difficult to guarantee that variable will be seen before any of the frame-number-based data gets loaded in, I think the conversion process needs to be initiated by OpenShot itself when loading the file, rather than depending on any information contained within.

@N3WWN
Copy link
Contributor

N3WWN commented May 3, 2018

I have the code working perfectly to grey out the non-compatible profiles in the Profile dialog for existing projects. The only gotcha is someone who builds a whole project without saving it.

This may need to be modified to look for keyframed items in the project and only restrict the profiles based on if they really are incompatible or not.

I have the code working perfectly to grey out the non-compatible video profiles in the Simple and Advanced tabs in the Export dialog ONLY if the All Formats profile is selected (the default one). When selecting a specific profile (like Blu-Ray/AVDHD), the list of video profiles is pared down to a limited list and updating those to grey out incompatible video profiles is causing me some headaches.

If any of this is useful, I can keep working on it and/or submit a WIP PR for what I have working.

If any of this is not useful, I'll stop working on it and save my time for other items. 😉

I do think that changing frame rates ANYWHERE is problematic at this point and is probably the 2nd biggest complaint from the users (the first being performance, which should be much better in 2.4.2).

[Here's where the message gets long... please stick with me! 😊 ]

Live migration of the keyframes when profiles are changed is what I think would be "best", at least in my mind.

Could we add a property to the keyframed items as to whether they should be frame-accurate or time-accurate? Then, during conversion, if a keyframe is calculated to be mid-frame, the decision can be made to adjust to the closest frame or keep it at the time. Doing this, we could store all keyframes with a time-value in the project file, making project files profile-agnostic.

The type accuracy (frame or time) could be defaulted based on the type of keyframe; things like fades do not need to be frame accurate, but things like transitions may need to be frame accurate. The type of accuracy could be a toggle in the properties, too.

Another potential problem would be profile reversion with different results. For instance, converting from 30 fps to 100 fps to 60 fps to 29.97 fps to 30 fps should result in the keyframes being in the exact same position for both instances that the project is 30 fps. A possible workaround for this would be storing the "original" data next to the "current" data and only using the original data for calculations when the frame rate changes.

Start project at 30 FPS

  • keyframe 1
    • accuracy: frame
    • original
      • position: frame 100
      • rate: 30
    • current
      • position: frame 100
  • keyframe 2
    • accuracy: time
    • original
      • position: 1m30s
      • rate: 30
    • current
      • position: 1m30s

Convert to 100 FPS

  • keyframe 1

    • accuracy: frame
    • original
      • position: frame 100
      • rate: 30
    • current
      • position: frame 1000
  • keyframe 2

    • accuracy: time
    • original
      • position: 1m30s
      • rate: 30
    • current
      • position: 1m30s
  • [Add] keyframe 3

    • accuracy: frame
    • original
      • position: frame 300
      • rate: 100
    • current
      • position: frame 300

Convert to 29.97 FPS

  • keyframe 1
    • accuracy: frame
    • original
      • position: frame 100
      • rate: 30
    • current
      • position: frame 100 (rounded down from 100.1 to be frame accurate)
  • keyframe 2
    • accuracy: time
    • original
      • position: 1m30s
      • rate: 30
    • current
      • position: 1m30s
  • keyframe 3
    • accuracy: frame
    • original
      • position: frame 300
      • rate: 100
    • current
      • position: frame 90 (rounded up from 89.91 to be frame accurate)

Convert back to 30 FPS

  • keyframe 1
    • accuracy: frame
    • original
      • position: frame 100
      • rate: 30
    • current
      • position: frame 100 (if we used 100.1 from the 29.97 frame rate, this would now accumulate to calculate as be 100.2)
  • keyframe 2
    • accuracy: time
    • original
      • position: 1m30s
      • rate: 30
    • current
      • position: 1m30s
  • keyframe 3
    • accuracy: frame
    • original
      • position: frame 300
      • rate: 100
    • current
      • position: frame 90

This removes accumulated variation accrued with each frame rate change.

When a positional/chronological change is made to a keyframe, the new position and rate are stored as the "original" values for the keyframe. Value-only changes made to a keyframe don't impact where/when a keyframe exists, so the "original" value is left intact.

The actual method used to internally represent when a keyframe exists on the timeline (it is a timeline after all) can be derived from the current position stored in the project.

@ferdnyc
Copy link
Contributor

ferdnyc commented May 3, 2018

Could we add a property to the keyframed items as to whether they should be frame-accurate or time-accurate? Then, during conversion, if a keyframe is calculated to be mid-frame, the decision can be made to adjust to the closest frame or keep it at the time. Doing this, we could store all keyframes with a time-value in the project file, making project files profile-agnostic.

The type accuracy (frame or time) could be defaulted based on the type of keyframe; things like fades do not need to be frame accurate, but things like transitions may need to be frame accurate. The type of accuracy could be a toggle in the properties, too.

I feel like you may be overcomplicating some things here (and through the rest of the second half).

"Time-accurate" doesn't really mean anything, certainly not at a sub-frame level. Every keyframe needs to be "frame accurate", in the sense that it currently needs to be placed on some frame boundary or the interface has no idea what to do with it and it becomes unmodifiable. And given that, during conversion every keyframe position has to be rounded to the nearest frame boundary at the new frame rate, which means some keyframes may have to shift slightly and there's nothing that can be done about that when switching frame rates: if they shift then it's because the old position isn't a frame boundary anymore.

If someone goes from 29.97fps to 60fps to 24fps to 29.97fps, I feel it is absolutely no problem if their keyframes don't all end up on exactly the same frame they started at. They should only shift by a frame or two, at most, and I don't feel it's worth the complexity to even try preventing that. If it's an issue for any users that they changed the frame rate three times and now their transition is starting on frame 174 when they initially set it on frame 173, then they're encouraged to buy Adobe Premiere Pro where exactly the same thing will probably still happen. 😆

But storing keyframes by both time position and frame position is like that proposal that the user be able to choose between 0-based and 1-based frame numbering: Trying to write code that can deal with both is just a special kind of nightmare. In this case, we don't even have code that can deal with one of these situations properly, so I think the focus should be on picking a horse and riding it.

Positioning keyframe points by time index is almost certainly the best way to do it. It's also incredibly hard to do because there's no support in the interface for it. (If you have a "time-accurate" keyframe that falls between two frame boundaries, how do you adjust it? Or delete it? That was the entire problem in both my Option A and B scenarios above, and why I ultimately rejected them as workable solutions, certainly for 2.4.2, and really for 2.4.anything at a minimum.) While I'd love for (all) keyframes to be positioned by time, and it would solve the problem of frame-rate conversion, it would introduce a whole host of other problems. (Probably even bigger problems, even though right now it doesn't seem like any problem could be bigger than this one because, currently, there aren't any bigger problems.)

Until then, I still think (all) keyframes need to stay positioned by frame#, and the focus should be on getting that to work right even when the frame rate changes. But by "right" I mean "doubling the frame rate no longer causes all of the keyframes to be positioned half as far up the timeline as they're supposed to be", not "worrying about whether keyframe positions might be forced to shift by tens of milliseconds when the frame rate changes".

@ferdnyc
Copy link
Contributor

ferdnyc commented May 3, 2018

...That being said, this:

I have the code working perfectly to grey out the non-compatible profiles in the Profile dialog for existing projects. The only gotcha is someone who builds a whole project without saving it.

This may need to be modified to look for keyframed items in the project and only restrict the profiles based on if they really are incompatible or not.

I have the code working perfectly to grey out the non-compatible video profiles in the Simple and Advanced tabs in the Export dialog ONLY if the All Formats profile is selected (the default one). When selecting a specific profile (like Blu-Ray/AVDHD), the list of video profiles is pared down to a limited list and updating those to grey out incompatible video profiles is causing me some headaches.

sounds awesome.

I really wish the step of disabling project frame-rate changes wasn't necessary, because it's going to screw up a lot of people (and will probably become the new biggest complaint, simply for its prominence) — but at least for 2.4.2, it probably is necessary. In reality they'll be complaining about no longer being able to do something that, for the most part, would've been silently screwing up their projects when they were allowed to do it in the past, so even though the complaints may be louder it should hopefully cause fewer actual problems.

@N3WWN
Copy link
Contributor

N3WWN commented May 4, 2018

I feel like you may be overcomplicating some things here (and through the rest of the second half).

You're probably right! I haven't looked at any of the keyframing code yet... just kinda thinking out loud. hehe

I suppose the magnitude of the accumulated errors (or rather, the lack thereof) is not worth taking into consideration. Even going from 25fps to 60fps to 100fps to 29.97 fps and back to 25fps couldn't accumulate more than about 4 frames of positioning error (it would actually be much less than that), which is 0.16s during playback at most.

While I think my idea of storing the original position and associated frame rate is still a good idea (or at least has some merit, perhaps it would only be workable in a new project which claims to be that accurate versus crowbarring it into this existing project. 😉

sounds awesome ... so even though the complaints may be louder it should hopefully cause fewer actual problems.

This was my basic thought, too. I think it'd be an easier pill to swallow for users to complain "I can't export the project that I invested 10 hours working on at the frame rate I want. 😞" versus "I spent 10 hours working on this project, changed the profile to a different frame rate and now I have to start over from scratch! 😠"

I'll submit a WIP PR for profile.py, which is working, and will continue to look at export.py. I need to get my head further around how the profile lists are updated and pared down to get that one working properly.

@justdoityourself
Copy link

TL;DR Set the export frame rate before working on any clips or changing speeds.

Work Around: Export video with initial frame rate.

This is a really nasty bug been causing me trouble for months. Should not be hidden in this monstrous thread.

@jortel
Copy link

jortel commented Jul 31, 2020

This workaround worked for me.

@stale
Copy link

stale bot commented Jan 28, 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 180 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 This issue has not had any activity in 60 days :( label Jan 28, 2021
@stale stale bot closed this as completed Feb 7, 2021
@lbell
Copy link

lbell commented Apr 10, 2021

I've invested 10 hours in the project, and now not only doesn't it export correctly, because I was trying to fix this error, my preview is also fubar'd. I didn't read through the 49 comments to see exactly what's wrong, but suffice it to say that the behavior is not intuitive nor predictable.

@waggers5
Copy link

Sorry for the novice questions...

  • How do I tell what the framerate of a clip is?
  • If I have clips with different framerates, can I still export my video (and get the results I expect) or am I totally scuppered?

@JacksonRG
Copy link
Collaborator

@waggers5 if you right click on a file and click on File Properties you will see the frame rate of that file.

Yes OpenShot can handle files will all different frame rates. It does the math (for instance showing every other frame if a 60 fps file is in a 30 fps project). Are you having any trouble with exporting?

@waggers5
Copy link

@waggers5 if you right click on a file and click on File Properties you will see the frame rate of that file.

Yes OpenShot can handle files will all different frame rates. It does the math (for instance showing every other frame if a 60 fps file is in a 30 fps project). Are you having any trouble with exporting?

Hi, thanks for the response. One of my clips had the issue mentioned in my first export attempt, but I tried again (without changing anything) and it was fine second time around.

@JacksonRG
Copy link
Collaborator

JacksonRG commented Aug 19, 2022

@waggers5 Ok. I'm trying to reproduce this to get it fixed. What was the frame rate of the file, and the frame rate of your export where export wasn't correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug A bug, error, or breakage of any kind stale This issue has not had any activity in 60 days :(
Projects
None yet
Development

No branches or pull requests

10 participants