Lossless Export, same as source

Is it possible to export videos using the same settings as the source and is this lossless?

If not, how do I go about doing so?

Thanks

That depends on the codec of your source :slight_smile:
If you use common codec such as mpeg4 / h.264 you can achieve near lossless (not 100% sure if it is completely lossless) if you go to export settings - advanced - codec and set quality to 100%. This will generate very big files but visible lossless (probably completely lossless).
There might be other codecs which are 100% lossless - but the art of compression is to do as much compression as possible without visible artefacts. That would normally be around 55-65% quality setting.

There are at least two ways to interpret the question. @RilosVideos covered how to make a lossless file.

The question also sounds like “can I take a source file encoded at 50Mbps, make cuts, export at 50Mbps, and the export be lossless compared to the original”. The answer is No. There will be generational loss even if the same settings are used for each successive export, unless the settings themselves are lossless.

Granted, at high enough bitrates, the generational loss may be so insignificant that it wouldn’t matter to you. Only you can be the judge of that. The intermediate formats like ProRes and DNxHR are designed to be encoded multiple times with virtually unnoticeable loss. H.264 and similar codecs… not so much.

3 Likes

Thanks Austin, that is exactly what I meant, sorry for my poor explanation.
So it’s just a matter of how do I get similar file size whilst reducing loss?
Is that with the Export setting at around 55%-65% as RilosVideos mentioned above?

Thanks to you both for your responses :wink:

Exporting at 55%-65% is very reasonable. The quality is good and the file sizes aren’t huge. Eyeball the result and see if it’s good enough for you. If so, then Done.

If being lossless is a priority, then compromises will be required in the form of larger file sizes. Since the goal appears to be keeping file sizes the same, I won’t go into that unless you’re interested.

ok, thank you for your time

Maybe you are looking for other tools which are able to just make a few cuts, put the video together and export mainly lossless. There are tools like that available like ffmpeg, or here https://www.videohelp.com/software/LosslessCut

Not 100% sure if it is really lossless. As i understand it there is no decoding/re-encoding involved so the video codec will not change, apart from cut off scenes. There is one backdraw: you cannot cut to the exact frame, but only to keyframes (P-frames) instead of I-frames.

1 Like

Thanks for the link, I do need a little more than that though.
I need these functions and generally that’s about it…
Cut, Merge, Add/Remove audio, Add/Remove subtitles.

Possible stretching of audio without pitch adjustment is also an issue. I have an idea how this should work but I doubt there’s any real need for such a thing. I have come across audio that just needed a little or a large stretch and it was ok. But one film I have is a real pain in the ass! It starts and finishes in sync, but goes way out in the middle. What I need is some sort of “envelope” that adjusts the audio over it’s length to bring it back.

Anyway thanks again

Be careful though, there are reports on this forum that claim that some video players have difficulty rendering MP4 videos that have been exported at 100% quality

I have no problems playing them with the VLC player. I nearly never would use 100% quality (files are way too big), maybe only as an intermediate format for further editing. But there are better choices for that like Austin mentioned.

You can do all that, according to my understanding with LosslessCut (not 100% sure for the subtitles).
But you dont have any filters for color grading e.g. or audio/video stretching or pitch adjustments. But you can cut and merge clips, remove or add audio, but you have the limitations mentioned above. I didn’t use it but it sounds interesting for your purpose - and its free:-)

That’s great, thank you. But after reading about the limitations on frame editing, I do need something more precise. It’s the only way I can be sure to get it in sync. Being new to this, I have no idea of the techniques on syncing audio and video, so I devised my own way of working that did the job fine. But it does require what you called “I-frame” editing.

I was going to mention LosslessCut if it wasn’t here already. Nice post. I have used it quite a bit, particularly for trimming down videos before I include them in a slideshow with Shotcut later. Some of those are 5 minute long dashcam videos where I only want to really include just 10 seconds or so. And I don’t want to keep all the 5 minute long original files after the project either, so trimming them before going to Shotcut makes sense. Also LosslessCut’s interface is really quick to use, play, hit one key for beginning point and another key for end point. Then write the file. It’s a narrow purpose program.

I will make an educated guess here because I’ve actually done some data processing roughly chopping up video with my own code before and I think it is indeed lossless. It seems to cut the video only at certain points… you can’t fine tune where it cut, it’s fairly coarse. And my guess is it actually just cuts out the data in the chunk to be removed (or more precisely it writes a new file but leaves out the chunks on either side of the selection). I think it’s very simply done like that, no re-encoding at all, so no data loss. I know some video formats will work fine like that, but I’m definitely not sure about all. And I have to say I have had some odd playback with different players, and also with Shotcut, on those video files I’ve made using LosslessCut. Sometimes it will show up with the same original length of the video and when you play it, it will be black screen on either side of the part you kept in LosslessCut. I also think Windows movie player wouldn’t play some. So there may be some metadata work that isn’t being done properly, or isn’t really able to be done with the method LosslessCut uses chopping up the video data as simply as it does.

I have not looked at the code, but someone may able to say with confidence if they have. Or you could contact the developer.

1 Like

Since it does not re-encode the data it has to cut at an I-frame. So depending on what the GOP length of the video is the start-time of the cut can be quite a few frames from where you expect the cut to be. See:

The page on Github says:

Cutting times are not accurate! Start cut time will be “rounded” to the nearest previous keyframe.

  • Lossless cutting is not an exact science. For some codecs it just works. For others you may need to trial and error depending on the codec, keyframes etc to get the best cut. See #330
  • Your mileage may vary when it comes to Keyframe cut vs Normal cut . You may need to try both, depending on the video. ffmpeg also has documentation about these two seek/cut modes. Keyframe cut means -ss before -i and Normal cut means -ss after -i .
2 Likes

There you go. Thanks for that info :slight_smile: and thanks for linking the relevant bug post. It just comes down to the way video works and there isn’t a clean solution. Depending on your content and goals it may not be a big issue for someone like me. In LosslessCut I can just make the clip big enough to include what I want, I don’t need to be frame perfect, and then I can do any finer trimming once I load it into Shotcut. But for OP, it’s maybe not useful when things need to be synced.

I appreciate all the info, but LosslessCut isn’t useful in this situation. I need precision to get the audio suitably synced.

Thanks for your time though

I’ve been flicking back and forth between Shotcut and VSDC trying out which is better for my needs and ease of use.

Shotcut is by far the easier to get desired results, but I found a significant drop in the Output quality. I expect this is the Quality setting. But VSDC managed to keep the same quality, as far as I can tell, yet only increased the file size by 250MB, but that’s with the English audio added. Is this sort of output possible in Shotcut without compatibility issues?

Drunken Master was 1.75GB before edits. Once I time stretched the English audio to fit, the exported project is now 2.01GB and as far as I can tell is as good as the original file.

This is what I would like in Shotcut, but have no idea how to achieve this. Is it possible?

What were the export settings you used in Shotcut? What were the export settings you used in VSDC?

As you know, I have little idea on how to use these apps, so am not able to locate exactly where to even change these settings. In Shotcut, it’s fairly obvious via the export panel. But I don’t know what the settings indicate.

For example, resolution. Is this the displayed resolution? or is it something more to do with how the codec stores the video. I was always puzzled by this as I’ve seen full HD videos that are stored as 720p resolution???

But I did set Shotcut’s output to 65% so I assume that is a factor. I’m just confused how you can have quality OR size but not both? When there are clearly ways to have both as can be seen by downloading any recent film. It probably requires a lot of knowledge to do this, but some apps, like Handbrake make this easier.

VSDC however, doesn’t seem to suffer this issue. It just exports the file as is it seems. Click the Export Project tab and you are shown a list of specifications, although it’s not clear if these are the export settings or the current settings of the original file. Common sense says the former. But I see no way to change them, which makes me think it’s the latter? Or maybe VSDC just preserves the original settings?

But I read that Shotcut will make huge files at 100% and they may be incompatible with certain players/devices. I don’t want to lose that compatibility or quality. These films are already poor quality, losing a little can be harsh. But VSDC is a chore to use compared to Shotcut, and that’s not completely straightforward for a complete novice!!! :relaxed:

Right. That’s why you are asking. So just tell us what are the settings that are set when you exported it out of Shotcut. Better yet you can just take screenshots of the Shotcut export menu settings you had for that export it as well as screenshots of the export settings in VSDC.

But not necessarily better. I’ve had times when Handbrake exported video files with variable frame rates when I wanted constant frame rates.