![]() ![]() I've done it myself, using this tool actually! The "lossless" aspect refers to not having to re-encode the trimmed video file, which differs from virtually every other video editing software which will re-encode the output even for a simple trim.Ĭonceptually it's pretty simple. It is definitely "situational", in so far as you have a compressed video file that you would like to trim without re-encoding it and introducing more artifacts. In neither of those processes the actual image data needs to be fully decompressed, it's just moved around in its compressed form and therefore preserves the exact pixels it represents. Similarly, if you take a bunch of compressed blocks from a JPEG and fix the image size in the header, you'll get a cropped JPEG – although it's a bit harder than just copying bytes, as you need to peel at least some compression layers – but only lossless ones. If from a video file, you copy its header and several cut-out sequences of frames, each starting with an I-frame and ending in either I-frame or P-frame (just by simple data copying, just find at which byte they start and end), then with few adjustments to the header you'll get a perfectly good video file – although you might need to do a similar process to the audio and subtitle tracks, and rebuild the index if you want to enable fast skipping in the video. JPEG block ~ I-frame and and all the frames that depend on it ( so-called group of pictures, although the B frames at the end of GOP complicate the matter just a teeny-tiny bit) You just leave blocks you didn't modify as you found them.įor video, I can definitely say this comparison and argumentation is at the very least misleading. Yes, it is situational, but since JPEG is made of independent blocks of pixels that, apart from quantization which you can simply not touch, are compressed losslessly, it's easy to shuffle such compressed blocks of pixels around without disrupting their data – and this includes 90° rotation and reflection. This editing includes red eye removal, data/text imprinting, copy/paste and so on. Some random example: īetter JPEG takes advantage of this smart block handling, allowing for partial image editing without recompression of the entire image. I am very skeptic about your seemingly pretty general, board statement. That may be possible, but is situational. I’m also doubtful about “lossless JPEG editing”. ![]() Video players seek videos by finding the nearest I-frame and decoding it and frames around it, they don't scan the entire file (in fact, in case of livestreams they literally can't). can be cut out of the video stream and displayed separately, as is. Some frames are full frames (I-frames), i.e. Are you interested in promoting your own content? STOP! Read this first.Īre you familiar with how video codecs work?.For posting job listings, please visit /r/forhire or /r/jobbit.Do you have something funny to share with fellow programmers? Please take it to /r/ProgrammerHumor/.Do you have a question? Check out /r/learnprogramming, /r/cscareerquestions, or Stack Overflow.Direct links to app demos (unrelated to programming) will be removed. ![]() If there is no code in your link, it probably doesn't belong here. ![]() Just because it has a computer in it doesn't make it programming.That means no image posts, no memes, no politics.Please keep submissions on topic and of high quality.r/programming is a reddit for discussion and news about computer programming ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |