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 3 Next »

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 . |grep \.stdout$ | xargs -Ił xmllint --noout ł 2>&1 | grep \\./ | cut -d':' -f1 | sort -u > broken-files
for line in $(grep \_plutre\.mp4\.stdout$ broken-files); do sed -i -e 's/value=\"\s/value=\"/g' $line; done
for line in $(grep \.\/mux broken-files); do echo "</ffprobe:ffprobe>" >> $line; done
find . |grep \.stdout$ | xargs -Ił xmllint --noout ł 2>&1 | 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-feed (^L) in attribute values (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