On Fri, 14 Jul 2017, Moritz Barsnick wrote:

done < VIDEO_FILES  > FFMPEG_ERRORS 2>&1

I don't know why, but I have seen it before, and the '< VIDEO_FILES' may be flooding ffmpeg's stdin. Do try "-nostdin".

This is a common problem with bash/sh and "while" loops. The while loop is reading from STDIN and any commands within the loop are reading from the SAME STDIN. When you redirect STDIN to the while loop, you also redirect it to the commands within the loop. In this case, that means both the while loop and ffmpeg are competing to read from "VIDEO_FILES".

As you suggest, -nostdin should fix this... it'd think anyway. If not, it should work to redirect STDIN to the ffmpeg command, eg:

  while ...
    ffmpeg ... < /dev/null
  done < SOME_FILE

If you really need the command within the loop to read from STDIN, then you need to get trickier and start playing around with file descriptors. A better option is just to use perl or some other scripting language that handles this better.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to