Git Product home page Git Product logo

Comments (6)

familyfriendlymikey avatar familyfriendlymikey commented on May 26, 2024 1

mkv is just a different container, the cut will still be lossless. So it sounds like you should just add the code I sent you to your config.

You're welcome! Have a nice day :)

from mpv-cut.

familyfriendlymikey avatar familyfriendlymikey commented on May 26, 2024

Can you send a tiny sample video

from mpv-cut.

Touning avatar Touning commented on May 26, 2024

Thanks for your fast answer, Here is a small video in the same codec. Greets
https://we.tl/t-qvN0EwL6Ps

from mpv-cut.

familyfriendlymikey avatar familyfriendlymikey commented on May 26, 2024

So this is an issue with ffmpeg, I don't know why it fails to copy the stream to the mov container, but mkv works. So if you don't mind outputting mkv, then it'll work file. You'd just add this to your config.lua file:

ACTIONS.COPY = function(d)
	local args = {
		"ffmpeg",
		"-nostdin", "-y",
		"-loglevel", "error",
		"-ss", d.start_time,
		"-t", d.duration,
		"-i", d.inpath,
		"-c", "copy",
		"-map", "0",
		"-dn",
		"-avoid_negative_ts", "make_zero",
		utils.join_path(d.indir, "COPY_" .. d.channel .. "_" .. d.infile_noext .. "_FROM_" .. d.start_time_hms .. "_TO_" .. d.end_time_hms .. '.mkv')
	}
	mp.command_native_async({
		name = "subprocess",
		args = args,
		playback_only = false,
	}, function() print("Done") end)
end

If you don't want mkv output, you'll have to research why ffmpeg is failing with your footage. You could research some combination of ffmpeg blank output copy stream g5 10 bit hdr 4:2:2 and try to find an ffmpeg command that will work. Then if you do find a solution, you'd modify this copy action with the revised command.

from mpv-cut.

familyfriendlymikey avatar familyfriendlymikey commented on May 26, 2024

For example if you do ffmpeg -i video.MOV -c copy out.MOV, the result is still black.

It could also be something like our ffmpeg version. But I'll let you test all that :P

from mpv-cut.

Touning avatar Touning commented on May 26, 2024

Thank you very much for your help ! I don't know the mkv but if it doesnt change the quality of the video it could be great ! :D I'm gonna check as well if i can solve this thru ffmpeg. I will post here if i find something. Have a great day !

from mpv-cut.

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.