|
01-17-2019, 02:10 AM | #1 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
My new VLC Auto split extension!
Hi,
finally I finished my very first programming experiment. And I'm pretty proud to present you Video split with mkvMerge, an VLC extension which allows you to easily split movies into clips with mkvToolnix. (Without re-encoding!) This is also meant to be a good solution for video editing in Reaper as Reaper is actually not capable of splitting videos without re-encoding. How does it work? Firstly you need mkvToolnix. And of course VLC. The extension allows you to create timestamps on the fly while watching a movie or searching thru it. Its pretty straight forward. Your time ranges get copied into a list which will be sent formatted to mkvMerge for the splitting process. Here it is in action: First run routine demands the path to mkvMerge.exe which gets saved into mkvMergePath.txt next to the extension script. Clicking the Create start/end point button adds new timestamps to the list. Those time ranges will be displayed as clips in the clip list. Sending the timestamps to mkvMerge with one click. It saves all clips next to the source video. I have no idea of how compatible this lua script is. I only tested it on win 7 64 bit and VLC v 3.04 which works flawlessly. But I'm pretty sure there are still many traps that I didn't think about. If someone wants to test it and runs into trouble I will try to fix that. Though I'm not experienced. So please try it out. Put the lua file into the VLC directory/lua/extensions directory and start the extension in the menu -> view Split Video with mkvMerge EDIT: New Version with clean button and better path handling. Here is the file: Split_with_mkvMerge.lua By the way. Theoretically this could be easily ported to apple and linux systems as only the paths and filenames should be renamed. Though I'm not sure but I think the system commands also needed to fit the system code. Would be cool if someone could port it to other systems or even optimizes the code a bit. (I know it looks silly at certain places. )
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Last edited by Eliseat; 01-19-2019 at 03:10 AM. |
01-17-2019, 02:19 AM | #2 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
I forgot the links to mkvToolnix and VLC:
https://mkvtoolnix.download/downloads.html#windows https://www.videolan.org/vlc/download-windows.html In my opinion, the only parts that needs to be changed for running on other systems like apple or linux would be the send functions. Code:
function send_Clip() timeStamps = w2:get_text() input = vlc.object.input() if input then strCmd = 'echo | set /p dummyName='..timeStamps..'|clip' os.execute(strCmd) end end function send_Split() timeStamps = w2:get_text() input = vlc.object.input() if input then strCmd = mkvMerge_path..' --output "'..uri..'.mkv" "'..uri..'" --split parts:'..timeStamps os.execute(strCmd) end end Greetings Eli
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
|
01-17-2019, 06:34 AM | #3 |
Human being with feelings
Join Date: Mar 2007
Posts: 4,018
|
Nice :-)
It would be great if we could send it from within Reaper timeline (check points). What I mean is I use one big footage (may be 30-60minutes) and then on timeline I split it and make few or lots of usable scenes (every scene about few seconds or more long) for saving a "masterproject" it would be helpfull if the video items in timeline would be splitted without reencoding by using such script and even mkvToolnix etc. and then replaced in project as multiple video source files instead of the original source big video file. akademie |
01-17-2019, 08:23 AM | #4 | |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Quote:
The re-import of the split files wouldn't be possible without time shifts, length differences etc. And I have no idea of how to handle such things. Or if its even possible to do it from inside Reaper. This needs to be planned from a way more advanced Reaper scripter.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
|
|
01-17-2019, 10:14 AM | #5 |
Human being with feelings
Join Date: Mar 2007
Posts: 4,018
|
Yeah, I do understand.
So the best would be if Reaper had "no re-encode" option in rendering ;-) |
01-17-2019, 11:25 AM | #6 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Of course. Or Reaper could use mkvMerge in a native way to split videos. (Same way as it uses VLC and ffmpeg for preview) BUT! There is another problem according to mkvToolnix's splitting option. It allows timestamps only in chronological/sequential order. So if you make overlapping cuts you also get an error.
Anyway. VLC with mkvMErge and my extension is the best and most comfortable option at the moment.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
|
Thread Tools | |
Display Modes | |
|
|