Skip to content

Support fast-copy mode with FFmpeg instead of only Mkvmerge #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
raj6996 opened this issue Sep 13, 2018 · 9 comments
Closed

Support fast-copy mode with FFmpeg instead of only Mkvmerge #77

raj6996 opened this issue Sep 13, 2018 · 9 comments
Assignees
Milestone

Comments

@raj6996
Copy link

raj6996 commented Sep 13, 2018

Bug/Issue Description:
Mkvmerge works great, but output files are .mkv instead of mp4.
As Vegas software is not works on mkv. so I need to re-encode to mp4 from mkv,
I replace ffmpeg.exe with mkvmerge on scenedetect, but it give me this.

Error: Invalid value for split-video: mkvmerge is required for split-video -c/--copy.
Install the above tool to enable video splitting support.
Is there anyway to copy option with ffmpeg, I don't need to re-encode!

Computing Environment:

  • OS: 64bit Win10 Pro
  • Python Version: 64bit 3.7.0
  • OpenCV Version: Latest
@Breakthrough
Copy link
Owner

Breakthrough commented Sep 14, 2018

This is a good idea, and I definitely want it implemented - I'm just not sure the best way to resolve the discrepancy of when you have both tools installed, which one should be used. I could allow specifying the file extension for the video name and using that, but that feels inelegant.

I think the best way to solve this is to have a settings file of some kind, and maybe have a command line option to set which program will be used (e.g. scenedetect set copy_program ffmpeg).

Another option is to always default to ffmpeg, and have another command line switch to select a particular program. Not sure which is the best option yet.

EDIT: This is now possible by setting the -a/--override-args option with the split-video command, e.g.:

split-video -a "-c:v copy -c:a aac"

@raj6996
Copy link
Author

raj6996 commented Sep 14, 2018

scenedetect -i "G:\M\M\Mno.mp4" -o "G:\MGPM\2" detect-content split-video --copy
Original file was .mkv, then I converted it to MP4 with copy option of ffmpeg. Then I ran upper command, I removed mkvmerge.exe file from scenedetect folder, and inserted latest ffmpeg.exe into that folder. Finally i got that error. Hope take a look into it.
By the way. I converted all splitted mkv files to mp4 with batch process. more improved and better and faster detection than previous version beta version. Thanks

@anujtyagi2802
Copy link

scenedetect -i video.mp4 -s video.stats.csv detect-content list-scenes -n gives syntax error

@Breakthrough
Copy link
Owner

Hi @anujtyagi2802;

Would you be able to submit a new issue report for that, or is it related to #77? Could you share the console output as well as the debug output to help investigate the error you're having?

Thank you!

@Breakthrough Breakthrough added this to the v0.6 milestone Sep 12, 2019
@Breakthrough Breakthrough self-assigned this Sep 12, 2019
@anujtyagi2802
Copy link

Screenshot from 2019-09-12 11-31-16

@Breakthrough
Copy link
Owner

Breakthrough commented Sep 13, 2019

Hi @anujtyagi2802;

See this page in the manual for an example on how to use the Python API. What you typed there is for the command line interface (CLI), not for a Python script or interactive environment. For that you need to use the SceneDetect API directly.

Thanks.

@Breakthrough Breakthrough removed this from the v0.6 milestone Jun 23, 2020
@Breakthrough Breakthrough changed the title Copy option is not works with FFMpeg Support fast-copy mode with FFmpeg instead of only Mkvmerge Jul 29, 2020
@Breakthrough
Copy link
Owner

This is now possible by setting the -a/--override-args option with the split-video command, e.g.:

split-video -a "-c:v copy -c:a flac"

@Breakthrough
Copy link
Owner

Breakthrough commented Nov 6, 2021

In v1.0, -c/--copy will now use ffmpeg, and added a separate option -m/--mkvmerge to use mkvmerge for splitting instead. This means that if ffmpeg is no longer available, the -c/--copy option will result in an error. Therefore any tools/scripts relying on the previous behaviour will need to replace -c with -m.

Breakthrough added a commit that referenced this issue Nov 6, 2021
ffmpeg instead of mkvmerge. #77, #236

Now -c implies -a "-c:v copy -c:a copy" to use ffmpeg stream copying.

Update video splitting documentation on download page.
@Breakthrough Breakthrough modified the milestones: v1.0, v0.6 Mar 13, 2022
@Breakthrough
Copy link
Owner

This is now available in the v0.6 beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants