Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Skip segments with N/A duration (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
feymartynov authored Aug 31, 2020
1 parent a5b01ca commit 2806f18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/upload_record.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ done
# Get video segments durations and write to segments.csv file.
for FILE in *.video.webm; do
DURATION=$(ffprobe -i ${FILE} -show_entries format=duration -v quiet -of csv="p=0")
echo "${FILE%%.*},${DURATION}" >> segments.csv

if [[ "${DURATION}" != "N/A" ]]; then
echo "${FILE%%.*},${DURATION}" >> segments.csv
fi
done

# Concat video segments into a single .webm file.
Expand Down

0 comments on commit 2806f18

Please sign in to comment.