.mp4 파일이 많이 있습니다 (DRM 없음). 각 파일은 어린이 TV 프로그램의 두 에피소드로 구성됩니다. 다시 인코딩하지 않고 파일을 두 개로 나누고 싶습니다. 이를 수행하는 가장 좋은 방법은 무엇입니까? GUI를 사용하는 것이 좋습니다 (두 에피소드 사이의 구분선을 찾기 위해 각 파일의 올바른 부분으로 건너 뛰어야하기 때문에).
감사,
분할하려는 시간을 찾으려면 미디어 플레이어에서 비디오를 여는 것이 좋습니다. 그런 다음 다음 스크립트와 함께 ffmpeg를 사용할 수 있습니다. 비디오를 다시 인코딩하지 않습니다.
#!/bin/bash
# Split Video Script
# Usage: script_name file_name split-point
# Example: split_video_script bugs_bunny.mp4 31:23
# Instructions:
# 1. Type the name of your script (if it is already added to ~/bin and marked as executable).
# 2. Type the file name including path to it if necessary.
# 3. Type the time where you want to split the video. It goes in minutes:seconds
# Get length in seconds
length=$(echo "$2" | awk -F: '{print ($1 * 60) + $2}')
# Get filename without extension
fname="${1%.*}"
# First half
ffmpeg -i "${fname}.mp4" -c copy -t "$length" "${fname}1.mp4"
# Second half
ffmpeg -i "${fname}.mp4" -c copy -ss "$length" "${fname}2.mp4"
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다