Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Lossless-cut
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Tue Jan 29, 2019 4:47 pm    Post subject: Lossless-cut Reply with quote

I found this: https://github.com/mifi/lossless-cut
Which is 95% of the time the only video editor I need. Although I've been using shotcut lately, and it's awesome.

The problem is, its intended install method pulls some version X of ffmpeg binaries.
It's a nodejs "app". And it seems to require electron too.

Now... Before I completely lose my mind and start creating an ebuild for it...
Does anyone know any similar video cutting/merging tool, that does it losslessly.
I assume this does it by stream copying. I've done it via cli ffmpeg before, but a gui for the task would really help.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Tue Jan 29, 2019 4:51 pm    Post subject: Reply with quote

I've always used Avidemux, you don't like it for some reason?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Tue Jan 29, 2019 5:01 pm    Post subject: Reply with quote

It's little more than what I'm looking for. Although it might be the tool I need.
It seems not to use ffmpeg under the hood, but is a standalone program. :o

Can it perform stream copy in place of encoding when exporting?
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Tue Jan 29, 2019 5:56 pm    Post subject: Reply with quote

It uses bundled ffmpeg. Set audio and video to "copy" and there will be no recoding. I use it to cut out commercials from TV recordings, can't wish for anything better.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Tue Jan 29, 2019 6:19 pm    Post subject: Reply with quote

Jaglover wrote:
It uses bundled ffmpeg.
:evil:

But i guess it's better than having nodejs and electron as depencies.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Proinsias
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2014
Posts: 113
Location: Scotland

PostPosted: Tue Jan 29, 2019 6:35 pm    Post subject: Reply with quote

For quickly trimming video I use a few scripts with mpv. There's an encode_slice option which just snips, with ffmpeg, and doesn't encode. It also allows cropping, audio removal n other stuff.

It is not a fully featured solution but it means I can trim video from within my preffered media player and don't have to deal with ffmpeg on the cli. Can't say I've enjoyed working with video editors on linux, this is a breath of fresh air.
https://github.com/occivink/mpv-scripts
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Tue Jan 29, 2019 6:54 pm    Post subject: Reply with quote

^ This sounds more like it!
I'm already a BIG fan of mpv, so this might be exactly what I need.

EDIT: D'oh. Didn't this this beforehand, but obviously it cannot merge two similar clips. But hey, the ability to extract a clip from a longer video is my most needed feature.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Tue Jan 29, 2019 7:25 pm    Post subject: Reply with quote

Well, you could use dd to cut pieces from video. The drawback is dd knows nothing about keyframes and you can't start a clip without keyframe.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Wed Jan 30, 2019 12:11 am    Post subject: Reply with quote

Jaglover wrote:
Well, you could use dd to cut pieces from video. The drawback is dd knows nothing about keyframes and you can't start a clip without keyframe.
Yeah. Tell me about it.
I've been (earlier) toying around with self made bash script which split the video in chuncks using ffmpeg stream copy.
Then earch chunk gets it's own ffmpeg process for encoding. Finally use ffmpeg to stream copy concatenate the files back together. There was still some serious issues with keyframes. Although during the ecoding part, it might be possible to specify keyframes much better than waht I did.
All in all, I did it back then because I had some problems with few codecs to get properly running with multiple threads.

It's not that relevant today anymore, but might speed up some encodings. :P

Anyway. I've done video splitting with ffmpeg using that stream copy. It's almost the same as using dd, but "safer".
And I think that's what the lossless-cut does under the hood (or rather under heaps of javascript).
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Wed Jan 30, 2019 12:27 am    Post subject: Reply with quote

Still, what's wrong with Avidemux? It stops on keyframes and does not re-encode anything unless you really want to. I'm a CLI freak myself, but when working with video I'd like to see what I'm doing. You can use it from CLI if you want to, you can even build it without GUI.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Wed Jan 30, 2019 5:57 pm    Post subject: Reply with quote

Jaglover wrote:
Still, what's wrong with Avidemux?
I have it installed already.
But it does not fit my needs very well. Although its UI is simple and I like it.
Few problems found
  • Video plsyback from my mobile phone is very slow (maybe I need to adjust frame dropping?).
  • The lack of support for lossless codecs.
I know my ffmpeg can handle those. I need to check if it's possible to compile avidemux with system-ffmpeg.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Wed Jan 30, 2019 10:41 pm    Post subject: Reply with quote

thank you for this thread and ideas. i've been playing with videos on my phone.. and was a bit lost about editing them. now i have something to start.
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Wed Jan 30, 2019 11:12 pm    Post subject: Reply with quote

I could push lossless-cut to my overlay for others to test.
I'll do it if I can force it to use system-ffmpeg. Also I'll see if the same is possible for avidemux.

At the moment I have lots going on with my life, but I try to get something out on the weekend.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1655
Location: United Kingdom

PostPosted: Wed Jan 30, 2019 11:24 pm    Post subject: Reply with quote

I hadn't heard of lossless-cut before you created this thread. Looks like an interesting application. If you do create an ebuild, I'll give it a try as I'm keen to try something new.
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Sat Feb 09, 2019 10:54 pm    Post subject: Reply with quote

I just had first time to propely look into this lossless-cut. My time has been consumed by our dog. He went trough a quite a big operation so I've been "babysitting" him.

Anyways. I've once again learned something: I hate nodejs.
The depency mess with nodejs programs is unbelievable. I've found one possible solution: https://github.com/geaaru/node-ebuilder but I'm not liking it.
Before I dive in to the deepest bog, I'll try to make avidemux to use (local) system-ffmpeg.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Sat Feb 09, 2019 11:26 pm    Post subject: Reply with quote

Avidemux has forums, their devs actually do listen to users, you may try your luck there.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Sun Feb 10, 2019 2:58 am    Post subject: Reply with quote

Maybe openshot is your cup of tea? Also more than you need but it does use the system ffmpeg.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Sun Feb 10, 2019 11:16 am    Post subject: Reply with quote

The Doctor wrote:
Maybe openshot is your cup of tea?
Way too unstable. I have installed Shotcut for my more serious editing needs.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Sun Feb 10, 2019 2:29 pm    Post subject: Reply with quote

Looks like avidemux uses a bunch of patches against the ffmpeg they ship: https://github.com/mean00/avidemux2/tree/master/avidemux_core/ffmpeg_package/patches

Meybe I'll start looking at other programs. :D
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Wed Feb 13, 2019 8:47 am    Post subject: About to solve this! Reply with quote

Progress!
Currently perfectly working solution: vidcutter.
Things I like about it:
  • fast - seems to use stream copy and can be set to cut video on keyframes
  • uses system installed ffmpeg, libmediainfo and mpv
  • requires very little tweaking to create an ebuild for it.


Those who are interested can install it via my overlay: https://github.com/Zuccace/zucca-overlay
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum