Why not video and audio Passthrough (copy) ?
Basically Shotcut is a video editor, not a video manipulator. It isn’t designed to be a “jack of all trades”. What it does, it does well. There are other utilities that do this. See:
See also the FAQ:
One of the technical reasons for not supporting passthru is that it would place many restrictions on the user that they wouldn’t like.
Passthru would require that start points for trimming must align with keyframes in the source video. For videos with really long GOP, those keyframes might be 10 seconds apart or more, which is severely limiting to the user’s artistic vision.
When it is time to encode, the codec parameters for any non-passthru material must precisely match the parameters used for the passthru material to avoid “quality strobing” in the final video. Strobing is when the quality level visually appears to jump from good to bad to good, which in this case would happen at the cut points. However, there is no way to reverse-engineer the codec parameters used by the source video. So matching the source quality would be extremely difficult. If the source video was encoded using a model of GPU that you don’t own, it could be impossible to match, as other GPUs and the software encoder will have a different look.
Also regarding codecs, passthru would require all media to be of the same format. It would not be possible to mix H.264 and AV1 videos on the same timeline because the codec cannot change format midstream in the output file. Neither could any media clip change frame rate or resolution or any other property. Likewise, a lot of music is MP3, but a common output format of camera audio is AAC, meaning music couldn’t be interleaved with the speech picked up by a camera mic since they aren’t the same codec.
The limitation above is further limited by the fact that no media can be manipulated at all. That means no fade outs, no filters, no speed ramping, and no mixing multiple audio clips, because that would generate new material that requires encoding instead of passthru. As described above, we can’t encode just the fade-out portion and overwrite the source in the middle of a GOP. The whole GOP would need to be encoded, which leads to those strobing issues again.
These are extreme limitations, to the point a user can’t even edit in what is supposed to be an editor.
Shotcut has an Extract Subclip feature that in essence provides passthru trimming. But for anything beyond this, passthru offers minimal benefit because Shotcut has encoding options for visually lossless and truly lossless output, which is basically as good as passthru but without any limitations during editing.
Do you seriously think that there is someone who would like to use the passthru after joining two movies with different codecs or after applying filters, effects, transitions ?!?
I think it would be better to add the function and let users decide whether to use it or not.
Yes, I seriously believe users would try to do that. With foreign movies, they may try to add text filters to burn in subtitles in their native language. People on the forum ask how to do this all the time. There are also people that make reaction and critique videos of movies, and they may want the movie part to be passthru to preserve quality while their own video (in a different format) is spliced in.
I get that you’re wanting to trim movies, but how is that going to work if cut points are only available in 10-second increments? Is a movie really watchable when the edited cut points are so far off from where the original cut points are?
The more common attempt at passthru probably wouldn’t even involve movies. I could see cell phone users trying to passthru their vlogs as much as possible to avoid further quality loss. But none of the vlog-style edits they want to do would be supported.
This would be wasted effort. There are already tools that do an excellent job of this. See LosslessCut as an example:
I DON’T WANT TO TRIM MOVIES !
I just want to export a movie without recompressing the video or audio if I haven’t made any changes to them.
This is to avoid quality loss and to save time.
Take it down a notch. I’m trying to help you here.
See the links to LosslessCut that I added to my post above. It will do exactly what you want, with an interface more optimized than Shotcut since you won’t need all the editing bloat just for trimming.
I don’t understand what this means. If no changes were made, no trim was done, and the format isn’t changing… wouldn’t that be identical to the original file? I don’t understand what gets accomplished by this.
The sw you suggest is used to remove parts of the movie. Not what I need.
I have serious hearing problems and I often have to work on the audio of the movies to raise the levels. Shortcut has a good audio part, with comfortable VU meters and a good set of filters. It would be very useful for me to be able to process the audio and then export without recompressing the video. Don’t you want to do it? Ok. Do you have a sw to recommend?
That’s a great use case.
One option is to bring the movie into Shotcut and use its filters and meters to improve the audio to your taste.
Then export just the audio to a new file. Since this is movie-based, the audio format is probably AC-3 at 448kbps. There is an export preset for this. Or you can customize your own and check the “Disable video” checkbox on the codec tab of Advanced Export. The export will be very fast since no video is encoded.
Then use AVIdemux (a separate program) to replace the source video’s audio track with the new audio file exported from Shotcut. This operation is called a “remux”, because it swaps streams around without actually re-encoding them.
Yes, it’s a separate tool and an extra step. But none of the remux tools I’m aware of have the advanced suite of audio filters and meters that Shotcut offers. So this is the best of both worlds.
If you want a command-line alternative to speed up your workflow, FFmpeg can do this as well. A template command can be found here:
There is a list of the commands?
I’m not following where that list came from. Those are video encoding flags, but the whole point here is to not re-encode video. What tool made that list?
Here are a couple of AVIdemux walk-thrus for swapping audio tracks:
Audio exported from Shotcut in aac format does not work with Avidemux.
With ffmpeg in terminal works fine. (install ffmpeg on M1 Mac is a circus…)
Avidemux doesn’t support audio-only MP4 files, it expects ADTS- or LATM-encapsulated AAC streams as an external audio track. It exports AAC in an ADTS envelope (as AAC is useless without extradata and extradata is not a part of the stream).
Other than “raw” (ADTS-encapsulated) AAC, Avidemux supports WAV (16 and 24-bit), MP2, MP3, AC3, E-AC3 ans DTS. Max. # of channels: 8.
Does this mean a workflow exists that meets your needs? Or do we need to try a different tool?
There are many reasons I recommended an AC-3 export out of Shotcut rather than AAC.
Another option is to export WAV (or anything else you want) out of Shotcut and remux the video to MKV rather than MP4. Then you aren’t stuck with the format limitations of MP4.
I’m not opposed to this passthrough idea, if it can be added to Shotcut as a preset, using the ffmpeg concat command without heavy modifications of the code. But the preset should be enabled only if files are exactly the same size and codecs.
For the time being, I do that with Avidemux, if the clips have to be cut, or with ffmpeg, when I don’t need to cut the parts: I even wrote a small interface that allows me to drop the video or audio clip files into a listbox, then just click to join them with the appropriate ffmeg command, which my software remembers so much easier than me…
What I would also appreciate would be the ability to edit the video and audio streams separately to fix synchronization issues in existing videos and output the whole without re-encoding, but I guess that would take a lot of work for not much, as you can already export (with re-encoding) only the edited audio and remux with MKVToolnix. But this is a dream, not a request…
One solution would be to add a terminal window to the program where you can directly enter the ffmpeg commands. Obviously the commands entered in this window must be at a higher level than those of the settings. So if you enter ‘-c:v copy’ you have the video passtrough, while if you enter ‘-c:a copy’ you have the audio passtrough.
That does not work because Shotcut is not simply a ffmpeg command line front end except in the special case of Properties > Convert. Shotcut uses a layer of software between its UI and FFmpeg, which we call the engine, which is MLT. MLT uses more than just FFmpeg. If you want to use ffmpeg command line utility - there is one bundled with Shotcut - you can simply open a terminal window from your operating system. But FFmpeg cannot read Shotcut project files.
I surrender … I will use many other sw, as recommended by you several times.
Why use only one sw when you can use three?
1 - AviDemux for video (which has both video and audio pass through, crazy)
2 - Audacity for audio
3 - MacOS Terminal with ffmpeg for mux audio and video together
For the same reason that I have a separate lathe, milling machine, and drill press. Yes, there are “3-in-1” machines that can “do it all!” But the compromises and complexities that arise in trying to do everything in one machine generally leads to significantly greater frustration and significantly less capability than three separate machines.
This post was flagged by the community and is temporarily hidden.