Skip to content

Instantly share code, notes, and snippets.

View sathishrs's full-sized avatar
🏠
Working from home

Sathish sathishrs

🏠
Working from home
View GitHub Profile
#!/bin/bash
# Input file
input_file="${1}"
# Run ffprobe to analyze the input file and capture the output
output=$(ffprobe -v quiet -show_streams -print_format json "$input_file")
# Check if the output contains video and/or audio streams
if [[ $output == *'"codec_type": "video"'* && $output == *'"codec_type": "audio"'* ]]; then