Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg concat batch loop with text file
4 octobre 2013, par Lisa JacobsI'm trying to batch a concat loop for a series of avi files where I need to add to each AVI a preroll and postroll movie.
Here's what I've tried:
_input.txt
file:file '3D_preroll.avi' file '%%a' file '3D_postroll.avi'
concat.bat
file:for %%a in ("*.avi") do ffmpeg -f concat -i _input.txt -c:v libx264 -b:v 1700k -minrate 1500k -maxrate 1900k -bufsize 1900k -deinterlace -acodec libvo_aacenc -ac 2 -ar 48000 -ab 92k "%%a"_432p.mp4 pause
Unfortunately, I get the following error message before FFMPEG crashes: Impossible to open '%%a'
What am I doing wrong?
Thank you :)
-
Why doesnt this method redirect my output from .exe [ffmpeg] ?
4 octobre 2013, par ExitosI have the method:
public static string StartProcess(string exePathArg, string argumentsArg, int timeToWaitForProcessToExit) { string retMessage = ""; using (Process p = new Process()) { p.StartInfo.FileName = exePathArg; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.Arguments = argumentsArg; p.StartInfo.UseShellExecute = false; try { p.Start(); StreamReader myOutput = p.StandardOutput; retMessage = "STANDARD OUTPUT: " + myOutput.ReadToEnd(); p.WaitForExit(timeToWaitForProcessToExit); } catch (Exception ex) { retMessage = "EXCEPTION THROWN: " + ex.ToString(); } finally { try { p.Kill(); } catch { } } } return retMessage; }
But it doesnt redirect my output to retMessage. Anyone any ideas? I tested the arguments in a bat file and output is definitely output.
Cheers, Pete
-
Hot to copy frame data from FFmpegSource2 (FFMS2) FFMS_Frame struct to OpenCV Mat ?
4 octobre 2013, par YashilI'm trying to read video file using FFmpegSource2 (FFMS2) and then process frames using OpenCV. What is the proper and efficient way to copy frame data from a FFMS_Frame struct returned by FFMS_GetFrame function to an OpenCV Mat?
Thank you very much in advance.
-
How to solve issue for converting ismv file of h264 video codec and aac audio codec ?
4 octobre 2013, par PriyalI want to convert transmux ismv file to mp4 format. ISMV file is encoded withe the following ffmpeg detail:
Metadata: major_brand : isml minor_version : 1 compatible_brands: piffiso2 creation_time : 2013-10-03 14:10:41 Duration: 15:21:13.16, start: 0.000000, bitrate: 41 kb/s Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default) Metadata: creation_time : 2013-10-03 14:10:41 handler_name : Audio Stream #0:1(und): Video: h264 (avc1 / 0x31637661), 1280x720, 3217 kb/s, 29.9 7 tbr, 10000k tbn, 20000k tbc (default) Metadata: creation_time : 2013-10-03 14:10:41 handler_name : Video Stream #0:2(und): Data: none (dfxp / 0x70786664), 32 kb/s (default) Metadata: creation_time : 2013-10-03 14:10:41 handler_name : Text
I used the following ffmpeg command to transmux:
ffmpeg -y -ss 00:00:10 -i Encoder1.ismv -vcodec libx264 -ar 44100 -t 40 -preset slow -qp 0 Encoder.mp4
I got output as:
ffmpeg version N-56010-g54d628a Copyright (c) 2000-2013 the FFmpeg developers built on Sep 4 2013 00:44:27 with gcc 4.7.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo- amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs -- enable-libxvid --enable-zlib libavutil 52. 43.100 / 52. 43.100 libavcodec 55. 31.100 / 55. 31.100 libavformat 55. 16.100 / 55. 16.100 libavdevice 55. 3.100 / 55. 3.100 libavfilter 3. 83.102 / 3. 83.102 libswscale 2. 5.100 / 2. 5.100 libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100 [aac @ 040f1ba0] TYPE_FIL: Input buffer exhausted before END element found [h264 @ 00353120] AVC: nal size -729776398 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size -570515285 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size -1477874754 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size -712314563 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size -23151524 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size -592499201 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size 225768173 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size 698187359 [h264 @ 00353120] AVC: nal size 635127544 [h264 @ 00353120] no frame! [h264 @ 00353120] AVC: nal size -1242688339 [h264 @ 00353120] AVC: nal size 269543071 [h264 @ 00353120] no frame! [mov,mp4,m4a,3gp,3g2,mj2 @ 0035e840] decoding for stream 1 failed [mov,mp4,m4a,3gp,3g2,mj2 @ 0035e840] Could not find codec parameters for stream 1 (Video: h264 (avc1 / 0x31637661), 1280x720, 3217 kb/s): unspecified pixel form at Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\media\archives\DEFAULT WEB S ITE\PushToPUblishPoint\Eagan_12034_Soccer_3-10-2013_14_10_19-isml\2013-10-03-14- 10-35-436\Segment001\Encoder1.ismv': Metadata: major_brand : isml minor_version : 1 compatible_brands: piffiso2 creation_time : 2013-10-03 14:10:41 Duration: 15:21:13.16, start: 0.000000, bitrate: 41 kb/s Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default) Metadata: creation_time : 2013-10-03 14:10:41 handler_name : Audio Stream #0:1(und): Video: h264 (avc1 / 0x31637661), 1280x720, 3217 kb/s, 29.9 7 tbr, 10000k tbn, 20000k tbc (default) Metadata: creation_time : 2013-10-03 14:10:41 handler_name : Video Stream #0:2(und): Data: none (dfxp / 0x70786664), 32 kb/s (default) Metadata: creation_time : 2013-10-03 14:10:41 handler_name : Text [buffer @ 04679480] Unable to parse option value "-1" as pixel format Last message repeated 1 times [buffer @ 04679480] Error setting option pix_fmt to value -1. [graph 0 input from stream 0:1 @ 040f7380] Error applying options to the filter. Error opening filters!
Please suggest the solution for Windows OS
-
Improve the quality of webm video using ffmpeg
3 octobre 2013, par LekeI'm trying out two codecs and was wondering if I could improve the results of the webm output ...
ffmpeg -i test.ts -t 10 -f webm -vcodec libvpx output.webm
to match the quality of the mp4 output...
ffmpeg -i test.ts -t 10 -b 1500k -vcodec libx264 output.mp4
What settings would give me the best webm rip?
Thanks.
Edit: Here is an error output when trying some rip improvements...
ffmpeg -i test.ts -c:v libvpx -crf 4 -b:v 1M -c:a libvorbis output.webm ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Apr 2 2013 17:00:59 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [mpeg2video @ 0x9cde5c0] mpeg_decode_postinit() failure Last message repeated 4 times [mpegts @ 0x9cda240] max_analyze_duration reached [mpegts @ 0x9cda240] PES packet size mismatch Input #0, mpegts, from 'test.ts': Duration: 00:03:59.53, start: 4630.845422, bitrate: 1977 kb/s Stream #0.0[0x20b]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 15000 kb/s, 25.60 fps, 25 tbr, 90k tbn, 50 tbc Stream #0.1[0x28f]: Audio: mp2, 48000 Hz, stereo, s16, 224 kb/s Unrecognized option 'c:v' Failed to set value 'libvpx' for option 'c:v'