Shotcut proxy videos auto creation auto replace tool for fast smooth editing

@DRM
1, adding video mode instructions, thats right, will do.
2, ac3 codec, good to know, will change it.
3, reverse .mlt back to proxy-editing, it is impossible, as people (and I) may do the proxy/original mixed editing (for many reasons), a reverse will screw up the project. Use the backup .mlt file to continue your earlier proxy-editing is the only safe way.

Edit: v1.04 final plus is updated.

1 Like

Aha, thank you.
Never used Autoit so not familiar with that extension.

Yes you are right, although I find Python to be in a complete mess at the moment with all the inconsistencies between versions, call methods and libs.
Will probably write it using Applescript, that way the only external dependency will be ffmpeg itself.

Hi @KKnBB, sorry to report this but 1.04 is not working for me now. Screenshot -

It seems the program is trying to find the file inside the fastproxy folder before it has been created?

The fastproxy folder is created but it’s empty.
Help!!:smiley: Thanks…

@jonray hey, in order to solve the “ffmpeg creating a half-length output video if it got killed in the middle of processing” problem, the batch will: try delete the name incomplete(doesn’t matter it exist or not), convert file to name incomplete, then rename the incomplete to complete after ffmpeg actually finished.

So seeing many “The system cannot find the file” is correct, that’s no issue.

But your problem is, your ffmpeg.exe failed to execute (and it gives no error, which is weird, seems it is semi-corrupt. I will do a anti-virus check if I were you)

You should reboot, delete the ffmpeg.exe in the folder (this tool will unzip a new one) , and run it again.

Let me know.

There’s a typo in your added instruction:

You should manually pick a “video mode” to start your project. Otherwise the “Automatic” mode will start your project with the proxy_video’s low solutions.

It should be: Otherwise the “Automatic” mode will start your project with the proxy_video’s low resolution.

:slightly_smiling_face:

Hi @KKnBB, I rebooted, deleted the ffmpeg file, deleted all previous zip files from your site, downloaded a fresh zip from your site, unzipped it, ran it again. Same problem, no luck. Off to sleep now, will have another try tomorrow. Thanks for helping…

@jonray No worries.
I failed to duplicate your issue. It seems your computer system refused to execute ffmpeg, or ffmpeg crashed right at beginning, leaving no error display.

When you have got time, do following test:

1, download again. I have just changed the included ffmpeg from nightly version to stable version.

  • if this works, then all good;

2, make a new folder with only 1 video, create the batch, edit the batch, remove all lines except “mkdir” line and “ffmpeg” line, run it.

  • if this works, then there maybe some system file-lock issue I need to address

3, continue the step 2, modify the ffmpeg line, replace the “ac3” to “aac” (equals to 1.03 version, when it worked for you), run it.

  • if this works, then there may be some bugs in ffmpeg ac3 audio codec.

If non of the above make the conversion going, you need to check your computer system for anything preventing the ffmpeg to run, like user right, anti-virus, folder permission, specially anything you changed between 1.03 - 1.04 version.

Hi @KKnBB, it now works! The new version 1.403 worked perfectly for me. No idea why, but it did, and I’m happy!! Thank you for this brilliant utility and for all your speedy and detailed help. I’ll use this a lot. :smiley::+1:

OS: Linux Mint 18.1-64 KDE

Hi,

just downloaded 1.042 with Chromium and Chromium gives me a warning: “ShotcutProxy…zip ist ein ungewöhnlicher Download und könnte schädlich sein”.
("ShotcutProxy…zip is an unusual download and could be harmful)
:thinking:

@Earlybite, this little project started just 3 days ago, with less than 50 users world wide (my guessing). Of course it is a unusual download :smile:

I am so curious can this tool run in wine? you do have wine in Mint right?

What for an argument is this?!
I’ve “also” an own webspace and normally with less then 50 users and I never had a “unusual download”…
Maybe I should wait 'til you have maybe 100 users worldwide to avoid my message on Chromium. :wink:

@Earlybite Yea it is like that. Chromium has a complicated score system. Like, I download from my own site I will not get the popup (my IP marked as frequent visitor to that site), I download a zip from your site I may not get the popup (no .exe file inside the zip) , if a site is alexa top 10000 or something there will never be a popup etc. etc.

I have other projects for public download, usually people tells me there is “uncommon downloads” warning in the first month (I also saw that when I tested it in an internet cafe), after few weeks the number of downloads reached 200 or something, the warning is gone automatically. Nothing I can do about it.

Excellent ! It works perfectly. This will save me so much time. For most projects in 1080p, I usually had to export each time I wanted to see (without lagging) the results of editing. Now, with this tool, it runs smoothly in the preview window of Shotcut.
Thanks a lot KKnBB

2 Likes

Does this tool change the resolution of the <profile> in the MLT XML project file?

Hey @shotcut no it does not and will not change the profile, the “restore function” only replace the resource file path and caption lines. There is no place for me to decide what video profile ppl actually want to use. Users should pick a “video mode” at the beginning of the projects. Otherwise the Automatic mode may start the project in proxy_video’s 360p low resolutions.

I am very new to Shotcut (believe or not I did the first video editing in my life just last week. I am so happy I started with Shotcut, such an exceptional project you guys established here). Let me know if you see any concealed issues.

I think the easiest way to implement the “Proxy” into Shotcut is:
Let the “preview” window always try to pull and render the video files from a sub-folder first (when same files in sub-folder called “proxy” something exist). So you guys can leave ALL other codes unchanged, by adding few lines in preview module file open codes.

Dan, how about including a link to KKnBB’s proxy page in the download section for the upcoming Shotcut version? While it’s not an official Shotcut component, it can serve as temporary fix for Windows users until the official Shotcut proxy generator/workflow gets implemented.

Good. Just so all coming here understand: some filters use pixel values for parameters. Changing a project resolution does not automatically adjust these things. There are plans in 2020 to add an overall scale factor in the engine. Then, a project can be previewed at a lower resolution. That will improve processing speed especially if you have proxies made at the same, lower resolution.

@shotcut The source file plays a big part of the lagging issue. When I import a 4k video into a 720p project (the preview is naturally scaled down), the GUI is already very laggy even without using any filter. So the scaled down preview in engine will helps to certain degrees, but in my limited opinion, proxy or frame-cache is still needed even we have scaled-down-preview.

The even bigger issue is, Shotcut doesn’t respect users’ input well. When users click or drag, the timeline should response the user’s input ASAP with highest priority (the preview can slowly catch up in the background), instead of like now freezes the whole GUI waiting the preview to finish the rendering. (the timeline hanging made many of my drag-and-drops fly away, over time this slowly gets mental)

If the timeline is super smooth like an iPhone, many users can live with a delayed preview window, IMO.

Hey,

Thanks for this cool thing, man.

I found an issue with the script. It doesn’t do proxies if the source video has a unique video resolution. I tested with a dummy clip with a resolution of 1920 x 794 and it gives this error message:

[h264 @ 045771c0] Reinit context to 1920x800, pix_fmt: yuv420p
[graph_1_in_0_1 @ 06b36e80] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[Parsed_scale_0 @ 0a10ef40] w:-1 h:360 flags:‘bicubic’ interl:0
[graph 0 input from stream 0:0 @ 0d850280] w:1920 h:794 pixfmt:yuv420p tb:1/25000 fr:25/1 sar:1/1 sws_param:flags=2
[Parsed_scale_0 @ 0a10ef40] w:1920 h:794 fmt:yuv420p sar:1/1 -> w:871 h:360 fmt:yuv420p sar:345600/345787 flags:0x4
[libx264 @ 06d60640] width not divisible by 2 (871x360)
Error initializing output stream 0:0 – Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 046603c0] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0457e980] Statistics: 163840 bytes read, 0 seeks
Conversion failed!