Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
capcut-export
Advanced tools
Changelog
1.0.1
Readme
This project is based on ffmpeg, which is a very well-known low-level tool for cross-platform video processing. Please manually install it and make ffmpeg
in your PATH
first.
Here's the running example:
pnpm i -g capcut-export # or npm/yarn
Then you got ccexp
command in you PATH
Usage: ccexp [options] <file> [output]
Export video clips from CapCut editor tracks, helps archive materials.
Arguments:
file CapCut/Jianying draft info json file.
output The output directory, default is cwd.
Options:
-V, --version output the version number
-p,--concurrent <number> The number of tasks processed in parallel, the default is number of CPU.
--offset <number> Expand the video clips' time range to both sides for about specified seconds, default is 2s.
--verbose To be verbose. (default: false)
-h, --help display help for command
ccexp /path/to/draft_info.json # output video clips into current directory.
ccexp /path/to/draft_info.json ./video # output into `./video` folder.
ccexp /path/to/draft_info.json --offset 5 # expand the time range of the segment by 5 seconds on each side.
ccexp /path/to/draft_info.json -p 1 --verbose # set the concurrency to 1 and show the verbose log, usually uses to debug.
Search for a draft info json file in your CapCut/Jianying project folder.
The file is called draft_info.json
and is located in
/Users/user/Movies/CapCut/User Data/Projects/com.lveditor.draft
The file is named draft_content.json
and the default location is:
C:\Users\user\AppData\Local\CapCut\User Data\Projects\com.lveditor.draft\
First, the tool will extract the start time, the duration of the clips, and the video path from the draft info file.
Then it use ffmpeg
to export specified clips, the command is like:
ffmpeg -ss 1 -t 3 -i /path/to/input.mp4 -c copy /path/to/output.mp4 -y
In the above command:
-ss
means the start time of video.-t
means the duration of the video clip.-c copy
means copy media steam without re-encoding, so it's a lossless and fast process and won't lose video quality.-y
means automatic confirmation when needed, used to override if a file of the same name exists.It means export a 3s' video clip to output.mp4 from 1s of input.mp4, and overwrite the output file if it already exists.
Sometimes when we finished video edit, there’ll be many clips in your editor track, and they usually comes from a single video. Anyway, we have a lot of video clips to export.
Assume that you want to archive the materials, how will you do? Just export one by one?
Actually most of editors don’t provide this functionality such as Jianying/CapCut, even if they do, the quality of the video will suffer after they re-encoded it.
So we need a lossless, fast, and simple way to manage to do it, this tool is made for this. It based on ffmpeg using stream copy without re-encoding, which won't lose quality.
In FFmpeg, when performing video editing or extracting, precision issues may arise due to two primary reasons:
Video Keyframes: FFmpeg uses the -ss
option to jump to a specific timestamp, and by default, it seeks to the nearest keyframe. A keyframe is a frame that can be fully decoded without the need for other frames. Normally, a video would have a keyframe every few seconds. If the timestamp you chose does not directly fall on a keyframe, FFmpeg will choose to start from the nearest keyframe before the chosen timestamp, which can cause precision issues.
The video's codec: Different video codecs and container formats support precise seeking to different extents. Some formats (such as MP4 and MKV) allow relatively accurate seeking, while others may not.
FAQs
Export video clips from CapCut editor tracks, helps archive materials.
The npm package capcut-export receives a total of 3 weekly downloads. As such, capcut-export popularity was classified as not popular.
We found that capcut-export demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.