Comments (6)
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.
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.
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.
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.
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 useyoutube-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 usinglossless-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.
Maybe something like this is also interesting:
https://desuarchive.org/g/thread/80465497/#80506211
or:
https://gitlab.com/lvml/mpv-plugin-excerpt
or:
https://github.com/occivink/mpv-scripts#encodelua
from mpv-webm.
Related Issues (20)
- Crop error on videos containing landscape-rotated iOS screen recordings HOT 1
- [Request] Encode speed option HOT 2
- the player freezes when using sub-scale in combinations of keys together with sub-ass-override
- coding error when displaying progress (revision of the installation instructions)
- [Request] Apply GLSL shaders to output
- Slightly off colors in generated webm
- %04n output_template naming HOT 1
- [Request] Update the FFMPEG branch to contain the new features
- mpv-webm with mpv.net: `Command failed! Reason: init` HOT 3
- webm conversion fails when going from 4:2:2 to 4:2:0 subsampling
- There are no subtitles in the generated GIF
- Encode fails in GIF format HOT 3
- Lua error: <eof> expected near 'mp' HOT 3
- srt subtitle style
- active fork or alternative HOT 1
- Subtitles are missing when watching the preview
- Feature Request: Automatic log cleanup and/or set log directory.
- Encode fails if source video file is located on a NAS and display_progress=yes
- Encode fails when MP4 or MP3 codes are selected on MacOS HOT 1
- Getting error: "AVFilterGraph: No such filter: 'fifo'" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv-webm.