Hi everyone, I’m attempting to export my finished project to an MP4 that would be a reasonable filesize to upload online and/or have people download without visibly losing quality in compression (or being near enough to be hard to tell). However, unless I export at extremely high qualities and large filesizes such as Constant Bitrate 80Mb/s or Quality-based VBR 100% (other lower settings too but still creating files above my target filesize) I get very visible, hard to ignore thick bars of black artifact banding when there’s a cut to black, and blocks of gray artifacts in some fades to black when trying the lower bitrates than default suggestions. I can’t recall every setting I’ve tried, but I can say I’ve tried following advice in threads like this and even tried to re-encode in Handbrake, and am now out of my depth.
My video’s length is 00:16:39:00, and I’d like the resulting file to be between 400-600MB.
Shotcut Version 19.12.31
Video Mode HD 1080p 25 fps
Display Method DirectX
Operating System Windows 7 64bit
Processor Intel® Core™ i5-3570, 3.40GHz
Installed Physical Memory 16GB
Available Physical Memory 8.22GB
Codec/Extension As stated am exporting an MP4, but am using the libx264 codec under the H.264 High Profile preset to start with. Haven’t tried other codecs, but I’m willing to!
Resolution 1920 x 1080
Framerate 25 fps
Bitrate Errr this is tricky because I can’t recall every one I’ve tried, but just know that I’m even getting this banding at 12Mb/s under Constant Bitrate, and 55% quality for Quality-based VBR when selecting Rate Control in that H.264 High Profile. The audio’s bitrate I’ve been putting at 320kb/s, as that’s what my source audio is…
Use hardware encoder was turned off, and jobs fail if I leave Parallel processing on.
Attached my project file in addition. Thanks in advance!
I-BR-Lyric Video.mlt (2.4 MB)
PS: As I can’t post a 3rd link in my first post, I have to make this one to explain my logic behind my target filesize - I used this video filesize calculator, and figure anything close to 1GB is a bit much to ask people to download
I am making You Tube videos using Shotcut. When playing my videos back on my older TV, I sometimes see a banding problem. It is really irritating. Initially, I had a big concern about it, but I have seen my videos on newer TVs, and the color banding problem is minimal…almost not noticeable. Also, I have had no complaints from viewers regarding color banding, so I am not particularly concerned about it. Is it possible that your problem is merely a playback issue on your system, especially if it’s and older system? Hopefully, that is all it is.
Did you try using the default export settings with parallel procession turned off?
Do you see the problem when you play the lower bit rate export in Shotcut?
How can you show your problem? Unlisted on YouTube? Screenshots of the problem? Upload a sub clip on cloud drive? You can open it Source player, trim it, and then use Extract Sub-clip in Properties.
Hey I certainly hope it’s the case, I’ll have the chance to play the video on a different computer today.
Yes, if I leave parallel processing on my exports don’t finish. This banding occurs at the default export settings and lower bit rates that I try. I don’t see anything under presets specifically labeled “lower bit rate”… I mean I can pick Rate control, but yes defaults for these settings give me the banding.
The top image comes immediately before the bottom, as it’s the cut to black. And actually on my other monitor, giving credence to hapnstance’s thoughts, I can see a little banding in the black on the right of the flag. It’s… livable though, maybe? But in the second image you can see gray bands at different shades going vertically across what’s supposed to be a perfect black cut.
(also there’s a big black border between both images, that’s just from my screencapping and pasting the images together)
To further illustrate…
I reencoded the video from max quality (H.264 High Profile, Constant Bitrate 80Mb/s) with Handbrake and kept getting the same problem with it’s H.264 exporting, 265 as well, but not when I exported with the MPEG-4 codec. Instead I got more compression, but the gray artifact bars in the cuts to black are entirely gone.
Can you tell us more about the source elements? For instance, the sky and flag… is that originally a full-color video that has Shotcut filters applied to get the red look? If so, that’s partly where the banding is coming from. That would be a really extreme color grade if the source video is very lossy. The data thrown away during the encoding of the original file will become very evident as posterization or banding if color grading is pushed this hard.
The cut-to-black screen is acting like the black in the source photo/video is not perfectly black, further emphasized by the observation that the overall black background is not the same color as the black bar separating the two screenshots. It’s definitely a lifted black. If the source is an image file, then swscale will do a full-to-limited range conversion without dithering, and bands will result if blacks are not perfectly black. If the source is a video, then it may be guessing the source range incorrectly and lifting the blacks. Check the Properties pane of the clip and try toggling the Color Range box to see if the black ever becomes true black. This may not be the actual problem, but it has the same look to it.
As for MPEG-4 not showing bands, that’s because MPEG-4 is so bad at encoding that it isn’t preserving enough detail for the bands to be represented in the export. They get averaged away by the compressor as visually insignificant in order to save bitrate, hence your observation that the file had more compression. The overall background is still a lifted brighter black compared to the black bar dividing the screenshots, so I still question the source. Also take a look at the graphic EQ bars in the bottom right, which look much more blocky using MPEG-4 than the same area with H.264 encoding. So, MPEG-4 isn’t a true solution to the problem.
Yes the vast majority of my source elements are full color videos that I’ve used color grading to turn red.
The background definitely isn’t an actual black as you’ve noted. The text on screen has a transparent background too, and I made the cut to “black” by simply having the next part of the timeline be empty.
Attempted about 40-something minutes ago to put a black color (Open Other > Color > Color… > #000000) in a track underneath all of my footage, but I’m still getting the artifacting on export.
The Color Range drop-down menu on the clip of the flag is set to Broadcast Limited (MPEG), turning it to Full (JPEG) tints the black to red.
Considering your description in your last comment you want to try to make everything near black truly black. Also, since you added a black background track, you could try adding a Chroma Key filter, set the color by using the eyedropper against this pseudo black background. Then, perhaps reduce the threshold a little to limit it. It might also work to use Levels filter, set channel to Red (or Value), and increase the Input Black a little.
I’m sorry to say but none of these suggestions resulted in a banding-free export. Additionally set vpre to high and the preset to slower under the Other tab, and it doesn’t seem likely that’d undo that, as I understand it slower exports typically result in better quality. For the record, the eyedropper picked a black with the hex of #010001 off the empty space, which means that Shotcut itself is not programmed to display true black unless the user places a black colored clip themselves. But I’m also really, really doubting here that an untrue black just 2 values off is causing such a huge problem.
I also attempted to make a compromise by using a fade instead of a cut, both by using a Fade Out filter and a dissolve transition into a black color - no dice. Other parts of my video with the Fade Out filter going into nothing seem to not have trouble, probably because they’re longer clips that have more time to fade.
Wildly enough though, parallel processing works for me again, and I have no idea why it works now and didn’t export before.
FYI, if drag a small rectangle with the eyedropper it uses the average of pixels within the rectangle. Otherwise, you are picking one random pixel, which may not represent the general tone.
The Video Zoom scope is a great way to see values of individual pixels.
Well selecting in an area that literally has no visual elements, in a rectangle or just as a point, always nets me with #010001. But I selected in an area of the actual clip (basically a vertical rectangle in all that black space) to get a different hex code for the black background’s chroma key filter (#0F0000) and I still have the same result.
Video Zoom scope shows me some fairly bright red colors when scrubbing through the clip, but I don’t know how to take what I’m seeing here and apply it to correcting my problem. Can you provide me with further details?
Alright, so I actually have managed to come up with a solution, and it’s not exactly “optimal” but I guess it’s ultimately no big deal…
Basically I gave up on the filesize being half a GB and allowed it to be just over 1GB instead. Now I did a ton of exports through Shotcut, plus many conversions in Handbrake, and as such I don’t recall which file I had was which. If I had to guess though, I likely used Handbrake for it, and yes it’s H.264. May have used Denoise, NLMeans, Light or Ultralight, Film Grain tune. And I probably had a light deblock on it in addition, but that may have been unnecessary. No artifact banding in black screens, and still very reasonable quality everywhere else!
The filesize calculator I was using also shows that 1GB is acceptable for a video this quality and length by certain standards. This exported video uploaded to Facebook (though it took a couple minutes to display in HD), and both Dropbox and Google Drive under free plans, but it was too big for Box. Hey frankly if you can’t use upload files a gig in size on a service, I have questions about what they expect their users to do, you know?
Personally, I think if you went through that much effort to use Facebook as a primary delivery channel, you wasted your time.
So I basically listed those websites just because they were able to play the video, and didn’t compress anything further to create errors. The effort I was going through was to fix the artifact banding generated in your program, my guy
Well, if that wasn’t a rude remark?! I think you generated it through the software. Oh, and Facebook sure as hell compressed it further as well as the previews within the cloud drive front ends.
Here I try to reproduce or simulate the problem using Open Other > Text:
Then, I export it using defaults without hardware encoder:
No vertical banding.