[FFmpeg-trac] #11571(undetermined:new): Unexpected shell variable overwrite with `read` and `ffmpeg`
FFmpeg
trac at avcodec.org
Fri May 2 10:53:52 EEST 2025
#11571: Unexpected shell variable overwrite with `read` and `ffmpeg`
-------------------------------------+-------------------------------------
Reporter: Jimmy Leung | Owner: (none)
Type: defect | Status: new
Priority: normal | Component:
| undetermined
Version: 7.1 | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Jimmy Leung):
Replying to [comment:3 MasterQuestionable]:
> ͏ Would !`ffmpeg -i "$var"` reproduce?
> ͏ Caveat the shell's field splitting on unquoted variables.
To make the loop actually work, I will need to supply output file
argument.
So that's what I could do, changing the original `ffmpeg` command into the
below one.
{{{
- ffmpeg -hide_banner -loglevel error -c copy "$folder/${_index}.mp4" -i
$vid_item
+ ffmpeg "$folder/${_index}.mp4" -i $vid_item
}}}
Without stripping away banner and log, I can reproduce a long piece of
error message obtained at the 2nd iteration of the loop (indicated by the
label `vid at 1:`).
{{{
vid at 1: ttps://github.com/tsoding/musializer/assets/165283/8b9f9653-9b3d-
4c04-9569-338fa19af071
ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers
built with Apple clang version 16.0.0 (clang-1600.0.26.6)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1.1_1 --enable-
shared --enable-pthreads --enable-version3 --cc=clang --host-cflags=
--host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-
gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-
libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame
--enable-libopus --enable-librav1e --enable-librist --enable-librubberband
--enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1
--enable-libtesseract --enable-libtheora --enable-libvidstab --enable-
libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma
--enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-
libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-
libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
--enable-audiotoolbox --enable-neon
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.101 / 61. 19.101
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
[in#0 @ 0x138632ca0] Error opening input: Protocol not found
[in#0 @ 0x138632ca0] Did you mean
file:ttps://github.com/tsoding/musializer/assets/165283/8b9f9653-9b3d-
4c04-9569-338fa19af071?
Error opening input file
ttps://github.com/tsoding/musializer/assets/165283/8b9f9653-9b3d-
4c04-9569-338fa19af071.
Error opening input files: Protocol not found
}}}
Somehow the first few characters go missing.
Tested it few more times. Seems it only happens to `ffmpeg`, but not
`ffprobe` nor `grep` nor other shell utilities.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11571#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list