-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Preview playback before cutting #253
Comments
I haven't extensively used this tool yet, but I would love to be able to set a bunch of in/out points, then quickly preview maybe a second before/after the in/out points in one command. e.g. I set a bunch of in/out points, then use this function to play the movie as if I had performed the cuts of the various pieces, to make sure all in/out points are correct. |
I'd counter with two points:
PS: Sorry for the dupe #344, I searched and could not find this one using the keywords I used 😄 |
Alrigght no problem. Maybe some day I could implement accurate (near-lossless) cutting too using x264 |
I would like to have option to stop/freeze playing at cut end point so that I can jump back 1 second and see/hear if point is in proper position (but with jumping back auto start play video). I'm doing something like that with cut start point: video is playing and I'm constantly clicking with mouse "Jump to cut start". |
Using the 'Segments to export' section for the timestamps/keyframes for playback in the order they are in could be a possibility, add a play button at the bottom next to the add/remove/reorder/rename to Preview the possible output. I know at least in my case the |
This is actually quite a good idea, didn't think of that. Since usually a losslesscut export is already so fast (compared to NLE's), if one wants to have a playback of only the cut points to check them one would be quite happy to wait a few seconds, if that then could play 5-10seconds before and after each cut points while ideally also showing it visually in the timeline. That would be still easier and a smoother workflow then exporting, opening all exported segments individually and seeking the beginning and end (cut points) as well as possibly then going back into the time line to make some changes. |
I'm not sure how useful it is to playback according to the cutpoints though, because the actual exported cutpoints will be different from the ones set by the user, so the preview will not give an accurate representation of how the merged output will look. If we are going to render a correct preview with ffmpeg of how it will actually look like after cutting, then this will take just as long as actually running the final export+merge (which could take minutes for long videos), so then I don't see the point of having a preview when the user can just preview the outputted file from Finder/Explorer instead. |
At least an option to stop playback at the end of the segment selected for export should help, The start points are, depending on setting, still accurate or should be moved up to the nearest keyframe. Personally it's not a full playback preview of the created segments I'm after, just the 'stop at end of segment' to confirm if the out point is correct or needs tuning, instead of skipping past it and continuing to play the rest of the file. For actual correct preview jumping through the source file should be a lot faster than export+merge if you start and stop the playhead to the timestamps of (a) created segment(s). |
My point is, currently to check the actual exported cut point one has to open the exported segments or merged video file and play them back, time consuming and hassle. Better and probably quicker/easier would be an export preview button that exports all segments and then plays them back inside the app in sync with the timeline (which doesn't has to be 100% accurate on the timeline, it's the accurate video playback itself that matters), this could be also offered as a setting for the export dialogue 😄 All this because without export we won't get an accurate play of what the exported cut points will look like. Maybe two options, as per @Wiethoofd one that just roughly plays back the timeline without exporting and my suggestion with one true render one using the exported segments. Another option for the final check could be to play back only the first 10 secs of the segment beginning and endings, then the next segments first 10 secs beginning and ending (otherwise one may still have to scrub the timeline to avoid watching the entire edited video in full). |
If we were the implement some form of preview than for a rough preview before export we could have an option to hide the deleted segments to see the timeline with only the selected segments. I think this would apply also for the a real preview using the exported segments (for accuracy) to hide/unhide the deleted segments in order to check how cut points turned out and be able to continue editing (changing segments) in the original video. Another way could be to have an export options that loads the merged video (or all segments) into LC timeline as a new project with the segments markers still in place, so one can quick an easy review the cut points without having to leave LC. |
I think users can already do this, if they choose "Create chapters from merged segments" during export, then they open the merged file in losslesscut and choose yes to import chapters as cutpoints, am I right? |
@mifi interesting, will try that out tomorrow, if yes and works as expected perhaps this would enable at least to quickly check cut points inside LC instead of manually open seek and close files from within the file explorer, then this could become a nice export option to automatically open (as a preview check). In contrast a built in preview with hiding/unhiding deleted segments before export would save time during editing and perhaps speed up the workflow of feeling the flow of segments and cutpoints, especially in long video files of 1-2hrs. :) UPDATE: Nice @mifi works a treat for checking the segments inside LC timeline, even uses labels for chapters. 😄 Ideally also have a more obvious PREVIEW function, that makes it easier, by 1) initiating the merged export followed by 2) automatically starting a new project with the new merged file 3) including chapters loaded 4) but also offering a quick way back to the previous project to make edits if necessary and again perform an exported PREVIEW/REVIEW. Additionally the enhancement #574 to offer a playback mode that plays a few seconds for the beginning and endings of the various segments to check them in one go without having to do a lot of clicking. :) |
I think doing all those steps automatically is gonna cause a lot of code clutter, so I'm not sure if it's a good idea. But we could document how the user can do this for a preview. |
Maybe the built in preview workflow is overkill or to complex and we can come up with a better approach. But loading merged video with chapters after export would only be one additional command, to add to the export dialogue no? Seems like a low hanging fruit to make this workflow easier at least. (one exports, perhaps even without dialogue having this option already enabled to auto load, reviews the cut points and if needed to be changed re-opens the source file/project). Please? 😄 |
Yes loading the file after export could be an option |
have now implemented: Play current segment |
Hello @mifi, I was trying your latest version today and have some issues and would like to tell you here about it if you don't mind. About segments play. Nice to see that you did add the idea and after setting some keys (1, 2, 3) manually to play & loop the segments and see its working so far. So you forgot the add a play / loop function for all enabled segments what would be the most interesting feature but you missed to add it. All users wanna see the end results of entire pre-cut video before the export process you know. Just add this feature if possible in next release. Problem about playing segments: Its not working when your app does create a dummy video so then the video is just playing go on but the segments pointer is looping (just for play & loop segment) the just play & loop for begin & start do work. Just try it out. Next problem are the dummy files. So this is really bad and audio is not working to play. In most cases I cut by audio view (VirtualDub2) if present but in your app the audio graphic / view is just bad and the zoom also dosen't help to get any detailed view. You should need to find / use any open source code to implement any better style like VD2 or similar... Info: Just create a video with 10 -30 seconds etc and create different formats of them using diffrent containers. Use (mp4, wmv, flv, avi, ts) and then test your app with them. The dummy file just sucks and gets used for all of them once if it was created. Example: Avi / wmv / FLV / TS = mkv dummy created. For mp4 / mkv it works without dummy but dummy will used if present what means I have to delete the dummy file first. Just try to get it work without dummy so that we can hear the audio too. Also try to use those different files to test your exports so I see there are also problems with the new made files or add a option for the user to set re-encode paramters manually because the experimental / smart cut version makes trouble. Also in case of using normal cut version / keyframes it can fail when using dummy file. In some cases the preview in your app is not working 1:1 and first second nothing happens and this also happens then in the exported file. Also to export files in diffrent format/s in smart-cut mode (re-encode) it fails "Unable to export this file" when I try to export a mp4 file as webm or other formats. Question is it does not re-encode then? Somehow you can only re-encode video in same format but also here it makes problem using a close video bitrate. I tried a FLV video what has a VBitrate of 432 kb/s and your app did export it with 71.3 kb/s. Anyway, just some infos only for you. Just wanna say, next time if you finished with a new version then make some more tests to be sure whether it works or not. The timecode is still buggy and right mouse context does not work to paste some TC and there is also no quick paste button to paste anything from CB. The TC also needs the entire value format of all digits what means I have to enter exactly 00:00:00.000 digits (9) etc but I told you that before already. Thats bad if you work with TCs from subtitles. Just make it work better so that we also can enter custom values like 5 to seek on second 5 or 5:00 to seek to minute 5 etc you know. I don't wanna enter entire TC format each time. PS: Just keep going @mifi. |
this will come in the future but implementation takes time and is not trivial.
thanks, i will fix this.
You can say that "the dummy file sucks", but isn't it better than having a black canvas with no video at all? (which was the case before the feature was added.) In the future I will try to improve the support for non-natively supported files. there is already an issue for that #88 as for why the dummy file gets reused, that was a feature because it was requested by many people who don't want to regenerate the dummy file every time. You can enable auto-cleanup dummy files after exporting, which should delete that file. does that not work?
you can create a dummy file with audio too, from the File menu. also #88
losslesscut never re-encodes the exported output, except for smart cut. Just disable smart cut if you have problms. it is experimental.
If you read README you will see that I consider the newest versions of LosslessCut on Github to be "beta". This mean you are the testers. If you want a more stable experience, buy it from the app store, or download an old version.
This has already been suggested, please read #1217 and leave a thumbs up there 👍 |
Ok.
Thanks, will check this option. Of course a dummy is fine when the audio is also working...now I tried this option you mention about "convert to supported format" and did choose the second entry instead of first (no audio) and now it seems to work to make a dummy with audio. 😃 But also in case of using dummy's the audio does not match (sync) with video in the edit / preview window for some files.
So thats the problem. You say it does never re-encode any exported output and thats true even in smart cut mode you don't re-encode any stream and you just using the copy mode. Why do you say then that smart cut does re-encode on the info icon if you choose this smart cut option? So I tried all three export versions and did check all the ffmpeg commands and there are just copy to find. Lets have a look...just did select a single part from start from 10 second with a length of 5 seconds....
...first two cut methods are pretty same except to set the start time offset after input or before input and the question is what is better in copy mode. None of them is better just to pick a earlier or later keyframe so that for the most people pretty confusing maybe. Also if you try to cut a part of video out just using the keyframe marker (to make a clean KF-cut) then the keyframe cut method is a bad choice to make a exact KF cut and you add just more video of pre keyframes into the cut. Also the smart cut does same like your Keyframe cut. So you have added three possible different output copy types but why? So I think what you should do is to clean out the copy types and just use 2 methods only. Use a normal keyframe cut to cut really by the keyframes what also means the user has just to use the keyframe markers to cut segments and in case of custom cuts you need to re-encode the video stream of course. I always prefer keyframe cuts if possible but in some cases I have to do custom exact cuts what needs a re-encode of video stream/s and this is missing in your app. Just make it simple.
I would be more happy to have those 2 cut versions only in your app. Just my opinion. PS: Yes, the timecode problem I did already post last year and you did not fix the problem and the question is why because its a simple problem. |
you can also make a "slow" preview, where it will re-encode both the video and the audio for the preview and youshould then get correct video/audio sync in the preview.
I think you missed one command:
been trying to find a simple solution, but it's not that simple. most files need keyframe cut, although some codecs/files need normal cut, so I cannot just remove these options unless i find one method that covers all use cases (people use losslesscut for a LOT of different file types). there are tons of discussions around this already, please continue discussion here: #1216
If you see the issues tab you can see that there are currently 158 open issues, most of which are new feature requests. Because time is limited in this world, I usually prioritise the most popular feature requests. The request for this feature #1217 has 0 thumbs up and so I prioritised other more popular features over it. |
Hi again @mifi, I have test your latest version "LosslessCut-win-x64_3.52.0" today using smart cut you said it does re-encode. Now lets have a look on this cut + your output log...
...so as you can see I tried to make 3 segments I want to merge them into one output file using smart-cut because you say it does re-encode the video. In this case I also do expect a clean exact cut using the right times / length I did set in my segments but as you can see you did not use the set start / durration time. In the icon info about smart cut you told us...
..but why? Just use the right times I did set and not the time stamps of the next / near keyframe so this is not exactly and makes also no sense if the user want to have a exactly cut if you do already "re-encode" you know. Now in case above I don't get a exactly cutted video out = bad. Just export the segments in re-encode mode (basic / no copy command) and after that concat them together. As I said before, for me its important to have just 2 cutting methods, KeyFrame cut & Re-Encode cut and both should work & cut exactly where I set the cut points or keyframe markers. Just don't understand why do you think that it should be a good idea to cut near on a keyframe before or after the real cutpoint. Why? If a user wanna make some low level round about cut then use a accurate KeyFrame cut and for a real accurate cut use a re-encode. Anything else should be superfluous. Anyway, so if you don't wanna change your cut methods then just add another one to re-encode (basic & advanced user can enter custom parameters). All in all I like the segments list and to play / loop them but also need some excat cut output. Anyway, its just my opinion. Thanks again so far @mifi and think about it to add also a re-encode method (extra) for all who would need it like me. Otherwise let the user decide what ffmpeg commands to use in re-encode case. Lets try it out if you don't mind. Thank you and keep going @mifi. PS: Ok preview works now with sound after choosing "convert to supported format" point 2. 😃 Yes I see, you got many requests you can't handle so fast of course. I do understand. PS2: One more thing, nice to see that you did add playing all segments play button. I have another small idea. Just add a check / uncheck option in the GUI to enable / disable "play in loop". In this case we can play all segments together one time or in loop. At the moment just loop mode is possible by using the second playbutton. Also it would be a good idea if you would add a tiny play button on each single segment so that the user can click on it and just play the segment itself (once or loop if checkbox is checked or not). What do you think? |
Preview playback the result of the merge before cutting has been requested. (or inveterted segments if YinYang) I'm not quite sure how to implement this easily. There are a few ways this could be implemented technically:
This will not be accurate because the actual cutpoints will be different from the ones in the UI (due to keyframes.)
Closed in favor of #1887
The text was updated successfully, but these errors were encountered: