Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # parameters:
- # 1 - source file
- # 2 - start time
- # 3 - precise end time
- # 4 - video bitrate
- # 5 - vertical resulution
- # 6 - end time with some padding
- ffmpeg -nostdin -loglevel quiet -y -ss "$2" -i "$1" -to "$6" -an -c:v copy -copyts -f mpegts - |
- ffmpeg -nostdin -loglevel quiet -y -i - \
- -c:v libx264 -preset veryfast -b:v $4k \
- -vf "select=between(t\, $2\, $3),scale=-2:$5" \
- -f mpegts -copyts \
- - 2>/dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement