Moved assets/cmd_* to assets/commands/*
Signed-off-by: James P. Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
dbe268a2e6
commit
7ff2fdf343
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PARAM=$0
|
PARAM=$0
|
||||||
# Strip path and cmd_ prefix from command name
|
# Strip path from command name
|
||||||
PARAM=${PARAM##*/cmd_}
|
PARAM=${PARAM##*/}
|
||||||
|
|
||||||
short() {
|
short() {
|
||||||
echo "Transcode AVC (H.264) to to streams: 1280x720@5Mbps and 60FPS@4Mbps"
|
echo "Transcode AVC (H.264) to to streams: 1280x720@5Mbps and 60FPS@4Mbps"
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PARAM=$0
|
PARAM=$0
|
||||||
# Strip path and cmd_ prefix from command name
|
# Strip path from command name
|
||||||
PARAM=${PARAM##*/cmd_}
|
PARAM=${PARAM##*/}
|
||||||
|
|
||||||
short() {
|
short() {
|
||||||
echo "Decode AVC (H.264) video and save as YUV 420P raw file"
|
echo "Decode AVC (H.264) video and save as YUV 420P raw file"
|
@ -1,11 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PARAM=$0
|
PARAM=$0
|
||||||
# Strip path and cmd_ prefix from command name
|
# Strip path from command name
|
||||||
PARAM=${PARAM##*/cmd_}
|
PARAM=${PARAM##*/}
|
||||||
|
|
||||||
short() {
|
short() {
|
||||||
echo "Encode 10 frames from YUV420 raw input as H264 with 5Mbps using VBR mode"
|
echo "Encode frames from YUV420 raw input as H264 with 5Mbps using VBR mode"
|
||||||
}
|
}
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
@ -37,11 +37,10 @@ ffmpeg command:
|
|||||||
-f rawvideo \
|
-f rawvideo \
|
||||||
-pix_fmt yuv420p \
|
-pix_fmt yuv420p \
|
||||||
-s:v 176x144 \
|
-s:v 176x144 \
|
||||||
-i /media/\$(IN_FILE} \
|
-i /media/\${IN_FILE} \
|
||||||
-vf hwupload=extra_hw_frames=64,format=qsv \
|
-vf hwupload=extra_hw_frames=64,format=qsv \
|
||||||
-c:v h264_qsv \
|
-c:v h264_qsv \
|
||||||
-b:v 5M \
|
-b:v 5M \
|
||||||
-frames:v 10 \
|
|
||||||
-y \
|
-y \
|
||||||
/media/\${OUT_FILE}
|
/media/\${OUT_FILE}
|
||||||
|
|
||||||
@ -130,6 +129,5 @@ ffmpeg \
|
|||||||
-vf hwupload=extra_hw_frames=64,format=qsv \
|
-vf hwupload=extra_hw_frames=64,format=qsv \
|
||||||
-c:v h264_qsv \
|
-c:v h264_qsv \
|
||||||
-b:v 5M \
|
-b:v 5M \
|
||||||
-frames:v 10 \
|
|
||||||
-y \
|
-y \
|
||||||
/media/${OUT_FILE}
|
/media/${OUT_FILE}
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PARAM=$0
|
PARAM=$0
|
||||||
# Strip path and cmd_ prefix from command name
|
# Strip path from command name
|
||||||
PARAM=${PARAM##*/cmd_}
|
PARAM=${PARAM##*/}
|
||||||
|
|
||||||
short() {
|
short() {
|
||||||
echo "Transcode AVC (H.264) to HEVC (H.265) with 5Mbps using VBR"
|
echo "Transcode AVC (H.264) to HEVC (H.265) with 5Mbps using VBR"
|
10
assets/entry
10
assets/entry
@ -15,7 +15,7 @@ request=${arguments[0]}
|
|||||||
arguments=("${arguments[@]:1}")
|
arguments=("${arguments[@]:1}")
|
||||||
|
|
||||||
commands=(info help version ffmpeg shell)
|
commands=(info help version ffmpeg shell)
|
||||||
commands+=(/assets/cmd_*)
|
commands+=(/assets/commands/*)
|
||||||
|
|
||||||
. /assets/SOLUTION
|
. /assets/SOLUTION
|
||||||
. /assets/MANIFEST
|
. /assets/MANIFEST
|
||||||
@ -87,7 +87,7 @@ $(name)
|
|||||||
Commands:
|
Commands:
|
||||||
EOF
|
EOF
|
||||||
for cmd in ${commands[@]}; do
|
for cmd in ${commands[@]}; do
|
||||||
printf " %-15s %s\n" ${cmd##*/cmd_} "$(${cmd} --short)"
|
printf " %-15s %s\n" ${cmd##*/} "$(${cmd} --short)"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,13 +122,13 @@ for option in "${options[@]}"; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
[ ! -f /assets/cmd_$request ] && {
|
[ ! -f /assets/commands/$request ] && {
|
||||||
echo "'${request}' is not a recognized command."
|
echo "'${request}' is not a recognized command."
|
||||||
} || {
|
} || {
|
||||||
(( $debug )) && {
|
(( $debug )) && {
|
||||||
/bin/bash -x /assets/cmd_$request "${arguments[@]}"
|
/bin/bash -x /assets/commands/$request "${arguments[@]}"
|
||||||
} || {
|
} || {
|
||||||
/assets/cmd_$request "${arguments[@]}"
|
/assets/commands/$request "${arguments[@]}"
|
||||||
}
|
}
|
||||||
exit $?
|
exit $?
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user