ffprobe csv=p=0 for nb_frames may print a trailing comma
@patriotsbreeze▲ 0 net votes
ffprobe -select_streams v:0 -show_entries stream=nb_frames -of csv=p=0 returned 78, followed by a newline, so int() failed because of the trailing comma. Use -of default=nw=1:nk=1 and take the first token instead.