carykh / jumpcutter

Automatically edits vidx. Explanation here: https://www.youtube.com/watch?v=DQ8orIurGxw
MIT License
3.07k stars 544 forks source link

CARYKH PLEASE NOMINATE SOMEONE TO BE A PROJECT MANAGER #148

Open DaWe35 opened 4 years ago

DaWe35 commented 4 years ago

I see you have no time, but @carykh please nominate someone to be a project manager! This is an awesome stuff, need to be improved and updated.

Lamaun commented 4 years ago

We are missing good quality improvements as you can see in the mentioned issue. And merging all these good pull requests will not get easier if we keep it like this.

We should decide how to deal with this situation. Maybe we should decide on a fork and try to get all the authors to create their pull request on that fork.

When @carykh returns he will idealy only merge that one fork and will face next to no merge conflicts.

I looked through some of the active forks with this tool: https://techgaun.github.io/active-forks/index.html#carykh/jumpcutter Sadly it doesn't show the forks of forks, but these aren't very numerous.

Here is a list of everyone who has committed some code in some fork in the last 3 months and all repos with at least 2 stars: @Dr4ik,@mrbesen,@jappeace @petermg,@Xetera,@logwet,@torsrex,@mrbesen

If one of you has the time and motivation to review and merge some pull requests into your fork please comment below. If some other person is interested: feel free to comment.

I would suggest that we then upvote comments of volunteers and in one month check if the volunteer accepted the vote. We can then create issues, comments and pull requests urging the community to move too that maintained fork instead.

Lamaun commented 4 years ago

I know my fork isn't the best code quality-wise but some time ago I already merged some of the most promising forks. In my opinion it is important to use the approach @torsrex used, as it processes the videos much faster (with the cost of added RAM usage)

I volunteer to maintain the fork

logwet commented 4 years ago

I believe it'd be easiest to ask @carykh to transfer ownership of the repo to someone else or potentially a GitHub Org rather than continuing the project off a fork and convincing everyone to file their PRs again.

mrbesen commented 4 years ago

first: I feel honored to be mentioned here. second: I could - from time to time - merge some PR but i have some other Projects to work on. I would not use my fork, because its quite old and has only some small changes.

logwet commented 4 years ago

Cary hasn't been active on GitHub since May. Is there another way of reliably contacting him?

petermg commented 4 years ago

This is interesting. What method does he use to process the videos faster? I use this thing almost daily. In mine I did the following:

  1. the correct frame rate is now automatically detected, no need to specify it anymore. I added 2 methods so if one fails the other would kick in but this is probably overkill on my part.
  2. now you can pass custom encoding commands to ffmpeg, for example for nvenc encoding and decoding, or pretty must any other ffmpeg variable and option, via "--extra"
  3. 48kHz is now the default audio frequency instead of 44.1
  4. I modified the error message about no input file. I think that's all I did. I don't know python, it took me like 2 weeks to figure this out. I'm posting this here because I don't see a description of the differences on my fork but I did mention them think on the original github page.

On Sat, Feb 8, 2020 at 6:44 AM Lamaun notifications@github.com wrote:

I know my fork isn't the best code quality-wise but some time ago I already merged some of the most promising forks. In my opinion it is important to use the approach @torsrex https://github.com/torsrex used, as it processes the videos much faster (with the cost of added RAM usage)

I volunteer to maintain the fork

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/carykh/jumpcutter/issues/148?email_source=notifications&email_token=AE6NOTICJC64WHHYALI7LQTRB3AM7A5CNFSM4J27VBVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFTI7Y#issuecomment-583742591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6NOTMLJWCLVIUJHZDPAQ3RB3AM7ANCNFSM4J27VBVA .

Lamaun commented 4 years ago

@petermg The speedup comes from using python arrays in the construction of the outputAudioData instead of numpy arrays https://github.com/torsrex/jumpcutter/commit/bbe9defa01eb3c2b565b9c97d66686126c2ef5cb#diff-bfa1b038f928612f2ce15ca53e2730b3R172

I compared our projects like this:

