GithubHelp home page GithubHelp logo

aerobounce / trim.lua Goto Github PK

View Code? Open in Web Editor NEW
88.0 5.0 8.0 79 KB

Trim mode for mpv — Turn mpv into Lossless Audio / Video Editor

License: GNU Affero General Public License v3.0

Lua 100.00%
mpv mpv-script lua lua-script ffmpeg video-processing lossless trim clip concat

trim.lua's People

Contributors

aerobounce avatar iiigerardoiii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

trim.lua's Issues

Use audio track selected by MPV

I have some files with multiple audio tracks, but this script only copies the first track over no matter what I have set in MPV.

Keyframe jumps several seconds

The keyframe shortcut doesn't jump from frame to frame, it jumps like 2 seconds, which is redundant with the "jump x seconds" shortcuts.

Option to re-encode audio

I use this script to create clips and avoid slow the video encoding process, this works especially well as all the videos I use it with are already compressed. Audio on the other-hand often comes in lossless formats which are very large, and compressing them down is fast and the quality loss can be almost unnoticeable.

Would love to see this script implement some basic options to re-encode the audio out to an AAC format. As I'm still utilizing ffmpeg commands to do trimming on videos with large audio (24-bit flac, LPCM etc)

Does not seem to work in a Windows environment

I have been trying all day to get this to work in Windows with mpv. ffmpeg is added to PATH. The trim.lua script is added to C:\Users\username\AppData\Roaming\mpv\scripts\. I am able to set the start and end time with the hotkeys as described in the readme, but once I close mpv with the Q key nothing really happens.

I tried to edit local args to match the location of my ffmpeg and ffprobe directory. So now it says "F:/portable/ffmpeg/bin",. Doesn't seem to help.

Any suggestions?

Option to remux on output

Please add the option to use different containers than what was used in the source file. I would like the option for MP4 and MKV added in particular.

Make `osascript` optional

Relevant codes

trim.lua/trim.lua

Lines 274 to 280 in 096a2b9

utils.subprocess({ args = {
"sh", "-c",
[[osascript <<EOL
display notification "Success ✅" with title "mpv: trim" sound name "Glass"
EOL]]
},
cancellable = false })

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.