Coder Social home page Coder Social logo

Comments (6)

 avatar commented on May 29, 2024 4

I'm sure the userbase of MPV already knows about and many if not most also already have ffmpeg, I myself have the ffmpeg binary in the same location as MPV, is there a way your script can just use MPV to set things up (crop, start - stop time and so on) and then just turn all that over to ffmpeg to get the "copy" file?

Avidemux does copy and is extremely fast (and no artifacts if you cut at keyframes) but being able to do all that in MPV would save so much time (for example, "copying" something out of a 2 hour stream using ytdl and mpv is a lot faster than first downloading the entire 2hr video just to open it in Avidemux to cut 1 minute clip out of).

from mpv-webm.

ekisu avatar ekisu commented on May 29, 2024 1

Probably a duplicate of #8.

mpv does not support copy codecs, and as so, copying without encoding can't be done (well, unless you want to use the ffmpeg branch).

from mpv-webm.

averms avatar averms commented on May 29, 2024

is there a way your script can just use MPV to set things up (crop, start - stop time and so on) and then just turn all that over to ffmpeg to get the "copy" file?

If you don't care about cutting streaming video then use lossless-cut. Even if you do care about cutting streaming video I would advise you to open an issue on their repo, as your issue doesn't really have an elegant solution on the mpv side AFAIK.

This is because the ydl:// "files" are streamed using a hook written in Lua. They can't be passed on to ffmpeg in an encoded format. We can only get them in decoded format. A possible solution is to use youtube-dl -g as an input to ffmpeg, but that will redownload all the way to part you want to cut, which again makes it not much better than using lossless-cut.

from mpv-webm.

Asinin3 avatar Asinin3 commented on May 29, 2024

I realize there's other software to do this. The reason for suggesting it here in a MPV plugin is that its more convenient, quite often I'll be watching something then see a funny scene and just want to make a quick clip out of it. Much faster to do that within MPV which was already open, and already at the timeframe i need to cut around.

If you're not going to implement it then that's okay just close the ticket :/

from mpv-webm.

 avatar commented on May 29, 2024

If you don't care about cutting streaming video then use lossless-cut.

Well, using that is the same as using Avidemux, and defeats the purpose (and practical convenience) of trimming a clip in MPV without re-compressing

This is because the ydl:// "files" are streamed using a hook written in Lua. They can't be passed on to ffmpeg in an encoded format. We can only get them in decoded format. A possible solution is to use youtube-dl -g as an input to ffmpeg, but that will redownload all the way to part you want to cut, which again makes it not much better than using lossless-cut.

When you download something with yt-dl and quit the download after a couple of second, even the .part file can be opened and read as proper video.

There's also:
https://mpv.io/manual/master/#options-stream-record

Write received/read data from the demuxer to the given output file. The output file will always be overwritten without asking. The output format is determined by the extension of the output file.

And:
https://mpv.io/manual/master/#command-interface-dump-cache
https://mpv.io/manual/master/#demuxer

Since MPV using yt-dl is downloading the file regardless, the only thing is that it gets rid of it afterwards, which you can prevent.
All of this can of course just be an option for the user to enable in the config file for the script, and doesn't have to be forced on everyone by default.

from mpv-webm.

 avatar commented on May 29, 2024

Maybe something like this is also interesting:
image

https://desuarchive.org/g/thread/80465497/#80506211
or:
image

https://gitlab.com/lvml/mpv-plugin-excerpt
or:
image

https://github.com/occivink/mpv-scripts#encodelua

from mpv-webm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.