cd /tmp
git clone https://github.com/carykh/jumpcutter.git carykh
git clone https://github.com/torsrex/jumpcutter.git torsrex
git clone https://github.com/lamaun/jumpcutter.git lamaun
git clone https://github.com/petermg/jumpcutter.git petermg
youtube-dl https://www.youtube.com/watch?v=DQ8orIurGxw -o download
ffmpeg -i download.* -c:v h264_nvenc wow.mp4
rm download.*
(time python3 carykh/jumpcutter.py --input_file wow.mp4 --sounded_speed 1.7 --silent_speed 8) 2>&1 | tail -3 
ls -la wow_ALTERED.mp4
rm  wow_ALTERED.mp4
(time python3 torsrex/jumpcutter.py --input_file wow.mp4 --sounded_speed 1.7 --silent_speed 8) 2>&1 | tail -3 
ls -la wow_ALTERED.mp4
rm  wow_ALTERED.mp4
(time python3 lamaun/jumpcutter.py --input_file wow.mp4 --sounded_speed 1.7 --silent_speed 8) 2>&1 | tail -3 
ls -la wow_ALTERED.mp4
rm  wow_ALTERED.mp4
(time python3 petermg/jumpcutter.py --input_file wow.mp4 --sounded_speed 1.7 --silent_speed 8 --extra "-c:v h264_nvenc" ) 2>&1 | tail -3 
ls -la wow_ALTERED.mp4
rm  wow_ALTERED.mp4

You can just plugin some youtube links there. I used https://www.youtube.com/watch?v=kcs82HnguGc first and all projects needed similar time. (carykh was fastest) For the longer video https://www.youtube.com/watch?v=DQ8orIurGxw the output was

real    7m1,190s
user    32m4,275s
sys 0m32,339s
-rw-r--r-- 1 lamaun lamaun 141775035 Feb  9 10:49 wow_ALTERED.mp4
real    6m29,875s
user    32m1,407s
sys 0m11,467s
-rw-r--r-- 1 lamaun lamaun 140828499 Feb  9 10:56 wow_ALTERED.mp4
real    6m22,684s
user    31m37,368s
sys 0m11,908s
-rw-r--r-- 1 lamaun lamaun 140828499 Feb  9 11:02 wow_ALTERED.mp4
real    5m6,219s
user    10m50,462s
sys 0m9,771s
-rw-r--r-- 1 lamaun lamaun 134306760 Feb  9 11:09 wow_ALTERED.mp4

As we see @petermg needs much less user time and also finishes first. The best thing here is, that the approaches can be combined (another thing we would have noticed if this project was more actively managed)

Lamaun commented 4 years ago

@petermg what arguments do you use with your extras option. In my experience h264_nvenc leads to the biggest speedup.

Lamaun commented 4 years ago

I believe it'd be easiest to ask @carykh to transfer ownership of the repo to someone else or potentially a GitHub Org rather than continuing the project off a fork and convincing everyone to file their PRs again.

Well than we could still use this issue to give carykh the information who would maintain this project. But if he doesn't react to any of these request we will have to use a fork.

We can try his twitter, the email given on htwins.net and maybe the discord. But I think we should contact him after the vote.

petermg commented 4 years ago

Wow mine's fastest huh? How cool! Not really sure how that happened. The extra options I have been using are: --extra "-hwaccel auto -c:v h264_nvenc -b:a 256k -preset slow -b:v 25M" As you can see yes I've using GPU encoding, this was my entire motivation for opening up being able to pass extra commands to ffmpeg. However I've also recently been using --extra "-c:v hevc_nvenc -rc constqp -qp 24 -b:v 0K -c:a aac -b:a 384k" Which is also fast, using the GPU, but produces a much smaller file with HEVC encoding. So this way users can not add the GPU encoding option with jumpcutter if they want.

On Sun, Feb 9, 2020 at 2:21 AM Lamaun notifications@github.com wrote:

@petermg https://github.com/petermg what arguments do you use with your extras option. In my experience h264_nvenc leads to the biggest speedup.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/carykh/jumpcutter/issues/148?email_source=notifications&email_token=AE6NOTJXOV3DSSUOP5L3GCLRB7KIZA5CNFSM4J27VBVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGIGVA#issuecomment-583828308, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6NOTNLDBKUSCW3F24UQC3RB7KIZANCNFSM4J27VBVA .

logwet commented 4 years ago

I did some reading to figure out if the video splicing and speedup could be performed in ffmpeg. The goal is to avoid extracting the video into several thousand individual frames (takes a LOT of disc space for larger videos), and to avoid the audio going out of sync with the video (sometimes happens with the OG jumpcutter). I believe such an approach would be easy to parallelize.

ffmpeg -i input-video-file.mp4 -ss [start timestamp in seconds] -to [end timestamp] -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" output-video-file.mp4

Although I haven't tested it yet, the above command should theoretically do a 2x speedup for both video and audio for a given time interval. There are a few problems though:

jappeace commented 4 years ago

@Lamaun I made an alternative project that uses a different methodology: https://github.com/jappeace/cut-the-crap

I'm doing what @logwet suggested. I'm skipping that export frames step and use ffmpeg directly to detect silences, cut and paste segments.

If you're only interested in cutting silences it's really good. If you need to figure out the spells for ffmpeg and backport it into this python project you could also look at my project.

