General question -- playback quality

Greetings…
Please excuse me if the length of this email is a “little” long.
I have been teaching myself the basics (!) of video editing / Shotcut off and on for a year now.
Although I do understand the rudimentary aspects of videos, containers, image quality, filesize, codecs, etc., I realize I have just scratched the surface.

Currently, I am trying to wrap my head around a “discrepancy” I have noticed.

I shoot video with an Inspire 1, Zenmuse Z3 camera that is set to 4k / automatic everything. Basically, I end up with a file that is a MPEG-4 that uses either a mp4 container playable using JVT profile / avcl codec or a MPEG-4 that uses a mov container playable using QuickTime profile / qt codec.

The videos I have shot will play back smoothly in Windows 10 Movies & TV media viewer. However, when played back in Shotcut 19.06.15 (and earlier versions) the video will “stutter” and skip frames consistently. When I play this same video in VLC, I get a similar “stuttering”. I don’t get it in Window’s Movies & TV media viewer.

As a point of reference, it seems I get the same results with either the mp4 container or the mov container from my microSD card (rated at v30), my local primary or secondary hard drive (both different hardware specifications), across over several networks, and through two different servers. I am on a newer computer (I5-8500, 3 gigahertz, 6 core, 8gb memory). My older computer had 16 gigabytes of memory, but a slower process (3 or 4 years old – I do not remember the CPU) and I had similar issues.

I am very curious if I had made a configuration change to ShotCut or that this is what I am going to have to live with. Currently, my playback settings are

 Real-time (frame dropping) is selected...
 Progressive is selected...
 Deinterlacer = one fileld (fast)
 Interpolation = Bileaner

Ultimately, I am after the same playback quality in Shotcut that I am experiencing with Windows Movies & TV media viewer.

Thank you for your time and attention.
John Bennett

JOHN TRACEY BENNETT – SIU / PSO Unmanned Aerial Vehicle Administrator
FAA Certified sUAS / UAV Operator (active)
Chief Engineering Draftsman
CAD Systems / Archive Systems Coordinator

PLANT & SERVICE OPERATIONS
MAIL CODE 6727
SOUTHERN ILLINOIS UNIVERSITY
210 PHYSICAL PLANT DR
CARBONDALE, ILLINOIS 62901

E: JohnB@PSO.SIU.edu / JohnB@SIU.edu
P: 618/453-6766
F: 618/453-6784
PSO.SIU.EDU

Hi JTBennett! I’m always impressed when someone has figured out how to get a drone off the ground without the FAA sending over a fine. My wife and I have a Mavic Pro drone and want to get Part 107 soon. We are paranoid about lift-off for recreational purposes at this point. :smile:

Back to your issue… You haven’t configured anything wrong in Shotcut. Since you have an i5 processor, it supports Quick Sync instructions which basically means it can decode H.264 and H.265 video files natively in the processor hardware. It has custom circuits just for this purpose. Windows simply hands the blocks down to Quick Sync for decoding in hardware and your “normal CPU” usage stays flat.

Shotcut and VLC don’t have this luxury. They rely on do-it-yourself math instructions to decode the video which chews up all your CPU. They do this because they are based on ffmpeg for decoding. And ffmpeg isn’t taking advantage of specialty hardware so that it stays flexible enough to work on any operating system and any processor. (For example, AMD chips don’t have Quick Sync instructions.)

To make matters worse, Shotcut has an editing pipeline that a media player doesn’t need for simple playback. Shotcut has insert points for filters and track compositing and all kinds of other detours before the video actually hits the screen. All of this contributes to lag.

The real solution to 4K editing is a proxy workflow, but Shotcut does not natively support this. There are a few threads here that suggest ways to fake proxies, though. Sorry, I know an explanation without a solution only eases your pain by two percent.

Although, if you aren’t stacking many tracks together, you might be able to transcode your drone footage to another format (still at full resolution) like H.264 All-Intra or ProRes or similar and get a little better performance. 4K is still pretty heavy stuff overall, though.

Aren’t we all? Windows’ media player uses hardware-accelerated decoding but Shotcut does not. Hardware-accelerated decoding only makes sense when you can keep the entire processing pipeline in the GPU memory including all scaling, filters, and track blending and do the processing using GPU. Shotcut is not there yet because editing is so much more sophisticated that simple playback. It has some GPU Effects mode, but that is hidden due to bugs.

Actually, FFmpeg and VLC does support hardware-accelerated decoding. Shotcut does not yet though for a few reasons. One is to figure out how to convert the image from hw decode to OpenGL text for the GPU effects in a cross-platform and cross-API manner (every combination of Intel, Nvidia, and AMD for Linux, macOS, and Windows). The other is to figure out how to limit this with respect to multiple video tracks because many systems have limited resources for hw decode. The last reason is due to lack of time and energy since GPU effects need to be more stable first, and that activity needs to follow stabilization without GPU effects and general bug fixes and basic expected features.

I was trying to spare you some pain. :wink: If I revealed that ffmpeg supports hwaccel but Shotcut chooses not to use it, people are going to ask “Why?” and there goes the can of worms. But you’re really good with worms, so I shouldn’t worry so much.

Gentlemen…

Thank you for your response. That answer makes a lot of sense to me. I had wondered if it was along those lines or not, I simply didn’t know. It makes sense that decoding is “baked” into the chip and Windows takes advantage of it. And I do understand the complexity of trying to make / keep Shotcut an open piece of software that works on different chip platforms. I used to program in the 1980s and 1990s – actually did some on punch cards!

Most (not all) of the departments I work with request I set the drone up at 4k video – mostly mov “format”. I supply the files for them to edit as appropriate. I use the video to “practice” in case I am asked to create a video internally to my department. I have to say, for “freebie”, Shotcut is a pretty piece of work. My hat is off to you and your development team.

Again, Thank you for your time and your answers.
Take Care
John T

================================================================
JOHN TRACEY BENNETT – SIU / PSO Unmanned Aerial Vehicle Administrator
FAA Certified sUAS / UAV Operator (active)
Chief Engineering Draftsman
CAD Systems / Archive Systems Coordinator

PLANT & SERVICE OPERATIONS
MAIL CODE 6727
SOUTHERN ILLINOIS UNIVERSITY
210 PHYSICAL PLANT DR
CARBONDALE, ILLINOIS 62901

E: JohnB@PSO.SIU.edu / JohnB@SIU.edu
P: 618/453-6766
F: 618/453-6784
PSO.SIU.EDU