Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2867 closed defect (invalid)

Ffmpeg doesn't understand pattern, like "photo*.jpg" and syntax like "photo%03d.jpg"

Reported by: amitoria Owned by:
Priority: minor Component: ffmpeg
Version: 1.2.2 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

  1. I am trying to create video from *.jpg
  2. a)Ffmpeg doesn't understand pattern, like "photo*.jpg"

b)Ffmpeg doesn't understand syntax like "photo%03d.jpg"

  1. I used the following commads:

a)ffmpeg -f image2 -y -i "photo*.jpg" -r 0.5 -s 640x480 foo.avi
b)ffmpeg -f image2 -y -i "photo%03d.jpg" -r 0.5 -s 640x480 foo.avi
At the same folder I placed photos(with names photoA.jpg, photoB.jpg, photoC.jpg, photo001, photo002, photo003 and like that).

  1. Batch file's name is batfile.bat. Command: ffmpeg -v 9 -loglevel 99 -f image2 -y -i "photo%03d.jpg" -r 0.5 -s 640x480 foo.avi.

ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers

built on Mar 28 2013 00:28:48 with gcc 4.8.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av

isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib

libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logginglevel) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'image2'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-i' ... matched as input file with argument 'photoE:\copy_result\bug\batfile.bat3d.jpg'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '0.5'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '640x480'.
Reading option 'foo.avi' ... matched as output file.Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set libav* logging level) with argument 9.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file photoE:\copy_result\bug\batfile.bat3d.jpg.
Applying option f (force format) with argument image2.
Successfully parsed a group of options.
Opening an input file: photoE:\copy_result\bug\batfile.bat3d.jpg.
[image2 @ 02597dc0] Could find no file with with path 'photoE:\copy_result\bug\batfile.bat3d.jpg' and index in the range 0-4
photoE:\copy_result\bug\batfile.bat3d.jpg: No such file or directory

Attachments (1)

batfile.bat (91 bytes) - added by amitoria 3 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 in reply to: ↑ description ; follow-up: Changed 3 years ago by thilo.borgmann

Replying to amitoria:

  1. Batch file's name is batfile.bat. Command: ffmpeg -v 9 -loglevel 99 -f image2 -y -i "photo%03d.jpg" -r 0.5 -s 640x480 foo.avi.

Reading option '-i' ... matched as input file with argument 'photoE:\copy_result\bug\batfile.bat3d.jpg'.

These look like you're pasting the wrong command line parameter to the call of ffmpeg in your .bat file. This looks like you're using $0 instead of $1 or something similar. Please check.

If this is not the case, attach your .bat file to this bug report.

-Thilo

comment:2 in reply to: ↑ 1 Changed 3 years ago by thilo.borgmann

Replying to thilo.borgmann:

Replying to amitoria:

  1. Batch file's name is batfile.bat. Command: ffmpeg -v 9 -loglevel 99 -f image2 -y -i "photo%03d.jpg" -r 0.5 -s 640x480 foo.avi.

Reading option '-i' ... matched as input file with argument 'photoE:\copy_result\bug\batfile.bat3d.jpg'.

These look like you're pasting the wrong command line parameter to the call of ffmpeg in your .bat file. This looks like you're using $0 instead of $1 or something similar. Please check.

And with "you're pasting" I mean, your shell seems to paste for you before ffmpeg is even called... looks like windows uses "%03"?

-Thilo

Changed 3 years ago by amitoria

comment:3 follow-up: Changed 3 years ago by amitoria

When I write %1 instead %0, command line correctly sends options to ffmpeg, but I can't use % in that options second time. For "photo%13d.jpg" ffmpeg writes that:
[image2 @ 02957800] Could find no file with path 'photo3d.jpg' and index in the
range 0-4
photo3d.jpg: No such file or directory

For bug report I use example from official doc-s (at bottom of http://ffmpeg.org/ffmpeg.html page).
I think, it would be nice to exclude from ffmpeg's command syntax the '%' symbol, because it used by command shell.

comment:4 in reply to: ↑ 3 Changed 3 years ago by thilo.borgmann

Replying to amitoria:
[...]

I think, it would be nice to exclude from ffmpeg's command syntax the '%' symbol, because it used by command shell.

All you need to do is to escape your '%' symbol properly if that symbol is to be used by the program invoked and not meant to be handled by the shell.

In your case escape % with % and type: "photo%%03d.jpg".

-Thilo

comment:5 Changed 3 years ago by thilo.borgmann

  • Analyzed by developer set
  • Priority changed from important to minor
  • Reproduced by developer set
  • Resolution set to invalid
  • Status changed from new to closed

comment:6 Changed 3 years ago by amitoria

From 5 pictures only 2 exist in created video)

Note: See TracTickets for help on using tickets.