mrbesen commented 4 years ago
* I believe the "resolution" of the splicing is limited to 1 second intervals, at the very least it may be difficult to splice by frame.

Thats thankfully not quite correct, ffmpeg supports time stamps in this formats https://www.mankier.com/1/ffmpeg-utils#Syntax-Time_duration So giving it split seconds is no problem. The only problem you might have is, that ffmpeg have troubles seeking that exact moment and approximate the nearest timestamp (source). I belive that results in some jittering of the video and audio. but if you carefully choose the values that should not be a problem.

And with some dirty Hacks you might be able to fix those with extracting and reinserting the frames in the edge cases. (Which may be done in the same command)

And you should be able to do this for more than one segment in one command. by defining the same output more than once and concatinating them with complex filters: This Example should take a Video called input.mp4 and take the first halfsecond and make its speed x2, than it should concatinate the following half second in normal speed ffmpeg -ss 0 -to 0.5 input.mp4 -ss 0.5 -to 1 input.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v0];[0:a]atempo=2.0[a0],[v0][a0][1:v:0][1:a:0]concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" out.mp4 (i have no idea if that works)

logwet commented 4 years ago

I think discussion on optimisation through ffmpeg splicing and speed up is off topic for this particular issue and should be moved to a new issue.


From: MrBesen notifications@github.com Sent: Wednesday, February 12, 2020 9:46:06 PM To: carykh/jumpcutter jumpcutter@noreply.github.com Cc: logwet sachila.herath@outlook.com; Mention mention@noreply.github.com Subject: Re: [carykh/jumpcutter] CARYKH PLEASE NOMINATE SOMEONE TO BE A PROJECT MANAGER (#148)

Thats thankfully not quite correct, ffmpeg supports time stamps in this formats https://www.mankier.com/1/ffmpeg-utils#Syntax-Time_duration So giving it split seconds is no problem. The only problem you might have is, that ffmpeg may have troubles seeking that exact moment and may approximate the nearest timestamp sourcehttps://www.mankier.com/1/ffmpeg#-ss. I belive that may result in some jittering of the video and audio. but if you carefully choose the values that should not be a problem.

And with some dirty Hacks you might be able to fix those with extracting and reinserting the frames in the edge cases. (Which may be done in the same command)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/carykh/jumpcutter/issues/148?email_source=notifications&email_token=ACRBN3AYEUVZYNVW7PXTTBDRCPHO5A5CNFSM4J27VBVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQJZ4I#issuecomment-585145585, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACRBN3GOFHRZEM4CJJ6Y27DRCPHO5ANCNFSM4J27VBVA.

mrbesen commented 4 years ago

Agreed

Lamaun commented 4 years ago

Well I guess the voting is over? Sadly it is not very conclusive.

Only @mrbesen and me(@Lamaun) stated that they would have the time to maintain this project.

I think going with the github org idea is the best choice here. I will try to contact @carykh now.

carykh commented 4 years ago

Hi everyone, sorry I have been inactive on GitHub for so long. I'll try to answer questions and sort everything out in the near future, but I do agree it would be smart to have someone more responsive manage this project. How would I go about doing that?

logwet commented 4 years ago

@carykh In my option the best solution would be to:

This would:

I believe creating a org is superior to transferring ownership to a specific person because:

If you don't mind, I can create this Org on your behalf.

mrbesen commented 4 years ago

ok, go on then. Create the org, invite us and @carykh pls transfer ownership of this repo.

Dreiparrent commented 4 years ago

Hey all!

Peter and I have taken on running jumpcutter. Peter knows Cary personally and I'm in contact with him too! We actually have a discord for this project that Cary is in, it would be awesome if the discussion continues here. We'll put together an explanation of where jumpcutter is going on the discord soon! (It's pretty cool to be honest). We are also looking for the community support to help us build out all of our ideas. So come join us

mmtftr commented 4 years ago

The discord invite has expired can you make the invite have no timeout please?

Hey all!

Peter and I have taken on running jumpcutter. Peter knows Cary personally and I'm in contact with him too! We actually have a discord for this project that Cary is in, it would be awesome if the discussion continues here. We'll put together an explanation of where jumpcutter is going on the discord soon! (It's pretty cool to be honest). We are also looking for the community support to help us build out all of our ideas. So come join us

Dreiparrent commented 4 years ago

Here is a link that does not expire:

https://discord.gg/2snkzhy

Hans5958 commented 3 years ago

Too bad that the new version is now proprietary. Here's for the best, I guess.

igavronski commented 3 years ago

I highly recommend the WyattBlue/auto-editor instead. Much faster and easier to install!