fix ffmpeg output

This commit is contained in:
olli 2024-04-06 17:07:27 +02:00
parent 3c77f6365d
commit e780202efc
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ g_tmp="$g_tmp/g_$g_scriptname-$$"
[ -d "$g_tmp" ] || mkdir -p "$g_tmp"
# START and EXIT Notification
g_trap_exit="g_logger EXITING $g_scriptname ; rm -r $g_tmp ; g_kill_all_background_jobs"
g_trap_exit="g_logger EXITING $g_scriptname ; rm -r $g_tmp ; g_kill_all_background_jobs >/dev/null 2>&1"
trap "$g_trap_exit" EXIT
g_syslogtag="g_bash-script:$g_scriptname[$$]"
[ $g_scriptname = "bash" ] || g_logger STARTING $g_scriptname

View File

@ -5,7 +5,7 @@ function g_compress_video {
local g_remotedockerffmpeg=$2
# Datei OK und noch da?
ffmpeg -i "$g_vid" 2>&1 | perl -pe 's/\[0x.+\]//g' >"$g_tmp"/vidinfo
ffmpeg -i "$g_vid" 2>&1 | perl -pe 's/\[0x[0-9]+\]//g' >"$g_tmp"/vidinfo
if egrep -q "Invalid data found when processing input|No such file or directory" "$g_tmp"/vidinfo
then
g_echo_warn "Video $g_vid existiert nicht (mehr) oder ist defekt."
@ -19,7 +19,7 @@ function g_compress_video {
local g_lines=`cat "$g_tmp"/vidinfo | egrep -v "WARNING: | configuration: |Side data\:|audio service type\: main|Video\:.+hevc.+1280x|Video\:.+hevc.+960x|Video\:.+hevc.+[1-8][0-9][0-9]x|Audio\:.+HE-AAC\).+mono|Audio\:.+HE-AAC.+stereo|Audio\:.+ac3.+5\.1.side.|Input .+mp4.+from|vendor_id|^ +lib[a-z]+ " | wc -l`
# Max DVD Quali
[ -e "$g_tmp"/VID-SD ] && g_lines=`cat "$g_tmp"/vidinfo | egrep -v "WARNING: | configuration: |Side data\:|audio service type\: main|Video\:.+hevc.+720x|Video\:.+hevc.+[1-6][0-9][0-9]x|Audio\:.+HE-AAC\).+mono|Audio\:.+HE-AAC.+stereo|Audio\:.+ac3.+5\.1.side.|Input .+mp4.+from|vendor_id|^ +lib[a-z]+ " | wc -l`
if [ $g_lines -eq '13' ]
if [ $g_lines -eq '14' ]
then
g_echo "Video $g_vid bereits bearbeitet!"
return 1