J
jadmanx
Mitglied
Thread Starter
- Dabei seit
- 06.08.2014
- Beiträge
- 35
- Reaktionspunkte
- 0
ich habe das "Vom video player zu Animated Gif mit Automator" script verändert um ein video das im VLC offen ist ab der stelle in ein mp4 umzuwandeln. leider macht er immer das ganze video egal wo ich "-t "$thePos"" hin packe. wie man die länge die konvertiert werden soll angeben muss weis ich nicht.
Code:
#!/bin/bash#set -vx
[[ "$1" = "-h" ]] && echo "Syntax: ${0##*/} [-t]" && exit 1
theLength=2; #in seconds
theResolution=425; #x in pixels (y=auto aspect ratio)
theFrameRate=14; #frames per second
thePath=$(osascript -e 'tell app "VLC" to get path of current item');
thePos=$(osascript -e 'tell app "VLC" to get current time');
/usr/local/bin/ffmpeg -i "$thePath" -t "$thePos" -acodec libfaac -b:a 128k -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 "${thePath%.*}${thePos%.*}.mp4"