Here is my scriptI updated it a little bit, but I'm still not getting the results I should be getting:
#!/bin/bash
#convert stuff tofind MPEG4"$1" /-type 2chf AAC
for| fwhile inread /movies_input/*filename
do
videoCodec=""
audioCodec=""
audioChannels=""
#echo "process $f"
videoCodec=$(mediainfo --Inform="Video;%Codec%" $f)
audioCodec=$videoCodec=$(mediainfoffprobe --Inform="Audio;%Codec%"v $f)
audioChannels=$(mediainfoerror --Inform="Audio;%Channels%"select_streams $f)
#mediainfov:0 --Inform="Video;%Codec%" $fshow_entries |stream=codec_name while-of readdefault=noprint_wrappers=1:nokey=1 line;
video_good="false"
audio_good="false"
"$filename")
if [[ $videoCodec == "V_MPEG4"*audioCodec=$(ffprobe ]]-v ;error then
-select_streams a:0 -show_entries stream=codec_name cli_video="-c:vof copydefault=noprint_wrappers=1:nokey=1 ""$filename")
video_good="true"
fi
if [[ $audioCodecaudioChannels=$(ffprobe ==-v "AAC"error &&-select_streams $audioChannelsa:0 ==-show_entries "2"stream=channels ]]-of ;default=noprint_wrappers=1:nokey=1 then"$filename")
cli_audio="-c:aecho copy$videoCodec "
$audioCodec $audioChannels $filename
audio_good="true"
# if [ $videoCodec = "h264" else
#] && [ cli_audio="-c:a$audioCodec aac= -ac"aac" 2] "
fi
if&& [[[ $video_good="true"audioChannels &&= $audio_good="true""2" ]]] ; then
echo "I'm going to execute:"
echo ffmpeg"Direct -iplay $fcapable"
$cli_video $cli_audio `basename "$f"`
fi
done
done
When I run this script,on a folder containing a file which has 6 channel AAC will runthat meets all the "I'm going to execute:" codeif conditions ("h264 aac 2 . When run a file which is DTS audio it will run/Black.Mass.(2015)/Black.Mass.(2015).mp4") but do not get the "I'm going to execute:" code"Direct play capable" echo.
Please help! thanks