So I'm about to crop yet another video with black bars, wishing I could do so without an encode, and I got to thinking about how things work the way they do and just why it's impossible to crop without encoding, and theoretically, I think you COULD crop without encoding under the right circumstances. The video would have to be encoded with a brand new experimental video codec, it's the only way. Nothing like this exists as far as I know, and I'm not sure I have the skill or the time to build something like that, but it should be possible, in theory. Here are my thoughts. The only reason we can't crop without decoding frames is because we encode each frame as a single image. But what if we encoded each frame as multiple images, joining them during playback? Would something like that even be possible? Ofc, we could only cut at the predefined cut points, but that could be useful nonetheless.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 5 of 5
Thread
-
-
Not all frames are single images,most are partial and having more images would increase the size too much.
I think,therefore i am a hamster. -
This is not the only way to do this, and there already is a solution (but one which may not work for you). Mkv, h264, possibly others have a parameter called "cropping rectangle" or "cropping offset". It is applied during playback.
However, only some apps will honor this metadata. When it doesn't, you get the full image (with bars).
This was one feature used with non-mvc stereoscopic files in hopes to maintain 2D compatibility (e.g. full sbs is 3840x1080, crop rectangle only shows left 1920x1080), but it also required standard players to honor the crop.
Scott -
As Cornucopia points out...
Many codecs work with mod 16 (or 32) frame sizes internally. For example, an h.264 video with 1920x1080 frame is padded internally to 1920x1088 before encoding, then cropped back to 1920x1080 after decoding. The metadata for exactly how much to crop is stored in the video stream. There are programs that allow you to modify that metadata to change the cropping (without re-encoding). I believe this type of cropping works with all decoders for that codec.
There there are also cropping flags in some container formats. You can see these in MKVToolnix, for example. Theoretically, those will work with all codecs. But not all players pay attention to these flags. -
Or you can do it manually, you'd just crop during playback, whatever allows it, every video must be converted from YUV to RGB for playback to have rgb pixels on screen. That process (yuv to rgb and crop, or vice versa) can be programmed by you, example, using avisynth or vapoursynth script and playing that cropped rgb, whatever player allows it.
Or just use a player that can set crop, if there is such, I'm sure they'd do it in one uncompressed sequence, so all the same.
Similar Threads
-
[VirtuaDub/VirtualDub2] - Neat Video filter historical versions
By Hunk91 in forum RestorationReplies: 4Last Post: 13th Mar 2024, 17:02 -
Use Neat Video with HDR10 content
By jriker in forum Video ConversionReplies: 2Last Post: 5th Aug 2023, 13:43 -
Restoring a whole Anime movie using Neat Video
By xonathan in forum RestorationReplies: 4Last Post: 26th Apr 2021, 08:55 -
Neat video "colorizes" wrong color hands and face
By mammo1789 in forum RestorationReplies: 4Last Post: 25th Aug 2020, 15:21 -
Any Experiences with "NEAT VIDEO"?
By Avagadro1 in forum RestorationReplies: 3Last Post: 12th Aug 2020, 00:22