Hi,
I split a video in the middle and then used the “Extract Subclip” option in the properties. However, when I try to play the resulting video using VLC or KMPlayer, there is a 5-second black screen at the beginning. Could you please help me figure out what’s causing this issue
That is the nature of extract sub-clip: it does not work good on many kinds of video files. Since it is a kind of hack, but people seem to want it. If it does not work good then instead Export.
I have not used the “extract subclip” option, so I may be off base here, but my first thought is that what you have described may have to do with where / how often the I-frames occur in the source video.
I-frames are complete pictures that are included in the video stream periodically. If the video stream included nothing but a series of I-frames, the video file would be gigantic, so part of the compression that allows for reasonable file size (and likewise reasonable possibility of transmitting over the internet, wifi, etc.) is to transmit most frames of the video as B-frames and P-frames. These contain only a small amount of data which allows the decoder to reconstruct the frame based on the difference of the frame compared to the previous (or, in the case of B-frames, the next) frame.
Eventually the differences add up enough that it is necessary to send another I-frame to establish a new starting point for subsequent P- and B-frames.
Here’s the catch: if the video is processed sequentially, the decoder gets an I-frame before encountering any P- or B-frames, and thus it can process the P- and B-frames correctly. But if you slice a video apart at some point other than at an I-frame, the result is a video stream that starts with P- or B-frames - without anything to reference them to. The decoder cannot reconstruct the picture until it finally reaches another I-frame, thus producing only a blank screen during that time.
Part of the genius of Shotcut and other NLV editors is that they can Export rather than simply slice apart. You can slice a video at an arbitrary point, even if it is between I-frames. I am not sure exactly how it does it, but in effect the video engine goes back and reconstructs the sequence of frames so that it can pick up “in the middle.”
Again, if I have misunderstood how the sub-clip command works, this whole answer is going astray, with my apologies!