Export using codec hevc_qsc failed

Hi all.

I’m new in this forum, alos new using Shotcut.

I already did some jobs and exported short videos from .vob to mp4 but here I got a fail with a long video.

I’m running Windows 10 64 bits V2004 “up-to-date”.
My computer is Dell Laptop Latitude 5501 Intel® Core™ i7-9850H CPU @ 2.60GHz (6 cores)
16 Go RAM
500 Go SSD
ShotCut 20.07.11

I try to export a video (1h47) coming from VHS digitized to .VOB files, so image size is 720x576 @25fps
(I already did sames jobs and exported short VHS digitized videos from .vob to mp4 and it was working well).

I want to export to .mp4 using codec hevc_qsc (hardware encoder available in my system).
Note that if I uncheck “use hardware encoder” I get the same failed export.

Shotcut export fails after half of time of export. File is created but not complete.

Got settings but unable to post them (no right)
Got logs but unable to post them (no right)

Thanks for your help.

Here are settings…
Params

ParamsVideo

ParamsAudio

JournalAppli.txt (45.4 KB)
JournalTaches.txt (29.5 KB)

From the export log

IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.

That error means there is something wrong with an HTML-based filter, but I cannot tell which one from this. You might be using or doing something unsupported, but I cannot tell from this. If you do not know where HTML filters are being used, then you can upload your project file.

[hevc_qsv @ 00000000099dd200] Error allocating the output packet
[consumer avformat] error with video encode: -12 (frame 88624)

These indicate encoder errors, and it might be caused by the previous error, but I do not know for certain. You should turn off the hardware encoder and try again using export defaults and check the log.

Here is my project…
M.mlt (32.9 KB)

I already tested without hardware encoder, same issue.
I also tested using h264 encoder, same issue.

What I notice is that memory needs is growing till reaching all the available RAM available.
It continues to work during 10 minutes at max RAM consumption then stop encoding. At this time RAM decrease suddendly (see memory below 98% while encoding using hardware).

OK, the encoder errors concur with the out-of-memory issue. I do not get the ROM Exceptions either, and maybe that is due to lack of memory too. There could be a memory usage issue. I am running a test with your project, just using export defaults (not HEVC) with parallel processing turned on, and this will take some time. So far, I do not see a big memory consumption issue. The export process (qmelt.exe) at 15% is using only 505 MB after starting with slightly less. It has been at around that level for the past several minutes. While this was running, I played the project in fast forward, and Shotcut used up an additional 2 GB, which is not too extreme considering the filters being used. BTW, the Crop:Rectangle filter on the track is the HTML-using filter.

How much RAM is free after you close Shotcut? You should monitor the memory usage of the shotcut.exe and qmelt.exe processes in Task Manager instead of overall memory. Shotcut cannot simply limit itself to your free memory. If you have not done so already you should:

  1. close Shotcut
  2. close other things to free up more memory
  3. start Shotcut
  4. open the project
  5. export

Definitely, if you use Shotcut for a while editing it will consume a lot memory. Then, it may have too little for export.

I will export again, but due to lenght of video, it will take more than 40 minutes to fail.
I already rebot computer, stop unecessary services… (I’m working in computers).
I let you know the result.

My computer runs on battery so CPU is not at full power.

Memory without shotcut

Memory with shotcut at start of exporting

Memory after few minutes exporting (5% exported)

I am at 53% of export, and only 523 MB used by qmelt.exe. I do not know what is going wrong on your system. Try two things:

  1. disable the Crop:Rectangle filter on the track
  2. disable Export > Video > Parallel processing

Update:

  • export at 80% and my qmelt.exe is only using 539 MB
  • export at 91% and qmelt.exe only using 540 MB

Something strange by the way, settings for audio are never stored in projets…
I mean that I set Binary flow to 192 K and every time I open the projet it is back to 384 K
–> Is this a bug ?

Same for Codec that always come to h264_qsv while my setting is hevc_qsv

No, export settings are not saved in projects.

Test 1 -> Without parallel tasking, same…

Note that I have reached the max post for the day… Need to wait 11 hours !

Test2 --> Parallel tasking enabled, crop unchecked

Test 3 --> No parallel tasking, crop unchecked

In fact, none of the tests are good


I did more tests…
Same project without any crop or video size in filters… Only white balance and sound level / tone adjust.
Codec hevc_qsv, hardware encoder, parallel tasks.
aac codec, 192k, stereo
Video original size : 720 x 576

–> All memory consumed in few seconds… All 16 Go RAM used after 5%. Failed at 60%

Here are the logs
Task log
Tasks.txt (15.3 KB)
App logs
App.txt (136.0 KB)
XML as text
Project.txt (32.6 KB)

Sorry, I do not know what it is going wrong. My first test completed using under 600 MB for the export qmelt.exe. Next, I replaced the video source with an interlaced one since the previous was progressive. I do not have a long enough interlace SD PAL clip to substitute, so I had to use NTSC 720x480. That did not show a problem after 13% export.

image

Only 97 MB! I also used hardware encoder with HEVC CBR 3M and 3 B-frames, same as you. But my machine does not have Quick Sync, and I had to use Nvidia.

Update: at 43%, and 107MB used.

You can try removing both Size and Position and Crop: Rectangle filters from the track. What are you doing there is heavy, and it is usually better to use Crop: Source to remove the rough edges.

Hi !
I did more tests…
Same project without any crop or video size in filters… Only white balance and sound level / tone adjust.
Codec hevc_qsv, hardware encoder, parallel tasks.
aac codec, 192k, stereo
Video original size : 720 x 576

–> All memory consumed in few seconds… All 16 Go RAM used after 5%. Failed at 60%

Here are the logs
Task log
Tasks.txt (15.3 KB)
App logs
App.txt (136.0 KB)
XML as text
Project.txt (32.6 KB)

Hi !

Any idea what is wrong ?
I’m unable to export at this time.
I will post my original video on “wetransfer” and give you the link so you will be able to test with my project and my original file.

I tried to reproduce with the VOB you provided, and I still do not have a problem. Export is at 16% and qmelt.exe is using 243 MB. I cannot spend any more time on this, but I encourage you to keep turning things off and reducing until the problem goes away including things you already tested. It might be a combination of things. Remove/disable something, test, leave it off, remove/disable another thing, test, and repeat. Start with turning off hardware encoder, parallel processing, and all track filters. In an new project, export each VOB from the timeline by itself to see if each file is behaving OK.

OK… Thanks.
I understand.
I will split the project, export then merge both files.

I will do some tests on the next project (same as this one).

I did one more test… Memory consumption still growing up !

New project :
Only 1 file (file I sent to you) - VOB file 750 Mb
No filters
No parallel tasking
hevc-qsv codec.
Hardware encoding

Here are the exact details

Log files
ApplicationTask.txt (38.5 KB)
LogTask.txt (3.5 KB)

Project
TestBasique.mlt (583 Bytes)

–> Still not working here using hardware encoding.

Same test without hardware encoding seem to work correctly --> Hardware encoding is one of the issue !