Video conversion fails leading to full hard drive

Operating system: Ubuntu 22.04 LTS / Gnome 42.5

Shotcut version 22.10.25

I have had this exact problem occur twice, and for obvious reasons, I do NOT want to try to repeat it a third time:

  1. Opened a previously saved project with seven video clips, ranging in length from 22 seconds to 4 minutes 34 seconds. All clips were converted to “Best” quality edit-friendly format (.mkv) by Shotcut from video shot on a smartphone.
  2. Opened a new video clip (see log file line 468) length 5:56 minutes
  3. Asked to convert to edit friendly format - selected “Best” quality.
  4. Convert job failed at about 80% complete.
  5. I exited Shotcut and shut computer down.
  6. Computer would not reboot. In recovery mode, I learned that the hard drive was full. My hard drive is a 1 TB SSD; normally runs about 40% full. Had to run fsck to remove abandoned clusters and recover disk space.

I can say for certain how much free disk space I had before or after the Shotcut session: I did not suspect that disk space might be an issue.

I can’t figure out how to upload the entire log file, but the relevant lines are pasted below (I had to insert spaces after the double colons to keep the editor from creating unwanted hyperlinks):

[lines 1 - 467 omitted]
[Info ] <MainWindow:: open> “/home/rjw/Videos/Raw Footage/Flat_Car_Stake_Pockets_02.mp4”
[Info ] <AvformatProducerWidget:: onFrameDecoded> color transfer 6 = “ITU-R BT.601”
[Info ] <AvformatProducerWidget:: onFrameDecoded> “/home/rjw/Videos/Raw Footage/Flat_Car_Stake_Pockets_02.mp4” is variable frame rate
[Debug ] <AvformatProducerWidget:: offerConvert> in 0 out 8921 length 8921
[Debug ] <FfmpegJob:: start> “/home/rjw/Downloads/Shotcut-Video-Editing/Shotcut/ -loglevel verbose -i /home/rjw/Videos/Raw Footage/Flat_Car_Stake_Pockets_02.mp4 -max_muxing_queue_size 9999 -map 0:V? -map 0:a? -map_metadata 0 -ignore_unknown -vf scale=flags=accurate_rnd+full_chroma_inp+full_chroma_int:in_range=mpeg:out_range=mpeg -color_range mpeg -f matroska -codec:a pcm_f32le -codec:v utvideo -pix_fmt yuv422p -y /home/rjw/Videos/Build a Shake-the-Box Flat Car/Flat_Car_Stake_Pockets_02 - Converted.mkv”
[Info ] <Util:: isMemoryLow> available RAM = 14252772 KB
[Info ] <Util:: isMemoryLow> available RAM = 14226436 KB
[Info ] <AbstractJob:: onFinished> job failed with 1
[Info ] <Util:: isMemoryLow> available RAM = 14278408 KB
[Debug ] <MainWindow:: openVideo> QFlags<QFileDialog:: Option>()
[Debug ] <MainWindow:: open> “/home/rjw/Videos/Build a Shake-the-Box Flat Car/Flat_Car_Stake_Pockets_02 - Converted.mkv”
[Debug ] <Mlt::Controller:: setPreviewScale> 1920 x 1080
[Debug ] <MainWindow:: setAudioChannels> 2
[Debug ] <Mlt::Controller:: setAudioChannels> 2
[Debug ] <VideoVectorScopeWidget:: profileChanged> 709
[Info ] <MainWindow:: open> “/home/rjw/Videos/Build a Shake-the-Box Flat Car/Flat_Car_Stake_Pockets_02 - Converted.mkv”
[Info ] <AvformatProducerWidget:: onFrameDecoded> color transfer 6 = “ITU-R BT.601”
[Info ] <Util:: isMemoryLow> available RAM = 14239672 KB
[Info ] <Util:: isMemoryLow> available RAM = 14238400 KB
[Debug ] <MainWindow:: closeEvent> begin
[Debug ] <MainWindow:: closeEvent> end

If I understand your report correctly, it seems the problem is self evident: you filled up your hard drive. We will probably not keep this categorized as a bug. Maybe you would like to convert this to a suggestion to add a feature for Shotcut to monitor hard drive utilization and stop file conversions if the hard drive reaches a certain fullness?

Well, I’m not entirely sure this is a bug, but it seems odd to me that I might start ShotCut with 566875096 (actual space available as of writing this response) available 1K blocks, then have zero available blocks on exit, following a Shotcut session consisting solely of a failed conversion.

I understand that video processing is very resource intensive. My machine is older, but I have 16GB RAM and over 500 GB disk space available. It’s pretty hard to fill a 1 TB hard drive!

Are there ANY known issues that could cause Shotcut to fail to clean up temporary files, to the point where 500 GB disk space could be consumed in less than a month? (That’s how long I’ve been using Shotcut).

Don’t use that lossless option on a small partition. That is not the default option for a good reason. There is a function that checks the free disk space prior to the operation, but it cannot predict the size of the output operation. It simply checks if there is less than like 25 GB. I will not be trying to improve or “fix” this.

Thanks for the tip. I guess I should’ve tested “good”, “better” and “best” to see if I can detect a difference!

With 1080p60 source files 1 hour of video converted to “best” quality uses about 200GB. So things can fill up quickly.

Maybe you could do a more specific test to see if there really is a problem.

  1. Start a new project
  2. Capture the free hard drive space
  3. Begin the conversion of one file
  4. Capture the free hard drive space and compare to step 2

Does it meet your expectations?

Try other variations - one step at a time - checking the free disk space between steps. Maybe you can narrow down to the exact step that uses so much space.

Actually, I take that back. This check is only in Export. We should add it to Convert and Reverse as well.

1 Like

You and I are thinking along the same lines. I have started a log file where I record disk free space - always with the Trash empty and with no applications (other than Terminal) open. Opening and closing Shotcut; opening and closing a project within Shotcut; opening a project and viewing the video and closing Shotcut - all use trivial amounts of space - between 1 kB and 1 MB.
Converting my 5:56 long video to .mkv consumed almost exactly as much space as the finished file - about 12 GB.
I don’t know exactly how Trash works in Linux - it is possible that I thought I was deleting all of the MKV files after I had exported my video, but if they just moved to Trash, I can see how I could have filled up my hard drive: I have just of 25 GB of mp4 files - if they consume 10x the space as MKV, that’s 250 GB right there.
At this point I agree that there does not seem to be any buggy behavior here - it’s most likely me not managing my disk space. If, over the next few weeks, I discover something to change my mind, I’ll create a new issue.
Thanks for all of the prompt support and advice!

I agree - a disk space check prior to convert would be helpful. Some statistics (which you probably don’t need:

MP4 Size MKV Size (all “Best”)
592.6 MB 9.5 GB
208.1 MB 3.4 GB
1.1 GB 18.0 GB

Done for the next version.