#9752(undetermined:new): ffmpeg is affecting the parent shell's file stream
#9752: ffmpeg is affecting the parent shell's file stream -------------------------------------+------------------------------------- Reporter: rgovostes | Type: defect Status: new | Priority: normal Component: | Version: undetermined | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- I am invoking ffmpeg from within a bash loop like this: {{{ while IFS="" read -r PLAYLIST; do ... ffmpeg -f concat -i concat.txt -i chapters.txt -map_metadata 1 \ -c copy merged.mp4 .... done < <(head -n 3 playlists.txt) }}} Each iteration of this loop, it should read one line from `playlists.txt` into the variable `PLAYLIST`. However, the lines are being unexpectedly truncated. Each line should start `{"ie_key": "YoutubeTab"` but when the truncation occurs the first 7 bytes are skipped and the loop reads `y": "YoutubeTab"`. This *only* happens when ffmpeg is invoked within the loop. I wasn't aware a child process could affect the parent like this but maybe ffmpeg is inheriting a file descriptor and inadvertently seeking it? {{{ ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers built with Apple clang version 13.1.6 (clang-1316.0.21.2) }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/9752> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9752: ffmpeg is affecting the parent shell's file stream -------------------------------------+------------------------------------- Reporter: rgovostes | Owner: (none) Type: defect | Status: closed Priority: normal | Component: | undetermined Version: unspecified | Resolution: invalid Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Nicolas George): * status: new => closed * resolution: => invalid Comment: This is not specific to ffmpeg, it will happen with any program that reads from its standard input. In case you did not know, ffmpeg reads interactive commands from its standard input; if you do not want it, redirect the input or use the `-nostdin` option. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9752#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg