• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

OS/2 command processor ?

Started by CDRWSel, 2010.06.22, 05:09:16

Previous topic - Next topic

CDRWSel

Hi team,

I have a problem and didn't find how to bypass it using a rexx batch file.
I can issue any ffmpeg command from a batch (cmd) file but one kind of command always fail !

Here is the sample:

/* */
'ffmpeg -f image2 -i "e:\ce2mp3\img%04d.gif" -sameq -f mpeg2video file.mpg'
return


Very easy isn't it except that the os/2 cmd processor interprets the %0 using the bach program name which is here test.cmd
Following error appears then !

e:\ce2mp3\imgtest4d.gif: No such file or directory

How to prevent this issue and have ffmpeg looking for numbered img0001.gif.. img0002.gif etc... ?
Using the cmd as rexx or not rexx gives the same result.

I need this command been issued from a batch file !


The same command issued from an OS/2 prompt command work well
[E:\ffmpeg-r23406]ffmpeg -f image2 -i "e:\ce2mp3\img%04d.gif" -sameq -f mpeg2vid
eo file.mpg
FFmpeg version SVN-r23406, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jun  1 2010 19:37:55 with gcc 4.4.4
  configuration: --prefix=/extras --enable-gpl --enable-libmp3lame --enable-libf
aad --enable-libfaac --enable-libxvid --enable-libx264 --enable-libtheora --pref
ix=/extras --enable-postproc --enable-nonfree
  libavutil     50.16. 0 / 50.16. 0
  libavcodec    52.72. 1 / 52.72. 1
  libavformat   52.67. 0 / 52.67. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.20. 0 /  1.20. 0
  libswscale     0.10. 0 /  0.10. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Input #0, image2, from 'e:\ce2mp3\img%04d.gif':
  Duration: 00:00:00.12, start: 0.000000, bitrate: N/A
etc...
Suggestions are welcome

Thanks helping me.
Cheers/2
Remy

CDRWSel

I just talk with an old DOS specialist !
He told me be a normal issue and that I have to add one more % to tell command process to not interpret the %0 specified into the command. Name IMG%04d.gif should then be coded as IMG%%04d.gif 

I'll do it a try this evening to verify...

During the time I asked the question and this morning, I found a bypass which works.
I changed the *.cmd file which has variables + a command line to a *.txt (or any other type of text file) and wrote a very small rexx compiled exe which reads this parameter file and does an nterpret. All is then well executed.

Bye/2
Remy

CDRWSel

Oh! I didn't give test results...

Yes it works.
replacing IMG%04d.gif by IMG%%04d.gif gives IMG%04d.gif as expected which is then correctly handled by ffmpeg.
That is the tric !