Skip to content

Instantly share code, notes, and snippets.

@AndreiCherniaev
Created March 16, 2023 12:50
Show Gist options
  • Save AndreiCherniaev/9ebd1b89f645b7507d3440e2de88c8b2 to your computer and use it in GitHub Desktop.
Save AndreiCherniaev/9ebd1b89f645b7507d3440e2de88c8b2 to your computer and use it in GitHub Desktop.
ffmpeg options
#!/bin/bash
# there are FFmpeg_fixing/build and FFmpeg_fixing/src folders
# $ cd FFmpeg_fixing/build/
# $ ../src/configure >> conflog.txt
# copy part of conflog.txt to demuxers.txt
# since (exclude) "Enabled demuxers:"
cd /home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_config/
rm -f new.txt
# sed -i 1d demuxers.txt # remove first "headers" line
N_eval="awk '{print NF}' demuxers.txt | sort -nu | tail -n 1"
calc_N=`eval $N_eval`
i=1
while [[ i -le "$calc_N" ]]; do
echo $i
cmd_str="awk '{print $"$i"}' demuxers.txt >> new.txt"
eval "$cmd_str"
((i++))
done
sed -i '/^$/d' new.txt
sed -i 's/^/--disable-demuxer=/' new.txt
sed -i 's/$/ \\/' new.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment