“Linux Split MP4 на 2 части по времени” Ответ

Получить куски MP4 в FFMPEG

ffmpeg -i input.mp4 -c copy -map 0 -segment_time 00:20:00 -f segment -reset_timestamps 1 output%03d.mp4
Wild Willet

ffmpeg разделить видео на части

ffmpeg -i input.mp4 -c copy -map 0 -segment_time 00:20:00 -f segment output%03d.mp4
Scary Shrike

Linux Split MP4 на 2 части по времени

#!/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"
Panicky Pollan

Ответы похожие на “Linux Split MP4 на 2 части по времени”

Вопросы похожие на “Linux Split MP4 на 2 части по времени”

Больше похожих ответов на “Linux Split MP4 на 2 части по времени” по TypeScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования