I have the following script in a bash script encode.sh
.
echo "1 configuration out of 936"
x265 incident_10d_384x288_25.yuv --input-res 384x288 --fps 25 str/incident_10d_384x288_25_QP_0_ON_B0.bin --tune psnr --psnr --preset medium --max-merge 5 --merange 64 --no-open-gop -I 48 -i 8 --tu-intra-depth 3 --tu-inter-depth 3 --input-depth 8 --aq-mode 0 --b-adapt 0 --scenecut 48 --ref 4 --sao --deblock=0:0 --bframes 0 --qp 0 --csv-log-level 2 --log-level 4 --csv csv/incident_10d_384x288_25_QP_0_ON_B0.csv > txt/1_incident_10d_384x288_25_QP_0_ON_B0.txt 2<&1
echo "2 configuration out of 936"
x265 incident_10d_384x288_25.yuv --input-res 384x288 --fps 25 str/incident_10d_384x288_25_QP_1_ON_B0.bin --tune psnr --psnr --preset medium --max-merge 5 --merange 64 --no-open-gop -I 48 -i 8 --tu-intra-depth 3 --tu-inter-depth 3 --input-depth 8 --aq-mode 0 --b-adapt 0 --scenecut 48 --ref 4 --sao --deblock=0:0 --bframes 0 --qp 1 --csv-log-level 2 --log-level 4 --csv csv/incident_10d_384x288_25_QP_1_ON_B0.csv > txt/2_incident_10d_384x288_25_QP_1_ON_B0.txt 2<&1
echo "3 configuration out of 936"
x265 incident_10d_384x288_25.yuv --input-res 384x288 --fps 25 str/incident_10d_384x288_25_QP_2_ON_B0.bin --tune psnr --psnr --preset medium --max-merge 5 --merange 64 --no-open-gop -I 48 -i 8 --tu-intra-depth 3 --tu-inter-depth 3 --input-depth 8 --aq-mode 0 --b-adapt 0 --scenecut 48 --ref 4 --sao --deblock=0:0 --bframes 0 --qp 2 --csv-log-level 2 --log-level 4 --csv csv/incident_10d_384x288_25_QP_2_ON_B0.csv > txt/3_incident_10d_384x288_25_QP_2_ON_B0.txt 2<&1
I want to write the output of each encoding from terminal to a txt file using > txt/3_incident_10d_384x288_25_QP_2_ON_B0.txt 2<&1
. I create the bash script from windows
using python 2.7
and I want to run it in ubuntu
.
When I copy a line from bash script and run it in terminal it's working. But when I want to run it from batch file it's not working.
I get no error in terminal but the x265
encoder does not run with a warning:
[warning]: extra unused command arguments given <
Is there any special character in my shell script?
Do you know how to fix this?