[FFmpeg-user] Batch file to convert New Edit

esikcalabrese at verizon.net esikcalabrese at verizon.net
Fri Sep 28 19:30:41 EEST 2018


I believe I'm getting closer.  It doesn't appear to get the 2nd variable. 

set /p filename="Enter Unconverted File Name: "
set /p outputfilename="Enter Converted File Name: "
CALL "C:\ffmpeg\bin\ffmpeg.exe" ffmpeg -i %filename% %outputfilename%
pause





C:\Users\Kirk Calabrese\Desktop>set /p filename="Enter Unconverted File Name: "
Enter Unconverted File Name: Robinson.wav

C:\Users\Kirk Calabrese\Desktop>set /p outputfilename="Enter Converted File Name: "
Enter Converted File Name: robinsonconverted.wav

C:\Users\Kirk Calabrese\Desktop>CALL "C:\ffmpeg\bin\ffmpeg.exe" ffmpeg -i Robinson.wav robinsonconverted.wav
ffmpeg version N-92058-gefb65abedf Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180813
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 19.101 / 56. 19.101
  libavcodec     58. 31.100 / 58. 31.100
  libavformat    58. 18.102 / 58. 18.102
  libavdevice    58.  4.104 / 58.  4.104
  libavfilter     7. 33.100 /  7. 33.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
[wav @ 0000014df404a3c0] Estimating duration from bitrate, this may be inaccurate
Input #0, wav, from 'Robinson.wav':
  Duration: 00:07:48.95, bitrate: 5 kb/s
    Stream #0:0: Audio: g723_1 ([0][161][0][0] / 0xA100), 8000 Hz, mono, s16, 5 kb/s
[NULL @ 0000014df405d4c0] Unable to find a suitable output format for 'ffmpeg'
ffmpeg: Invalid argument

C:\Users\Kirk Calabrese\Desktop>pause
Press any key to continue . . .

Kirk Calabrese, MA,CMT, Network+ Certified Professional
IT Consultant

-----Original Message-----
From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> On Behalf Of Michael Koch
Sent: Friday, September 28, 2018 9:47 AM
To: ffmpeg-user at ffmpeg.org
Subject: Re: [FFmpeg-user] Batch file to convert

Am 28.09.2018 um 15:20 schrieb esikcalabrese at verizon.net:
> Thank you Michael:
>
> Based on new information, I have revised the script with the following.  It seems to be working a bit better; however, still not there yet.  Below is the new script with output below:
>
>
> set /p filename = "Enter Unconverted File Name: "
> set /p outputfilename= "Enter Converted File Name: "
> CALL "C:\ffmpeg\bin\ffmpeg.exe" "C:\ffmpeg\bin\ffmpeg -i %filename% %outputfilename%"
> pause
>
>
>
>
>
> C:\Users\Kirk Calabrese\Desktop>set /p filename = "Enter Unconverted File Name: "
> Enter Unconverted File Name: Robinson.WAV
>
> C:\Users\Kirk Calabrese\Desktop>set /p outputfilename= "Enter Converted File Name: "
> Enter Converted File Name: robinsonconverted.wav
>
> C:\Users\Kirk Calabrese\Desktop>CALL "C:\ffmpeg\bin\ffmpeg.exe" "C:\ffmpeg\bin\ffmpeg -i  robinsonconverted.wav"

As you can see here, the input filename is missing in the command string.
Try removing the space characters left and right of = in the set commands. Please note that you have no space character left of = in the second set command. This may be the difference why this line works.

Michael

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list