anonymous
@
RULINUX.NET~#
Last login: 2024-11-22 15:47:22
Регистрация
Вход
Новости
|
Разметка
|
Пользователи
|
Галерея
|
Форум
|
Статьи
|
Неподтвержденное
|
Трекер
|
Правила форума
|
F.A.Q.
|
Ссылки
|
Поиск
Форум
-
Development
[
RSS
]
Скрыть
mplayer-edl
bash
#!/bin/sh
# http://www.mplayerhq.hu/DOCS/HTML/en/edl.html
MPLAYER
=
/
usr
/
bin
/
mplayer
VIDEO_EXT
=
"avi mp4"
EDL_EXT
=
"edl"
if
[
$#
-lt
1
]
;
then
echo
"Usage:
$(basename $0)
<video> ..."
echo
" or:
$(basename $0)
<file.edl> ..."
exit
1
fi
while
[
$#
-gt
0
]
;
do
if
[
-r
"$1"
]
;
then
# input filename
INPUT
=
"$1"
# filename without extension ${EDL_EXT}
NAME
=
"
${INPUT%.${EDL_EXT}
}"
if
[
"x
${NAME}
"
==
"x
${INPUT}
"
]
;
then
# VIDEO section
VIDEO
=
"
${INPUT}
"
OUT
=
"
${INPUT%.*}
.
${EDL_EXT}
"
CMD
=
"-edlout"
else
# EDL section
# search video file
VIDEO
=
""
for
EXT
in
${VIDEO_EXT}
;
do
if
[
-r
"
${NAME}
.
${EXT}
"
]
;
then
VIDEO
=
"
${NAME}
.
${EXT}
"
fi
done
if
[
"x
${VIDEO}
"
==
"x"
]
;
then
echo
"Supported video for '
${INPUT}
' not found (
${VIDEO_EXT}
)"
exit
3
fi
OUT
=
"
${INPUT}
"
CMD
=
"-edl"
fi
# echo "INPUT='${INPUT}'; VIDEO='${VIDEO}'; OUT='${OUT}'"
${MPLAYER}
"
${VIDEO}
"
${CMD}
"
${OUT}
"
else
echo
"File \`$1' not found"
exit
2
fi
shift
done
anonymous(
*
) (2021-04-15 12:27:11)
Отредактировано anonymous по причине "не указана"
[
Ответить на это сообщение
]
[bash] atoi()
Этот тред читают 1 пользователь:
Анонимных: 1
Зарегистрированных: 0
(c) 2010-2020 LOR-NG Developers Group
Powered by TimeMachine