Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //script.sh
- function run_ffmpeg() {
- url=$1
- duration=`ffprobe $url | grep "Duration"`
- $out=_$duration"_`echo $url | sed "s/.*\///g" | sed "s/\.mp4.*/.jpg/g`
- ffmpeg -i $url -vf "select='eq(n,LAST_FRAME_INDEX)'" -vframes 1 $out
- }
- run_ffmpeg $1
- =================
- // script.py
- res = subprocess.run("bash script.sh %s" % url, shell=True, stdout=subprocess.PIPE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement