Magic Lantern Forum

Using Magic Lantern => Post-processing Workflow => Topic started by: ItsMeLenny on February 23, 2019, 02:36:59 PM

Title: "LosslessCut" Video Trimmer
Post by: ItsMeLenny on February 23, 2019, 02:36:59 PM
Just came across this! Been wanting something like this for a long time.
(I have not yet tried it myself)
"Save space by quickly and losslessly trimming video and audio files"

This is not an advertisement, I just found it and thought I definitely need to share.
It runs off ffmpeg, and I was actually unaware ffmpeg had such a cutting capability.

Anyway, hopefully this means no more re-encoding a lot of videos for me.
Title: Re: "LosslessCut" Video Trimmer
Post by: Jonit on February 24, 2019, 12:00:42 AM
Thanks a lot for this!!!
I was looking for some app like this in the past and only found some paid programs which could do that. This is awesome free alternative!
Title: Re: "LosslessCut" Video Trimmer
Post by: ItsMeLenny on February 24, 2019, 01:36:21 AM
Unfortunately it doesn't seem to do my MOV clips from my 550D, they play in it though.
I think the playing is done through chromium, then the muxing is done in ffmpeg.
I'll have to play with it a bit to see if I can get it to work, plus i have to try it on some other clips as well.
Title: Re: "LosslessCut" Video Trimmer
Post by: IDA_ML on February 24, 2019, 07:55:24 AM
Doesn't work with ProRes files from MLVApp, unfortunately.  So, it will be of limited use.  But, with MPEG4 files, it is pretty fast.  Thanks, Lenny.
Title: Re: "LosslessCut" Video Trimmer
Post by: ItsMeLenny on February 25, 2019, 06:15:33 AM
I did find it worked with my brothers EOSM mp4s,
but as far as the movs from my 550D, turns out it doesnt like the audio,
so it will only cut and export if i select it to export with no audio.
Title: Re: "LosslessCut" Video Trimmer
Post by: Wlee2060 on April 10, 2019, 12:44:45 PM
Thanks for this. I'd like to try it. Before this, I used Joyoshare Media Cutter to cut videos and audios losslessly. It works good, but its trial version only allows me to cut the video for 5 times. I need to buy it in order to use it for unlimited times, but i have low budgets.
Title: Re: "LosslessCut" Video Trimmer
Post by: kitor on April 10, 2019, 07:09:11 PM
You can achieve that using ffmpeg.

Code: [Select]
ffmpeg -i file.mp4 -ss 02:11:34 -t 00:30:00 -acodec copy -vcodec copy out.mp4not only for mp4, it should also work if you output to different container type (flv, mov) as long as it supports used codec.

Merging multiple files with same container and codec without reencoding is also possible:

Fixing out of sync audio, etc, no problem, one of many possible solutions
Code: [Select]
ffmpeg -i d1.m4v -itsoffset 0.5 -i d1.mp4 -vcodec copy -acodec copy sesjad2.mp4
Replace audio without re encoding video (eg after denoising in audacity, or making it louder): (i'd like to encode fixed audio with same codec params as source, but this is not always needed)
Code: [Select]
ffmpeg -i v.mp4 -i a.wav -c:v copy -map 0:v:0 -map 1:a:0 new.mp4
and much more. Of course no GUI, also remember that you need to round cut to keyframes or you'll get a few black ones at start.
We used those methods to quickly cut, fix, and sync video/audio on OBS recordings from conferences that I live streamed.