Author Topic: "LosslessCut" Video Trimmer  (Read 727 times)

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 919
  • 550D
"LosslessCut" Video Trimmer
« 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)

https://github.com/mifi/lossless-cut
"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.

Jonit

  • New to the forum
  • *
  • Posts: 35
  • EOS M | 700D
Re: "LosslessCut" Video Trimmer
« Reply #1 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!

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 919
  • 550D
Re: "LosslessCut" Video Trimmer
« Reply #2 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.

IDA_ML

  • Hero Member
  • *****
  • Posts: 604
Re: "LosslessCut" Video Trimmer
« Reply #3 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.

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 919
  • 550D
Re: "LosslessCut" Video Trimmer
« Reply #4 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.

Wlee2060

  • Just arrived
  • *
  • Posts: 1
Re: "LosslessCut" Video Trimmer
« Reply #5 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.

kitor

  • Contributor
  • Member
  • *****
  • Posts: 125
Re: "LosslessCut" Video Trimmer
« Reply #6 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: https://trac.ffmpeg.org/wiki/Concatenate

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): https://superuser.com/questions/1137612/ffmpeg-replace-audio-in-video (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.
EOS R