[FFmpeg-trac] #10033(ffmpeg:new): "protocol not found" when filename contains a colon
FFmpeg
trac at avcodec.org
Mon Nov 14 12:45:48 EET 2022
#10033: "protocol not found" when filename contains a colon
--------------------------------+--------------------------------------
Reporter: slhck | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------+--------------------------------------
Summary of the bug: ffmpeg incorrectly detects a different output protocol
for a file that contains a colon in its name.
How to reproduce:
{{{
➜ ffmpeg -f lavfi -i testsrc -t 1 foo:bar.mkv
ffmpeg version N-63101-gc92edd969a-static
https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg
developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-
debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio
--cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp
--enable-libgme --enable-gray --enable-libaom --enable-libfribidi
--enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid
--enable-libzvbi --enable-libzimg
libavutil 57. 36.101 / 57. 36.101
libavcodec 59. 42.104 / 59. 42.104
libavformat 59. 30.101 / 59. 30.101
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 48.100 / 8. 48.100
libswscale 6. 8.108 / 6. 8.108
libswresample 4. 9.100 / 4. 9.100
libpostproc 56. 7.100 / 56. 7.100
Input #0, lavfi, from 'testsrc':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: wrapped_avframe, rgb24, 320x240 [SAR 1:1 DAR 4:3],
25 fps, 25 tbr, 25 tbn
foo:bar.mkv: Protocol not found
}}}
This particularly causes confusion when using ISO-8601 dates in the output
filename, e.g. "2022-11-14T10:19:28.494Z.mkv".
I can get around it by explicitly specifying the protocol:
{{{
➜ ffmpeg -f lavfi -i testsrc -t 1 file:$(pwd)/foo:bar.mkv
}}}
I am aware that per RFC 3986, even "foo:bar" is a valid URI, but to end-
users the error message may be too confusing.
Would it be possible to apply the file protocol for such output filenames
automatically?
Alternatively, the user should be warned that if they specified a filename
(i.e. implicitly meant to use the file protocol), they should prefix their
output with `file:`.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10033>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list