|
新人提问。C++中用CreateProcess调用了ffmpeg,然后通过匿名管道获取到输出的内容,但是如何从输出的内容里判断这个ffmpeg执行是成功还是失败呢?
比如说执行了:ffmpeg -i D:\project\testCMD\testCMD\Debug\AudioVideo\groupcall.amr D:\project\testCMD\testCMD\Debug\result\groupcall.mp3
获得以下输出:
ffmpeg version N-73266-g4aa0de6 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 45.101 / 56. 45.101
libavformat 56. 40.100 / 56. 40.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 19.100 / 5. 19.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
[amr @ 046c22e0] Estimating duration from bitrate, this may be inaccurate
Input #0, amr, from 'D:\project\testCMD\testCMD\Debug\AudioVideo\groupcall.amr':
Duration: 00:00:41.64, bitrate: 12 kb/s
Stream #0:0: Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s
Output #0, mp3, to 'D:\project\testCMD\testCMD\Debug\result\groupcall.mp3':
Metadata:
TSSE : Lavf56.40.100
Stream #0:0: Audio: mp3 (libmp3lame), 8000 Hz, mono, fltp
Metadata:
encoder : Lavc56.45.101 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (amr_nb (amrnb) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
如何从输出内容中判断这个ffmpeg执行成功呢?有没有哪些关键字?
多谢各位大神!!!!
|
|