- file_in_basename="$(basename "$file_in")";
- ffmpeg -i "$file_in" -vn -acodec copy "$dir_out"/"$file_in_basename"."$file_in_ext";
-}
+ ffmpeg -i "$file_in" -vn -acodec copy "$path_out";
+} # Create audio file from video file
+count_jobs() {
+ # Desc: Count and return total number of jobs
+ # Usage: count_jobs
+ # Input: None.
+ # Output: stdout integer number of jobs
+ # Depends: Bash 5.1.16
+ # Example: while [[$(count_jobs) -gt 0]]; do echo "Working..."; sleep 1; done;
+ # Version: 0.0.1
+
+ local job_count;
+ job_count="$(jobs -r | wc -l | tr -d ' ' )";
+ #yell "DEBUG:job_count:$job_count";
+ if [[ -z $job_count ]]; then job_count="0"; fi;
+ echo "$job_count";
+}; # Return number of background jobs
+job() {
+ # Input: arg1: file : file to check and, if audio, export
+ # arg2: dir_out: output dir
+ local file dir_out;
+ file="$1";
+ dir_out="$2";
+ aud_format="$(get_audio_format "$file")"; # Get audio format as file extension string
+ file_basename="$(basename "$file")"; # Get basename for debugging
+ yell "DEBUG:file_basename:$file_basename";
+ yell "DEBUG:aud_format:$aud_format";
+ yell "DEBUG:";