이 도구는 Smart Media Cutter의 오픈 소스 CLI 동반자입니다.
smartcut
컷포인트 주변에서 최소한의 녹음만으로 다양한 형식과 코덱으로 비디오 파일을 잘라낼 수 있습니다("스마트 컷"이라고도 함).
즉, 긴 비디오 파일도 몇 초 만에 잘라낼 수 있다는 뜻입니다!
이와 대조적으로 Smart Media Cutter는 사용하기 쉬운 GUI, 스크립트 기반 편집(텍스트 문서와 같은 비디오 편집), 자동 무음 자르기, Resolve & Premiere와 같은 편집기로 타임라인 내보내기 및 넉넉한 무료 등급.
smartcut
절단 지점 주변만 녹화하여 원본 비디오 품질의 대부분을 보존합니다.릴리스에서 Windows 및 Linux용으로 빌드된 바이너리를 가져옵니다.
소스에서 설치하려면:
# Clone this repository:
git clone https://github.com/skeskinen/smartcut.git
cd smartcut
# Create python virtual environment:
python -m venv .venv
source .venv/bin/activate
# Install the required dependencies:
pip install -r requirements.txt
# Run:
python ./smartcut input.mp4 output.mp4 --keep 10,20,40,50
CLI에는 위치 인수로 입력 및 출력 파일 경로가 필요합니다. --keep
또는 --cut
옵션을 사용하여 유지하거나 잘라낼 세그먼트를 지정할 수 있습니다.
특정 세그먼트 유지 :
smartcut.exe input.mp4 output.mp4 --keep 10,20,40,50
이렇게 하면 세그먼트가 10대에서 20대, 40대에서 50대로 유지됩니다.
특정 세그먼트 잘라내기 :
smartcut.exe input.mp4 output.mp4 --cut 30,40,01:00,01:10
이렇게 하면 30초에서 40초, 1분에서 1분 10초 사이의 세그먼트가 잘라내어 나머지는 유지됩니다.
로그 수준 지정 :
smartcut.exe input.mp4 output.mp4 --keep 10,20 --log-level info
기본적으로 모든 오디오 트랙은 통과 코덱 설정에 포함됩니다. 필요한 경우 스크립트에서 AudioExportInfo
수정하여 조정할 수 있습니다.
기여를 환영합니다! 모든 코드는 MIT 라이선스에 따라 라이선스가 부여됩니다.
모든 변경 사항은 비공개 소스 GUI 앱에서도 작동해야 하므로 중요한 변경 사항을 적용하려면 저와 협의하시기 바랍니다. 대부분의 경우 디스코드에서 저를 찾으실 수 있습니다.
우리는 다양한 비디오 및 오디오 형식에 대한 테스트 범위를 갖추고 있습니다. 비디오 테스트에서는 픽셀 값이 변경되지 않았는지 확인합니다. 오디오 테스트에서는 출력이 입력과 동일한지 확인하는 것이 더 어렵지만, 입출력의 상관관계와 절대차를 확인하여 최선을 다합니다.
일부 테스트는 오픈 소스가 아닌 GUI 앱의 구성 요소에 따라 달라집니다. 이 테스트는 비활성화되어 있습니다.
일반적인 테스트 실행은 다음과 같습니다.
Skipping smc tests
test_h264_cut_on_keyframes: PASS
test_h264_smart_cut: PASS
test_h264_24_fps_long: PASS
test_h264_1080p: PASS
test_h264_multiple_cuts: PASS
test_h264_profile_baseline: PASS
test_h264_profile_main: PASS
test_h264_profile_high: PASS
test_h264_profile_high10: PASS
test_h264_profile_high422: PASS
test_h264_profile_high444: PASS
test_mp4_cut_on_keyframe: PASS
test_mp4_smart_cut: PASS
test_mp4_to_mkv_smart_cut: PASS
test_mkv_to_mp4_smart_cut: PASS
test_vp9_smart_cut: PASS
test_vp9_profile_1: PASS
test_av1_smart_cut: PASS
test_avi_smart_cut: PASS
test_flv_smart_cut: PASS
test_mov_smart_cut: PASS
test_wmv_smart_cut: PASS
test_mpg_cut_on_keyframes: PASS
test_mpg_smart_cut: PASS
test_m2ts_mpeg2_smart_cut: PASS
test_m2ts_h264_smart_cut: PASS
test_ts_smart_cut: PASS
test_night_sky: PASS
test_night_sky_to_mkv: PASS
test_sunset: PASS
test_h265_cut_on_keyframes: PASS
test_h265_smart_cut: PASS
test_h265_smart_cut_large: PASS
test_mp4_h265_smart_cut: PASS
test_vertical_transform: PASS
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [warning]: Source height < 720p; disabling lookahead-slices
test_video_recode_codec_override: PASS
test_vorbis_passthru: PASS
test_mkv_with_video_and_audio_passthru: PASS
test_mp3_passthru: PASS
test_seeking: PASS
Tests ran in 153.6s