Child pages
  • Radio/tv DOMS migrations
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Radio/tv DOMS migrations

Fixing FFprobe data

Some of the ffprobe-data contain errors. The following bash magic fixes the errors we've encountered so far:

fixing FFprobe data
find . -name \*.stdout | xargs -Ił xmllint --noout ł 2>&1 | grep ^\\./ | cut -d':' -f1 | sort -u > broken-files
for file in $(grep \_plutre\.mp4\.stdout$ broken-files); do sed -i -e 's/\d012//g' $file $(dirname $file)/$(basename $file .stdout).stderr; done
for file in $(grep \.\/mux broken-files); do echo "</ffprobe:ffprobe>" >> $file; done
xargs -Ił xmllint --noout ł 2>&1 < broken-files | grep ^\\./ | cut -d':' -f1 | sort -u > broken-files-remaining

xmllint is used to find faulty files (line 1), and the files typically have two types of errors: Files containing line-feeds (^L) (line 2) and files missing the ffprobe:ffprobe-end-tag (line 3). Line 4 is equivalent to line 1, and should result in an empty file. If broken-files-remaining is non-empty, somebody should probably have a look at the offending files.

  • No labels