Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (56)

Sur d’autres sites (9350)

  • Set timeout on ffmpeg process

    30 octobre 2013, par Thomas Vervik

    Sometims ffmpeg never completes, and thereby preventing conversions of other videos in the queue. Is it possible to set some sort of timeout in ffmpeg such that it terminates if it isnt finished within some given time, example 5 min

    My command looks like this today :

    ffmpeg -i /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141 -y -r 24 -ar 22050 -f mov -vf [in]transpose=1[rt0],[rt0]scale=iw*480/ih:480[sc0],[sc0]pad=640:480:140[pd0],movie=/srv/bsafe/tomcat7/webapps/ROOT/resources/images/logo_watermark.png [wm],[pd0][wm] overlay=W-w-140:0[out] /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141.mov -ar 22050 -b 1500k -vcodec libtheora -acodec libvorbis -f ogg -vf [in]transpose=1[rt0],[rt0]scale=iw*480/ih:480[sc0],[sc0]pad=640:480:140[pd0],movie=/srv/bsafe/tomcat7/webapps/ROOT/resources/images/logo_watermark.png [wm],[pd0][wm] overlay=W-w-140:0[out] /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141.ogg -ar 22050 -vcodec libx264 -profile baseline -vf [in]transpose=1[rt0],[rt0]scale=iw*480/ih:480[sc0],[sc0]pad=640:480:140[pd0],movie=/srv/bsafe/tomcat7/webapps/ROOT/resources/images/logo_watermark.png [wm],[pd0][wm] overlay=W-w-140:0[out] /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141_mp4.mp4

    UPDATE. Thanks LordNeckBerd, you pointed me in right direction !

    So I see now its kind of not ffmpeg really hanging, the issue is that my java code which reads the inputstream from the linux process will block since ffmpeg never returns a end of line, which I see now when Im running the command. This is the blocking line, it waits for more input from me.

    Press [q] to stop, [?] for help

    So its two issues here now. First is why this particular conversion is failing, and second, how to make sure ffmpeg is not making this (for my Java process) blocking command asking for more input.

    C:\Program Files (x86)\Console2>ffmpeg -i C:/projectsGit/bsafe-server/classes/test/bs-   base/video/ac7601e2bc3bc1545cd30ad3160f5232 -y -r 24 -ar 22050 -f mov C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232.mov -ar 22050 -b:v 1500k -vcodec libtheora -acodec libvorbis -f ogg C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232.ogg -ar 22050 -vcodec libx264 -profile:v baseline C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232_mp4.mp4
    ffmpeg version N-54762-g38b701a Copyright (c) 2000-2013 the FFmpeg developers
    built on Jul 15 2013 18:47:20 with gcc 4.7.3 (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-libcaca --enable-libfreetype --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-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable- libx264 --enable-libxavs --enable-libxvid --enable-zlib
    libavutil      52. 39.100 / 52. 39.100
    libavcodec     55. 18.102 / 55. 18.102
    libavformat    55. 12.102 / 55. 12.102
    libavdevice    55.  3.100 / 55.  3.100
    libavfilter     3. 81.101 /  3. 81.101
    libswscale      2.  3.100 /  2.  3.100
    libswresample   0. 17.102 /  0. 17.102
    libpostproc    52.  3.100 / 52.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/projectsGit/bsafe-server/classes/test/bs-  base/video/ac7601e2bc3bc1545cd30ad3160f5232':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2013-01-15 05:46:02
    Duration: 00:00:10.03, start: 0.000000, bitrate: 394 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 264 kb/s, SAR 65536:65536 DAR 4:3, 10.95 fps, 90k tbr, 90k tbn, 180k tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 127 kb/s
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    [ogg @ 00000000027d7860] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2
    [mp4 @ 00000000027dacc0] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2
    [libx264 @ 0000000003e6b9c0] using SAR=1/1
    [libx264 @ 0000000003e6b9c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0000000003e6b9c0] profile High, level 3.0
    [libx264 @ 0000000003e6b9c0] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4 AVC codec -   Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3  deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1  me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1  chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1  interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0  direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40  intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69  qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 00000000027db4a0] using SAR=1/1
    [libx264 @ 00000000027db4a0] MB rate (108000000) > level limit (2073600)
    [libx264 @ 00000000027db4a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 00000000027db4a0] profile Constrained Baseline, level 5.2
    [libx264 @ 00000000027db4a0] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4 AVC codec -  Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=3  deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1  me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1  chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1  interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250  keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0  qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mov, to 'C:/projectsGit/bsafe-server/classes/test/bs-  base/video/ac7601e2bc3bc1545cd30ad3160f5232.mov':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    encoder         : Lavf55.12.102
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1  DAR 4:3], q=-1--1, 12288 tbn, 24 tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (libvo_aacenc) (mp4a / 0x6134706D), 22050 Hz, mono, s16, 128 kb/s
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    Output #1, ogg, to 'C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232.ogg':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    encoder         : Lavf55.12.102
    Stream #1:0(eng): Video: theora (libtheora), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 1500 kb/s, 90k tbn, 90k tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #1:1(eng): Audio: vorbis (libvorbis), 22050 Hz, mono, fltp
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    Output #2, mp4, to 'C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232_mp4.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    encoder         : Lavf55.12.102
    Stream #2:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 90k tbn, 90k tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #2:1(eng): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 22050 Hz, mono, s16, 128 kb/s
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 -> libx264)
    Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
    Stream #0:0 -> #1:0 (h264 -> libtheora)
    Stream #0:1 -> #1:1 (aac -> libvorbis)
    Stream #0:0 -> #2:0 (h264 -> libx264)
    Stream #0:1 -> #2:1 (aac -> libvo_aacenc)
    Press [q] to stop, [?] for help
  • FFMPEG encode video with alpha channel to flv

    29 octobre 2013, par tree

    I'm trying to encode a video (mov) to an flv with alpha channel in FFMPEG but I can't seem to either

    1. find a codec that is supported
    2. find one that actually maintains the alpha

    Does anyone know how to set that up ?

    Thanks,

    ffmpeg -i abc_btr_1280x800_Takeover.mov -vcodec flv -pix_fmt yuv444p -s 1280x800 test4.flv

    here is the report...

    ffmpeg started on 2013-10-25 at 15:47:30
    Report written to "ffmpeg-20131025-154730.log"
    Command line:
    ffmpeg -i abc_btr_1280x800_Takeover.mov -vcodec flv -pix_fmt yuv444p -s 1280x800     test4.flv -report
    ffmpeg version N-57367-g2f31b73 Copyright (c) 2000-2013 the FFmpeg developers
     built on Oct 23 2013 20:34:17 with gcc 4.8.2 (GCC)
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --    disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --    enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-    libfreetype --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-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 47.101 / 52. 47.101
     libavcodec     55. 38.101 / 55. 38.101
     libavformat    55. 19.104 / 55. 19.104
     libavdevice    55.  4.100 / 55.  4.100
     libavfilter     3. 89.100 /  3. 89.100
     libswscale      2.  5.101 /  2.  5.101
     libswresample   0. 17.104 /  0. 17.104
     libpostproc    52.  3.100 / 52.  3.100
    Splitting the commandline.
    Reading option '-i' ... matched as input file with argument     'abc_btr_1280x800_Takeover.mov'.
    Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to     copy stream)) with argument 'flv'.
    Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv444p'.
    Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '1280x800'.
    Reading option 'test4.flv' ... matched as output file.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option report (generate a report) with argument 1.
    Successfully parsed a group of options.
    Parsing a group of options: input file abc_btr_1280x800_Takeover.mov.
    Successfully parsed a group of options.
    Opening an input file: abc_btr_1280x800_Takeover.mov.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000085ac00] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000085ac00] ISO: File Type Major Brand: qt  
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000085ac00] File position before avformat_find_stream_info() is 281624339
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000085ac00] All info found
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000085ac00] File position after avformat_find_stream_info() is 288732
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'abc_btr_1280x800_Takeover.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       creation_time   : 2013-09-22 02:50:18
     Duration: 00:00:10.00, start: 0.000000, bitrate: 225299 kb/s
       Stream #0:0(eng), 1, 1/24: Video: qtrle (rle  / 0x20656C72), bgra, 1280x800, 225293 kb/s, SAR 1280:1280 DAR 8:5, 24 fps, 24 tbr, 24 tbn, 24 tbc (default)
       Metadata:
         creation_time   : 2013-09-22 02:50:18
         handler_name    : Apple Alias Data Handler
         timecode        : 00:00:00:00
       Stream #0:1(eng), 0, 1/24: Data: none (tmcd / 0x64636D74), 0 kb/s (default)
       Metadata:
         creation_time   : 2013-09-22 02:50:22
         handler_name    : Apple Alias Data Handler
         timecode        : 00:00:00:00
    Successfully opened the file.
    Parsing a group of options: output file test4.flv.
    Applying option vcodec (force video codec ('copy' to copy stream)) with argument flv.
    Applying option pix_fmt (set pixel format) with argument yuv444p.
    Applying option s (set frame size (WxH or abbreviation)) with argument 1280x800.
    Successfully parsed a group of options.
    Opening an output file: test4.flv.
    Successfully opened the file.
    detected 4 logical cores
    [graph 0 input from stream 0:0 @ 0000000000303bc0] Setting 'video_size' to value '1280x800'
    [graph 0 input from stream 0:0 @ 0000000000303bc0] Setting 'pix_fmt' to value '30'
    [graph 0 input from stream 0:0 @ 0000000000303bc0] Setting 'time_base' to value '1/24'
    [graph 0 input from stream 0:0 @ 0000000000303bc0] Setting 'pixel_aspect' to value '1280/1280'
    [graph 0 input from stream 0:0 @ 0000000000303bc0] Setting 'sws_param' to value 'flags=2'
    [graph 0 input from stream 0:0 @ 0000000000303bc0] Setting 'frame_rate' to value '24/1'
    [graph 0 input from stream 0:0 @ 0000000000303bc0] w:1280 h:800 pixfmt:bgra tb:1/24 fr:24/1 sar:1/1 sws_param:flags=2
    [scaler for output stream 0:0 @ 00000000003056a0] Setting 'w' to value '1280'
    [scaler for output stream 0:0 @ 00000000003056a0] Setting 'h' to value '800'
    [scaler for output stream 0:0 @ 00000000003056a0] Setting 'flags' to value '0x4'
    [scaler for output stream 0:0 @ 00000000003056a0] w:1280 h:800 flags:'0x4' interl:0
    Incompatible pixel format 'yuv444p' for codec 'flv', auto-selecting format 'yuv420p'
    [format @ 00000000002f8320] compat: called with args=[yuv420p]
    [format @ 00000000002f8320] Setting 'pix_fmts' to value 'yuv420p'
    [AVFilterGraph @ 000000000085bc60] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed
    [scaler for output stream 0:0 @ 00000000003056a0] w:1280 h:800 fmt:bgra sar:1/1 -> w:1280 h:800 fmt:yuv420p sar:1/1 flags:0x4
    [flv @ 0000000000374be0] intra_quant_bias = 0 inter_quant_bias = -64
    Output #0, flv, to 'test4.flv':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       encoder         : Lavf55.19.104
       Stream #0:0(eng), 0, 1/1000: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p,             1280x800 [SAR 1:1 DAR 8:5], q=2-31, 200 kb/s, 1k tbn, 24 tbc (default)
       Metadata:
         creation_time   : 2013-09-22 02:50:18
             handler_name    : Apple Alias Data Handler
             timecode        : 00:00:00:00        
       Stream mapping:
         Stream #0:0 -> #0:0 (qtrle -> flv)
    Press [q] to stop, [?] for help
    frame=   27 fps=0.0 q=31.0 size=     351kB time=00:00:01.12 bitrate=2554.2kbits/s    
    frame=   46 fps= 45 q=31.0 size=     477kB time=00:00:01.91 bitrate=2039.5kbits/s    
    frame=   60 fps= 39 q=31.0 size=     543kB time=00:00:02.50 bitrate=1779.4kbits/s    
    frame=   74 fps= 36 q=31.0 size=     629kB time=00:00:03.08 bitrate=1672.4kbits/s    
    frame=   96 fps= 37 q=31.0 size=     795kB time=00:00:04.00 bitrate=1627.4kbits/s    
    frame=  123 fps= 40 q=31.0 size=     924kB time=00:00:05.12 bitrate=1477.0kbits/s    
    frame=  149 fps= 41 q=31.0 size=    1133kB time=00:00:06.20 bitrate=1494.7kbits/s    
    frame=  175 fps= 43 q=31.0 size=    1224kB time=00:00:07.29 bitrate=1375.5kbits/s    
    frame=  201 fps= 44 q=31.0 size=    1352kB time=00:00:08.37 bitrate=1322.7kbits/s    
    frame=  228 fps= 45 q=31.0 size=    1461kB time=00:00:09.50 bitrate=1260.1kbits/s    
    [output stream 0:0 @ 00000000003053c0] EOF on sink link output stream 0:0:default.
    No more output streams to write to, finishing.
    frame=  240 fps= 45 q=31.0 Lsize=    1600kB time=00:00:10.00 bitrate=1310.4kbits/s    

    video:1596kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.252476%
    240 frames successfully decoded, 0 decoding errors
    [AVIOContext @ 000000000032dfc0] Statistics: 3 seeks, 242 writeouts
    [AVIOContext @ 000000000085bde0] Statistics: 281664506 bytes read, 3 seeks
  • Unable to transcode video using ffmpeg transcoder

    28 octobre 2014, par user1843970

    This question may be asked in different forums but still answer is not discovered yet.

    I am trying to play *.flv using Video Module and FFMPEG Converter.
    Whenever I upload any flv Video , I get the following message :-

    PHPVideoToolkit error : Execute error. It was not possible to encode "C :\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_3.flv" as FFmpeg returned an error. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".

    Installed Modules are :-

    Video - 7.x-2.9

    Video.js - 7.x-2.3 - Version : 4.0.3

    Video transcoder : FFmpeg / avconv : git : c2dd5a1

    JW Player

    All above are installed correctly.

    Configuration of Video Module :-

    Inside Player Tab of Video(admin/config/media/video/players), following has been configured :-

    enter image description here

    A New FLV Preset has been created and added under Preset Tab of Video(admin/config/media/video/presets). Details are as Follows :-

    Preset name :- FLV Preset

    Video output extension :- FLV Flash Video

    Video codec :- H 263/H263-1996,H263+/H0-º1998/H263 Version 2(Not sure about Video Codec)

    FFmpeg video preset :- None

    Video quality :-None

    Video speed :- None

    Dimensions :- 640 X 360

    Aspect mode :- Preserve Aspect Ratio

    When I am uploading the video from content type then it extract the thumbnail as follows :-

    enter image description here

    After saving the video it shows the following Mesage :-

    enter image description here

    My gut feeling is that I am setting up wrong preset but I am not able to solve this problem out. Please help me as I am very close to my completion of project which would have been waste without solving the problem.

    Updated :-

    The Console message is as follows :-

    Reported errors

    PHPVideoToolkit error : Execute error. It was not possible to encode "C :\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_19.flv" as FFmpeg returned an error. Note, however the error was encountered on the second pass of the encoding process and the first pass appear to go fine. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".

    Executed commands and output

    /ffmpeg/ffmpeg.exe -i "C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv" -strict experimental -vcodec "h264" -s "320x180" -acodec "aac" -ac "2" -pass "1" -passlogfile "C:\xampp\tmp/1384191046-5281144682cfc-multipass"  -y C:\xampp\tmp/1384191046-5281144681e51.flv

    ffmpeg version N-49610-gc2dd5a1 Copyright (c) 2000-2013 the FFmpeg developers
     built on Feb  5 2013 13:26:02 with gcc 4.7.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --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-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 17.101 / 52. 17.101
     libavcodec     54. 91.100 / 54. 91.100
     libavformat    54. 61.104 / 54. 61.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 35.101 /  3. 35.101
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [flv @ 00000000002fb860] max_analyze_duration 5000000 reached at 5018000 microseconds
    Input #0, flv, from 'C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
     Duration: 00:00:06.00, start: 0.000000, bitrate: 118 kb/s
       Stream #0:0: Video: vp6f, yuv420p, 360x288, 409 kb/s, 1k tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 96 kb/s
    [libx264 @ 0000000002457340] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
    [libx264 @ 0000000002457340] profile Main, level 4.0
    [libx264 @ 0000000002457340] 264 - core 129 r2245 bc13772 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, flv, to 'C:\xampp\tmp/1384191046-5281144681e51.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
       encoder         : Lavf54.61.104
       Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 320x180, q=-1--1, pass 1, 1k tbn, 1k tbc
       Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (vp6f -> libx264)
     Stream #0:1 -> #0:1 (mp3 -> aac)
    Press [q] to stop, [?] for help
    frame=    2 fps=0.0 q=-1.0 Lsize=     102kB time=00:00:06.10 bitrate= 136.7kbits/s
    video:2kB audio:95kB subtitle:0 global headers:0kB muxing overhead 4.978013%
    [libx264 @ 0000000002457340] frame I:1     Avg QP:11.95  size:  1595
    [libx264 @ 0000000002457340] frame P:1     Avg QP: 2.00  size:    21
    [libx264 @ 0000000002457340] mb I  I16..4: 86.3%  0.0% 13.8%
    [libx264 @ 0000000002457340] mb P  I16..4:  0.4%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:99.6%
    [libx264 @ 0000000002457340] coded y,uvDC,uvAC intra: 13.8% 40.7% 32.8% inter: 0.0% 0.0% 0.0%
    [libx264 @ 0000000002457340] i16 v,h,dc,p: 80% 15%  4%  0%
    [libx264 @ 0000000002457340] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 42% 21%  0%  0%  0%  0%  0%  0%
    [libx264 @ 0000000002457340] i8c dc,h,v,p: 45% 24% 31%  0%
    [libx264 @ 0000000002457340] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0000000002457340] kb/s:1.08

    /ffmpeg/ffmpeg.exe -i "C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv" -strict experimental -vcodec "h264" -s "320x180" -acodec "aac" -ac "2" -pass "2" -passlogfile "C:\xampp\tmp/1384191046-5281144682cfc-multipass"  -y C:\xampp\tmp/1384191046-5281144681e51.flv

    ffmpeg version N-49610-gc2dd5a1 Copyright (c) 2000-2013 the FFmpeg developers
     built on Feb  5 2013 13:26:02 with gcc 4.7.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --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-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 17.101 / 52. 17.101
     libavcodec     54. 91.100 / 54. 91.100
     libavformat    54. 61.104 / 54. 61.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 35.101 /  3. 35.101
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [flv @ 00000000002fb860] max_analyze_duration 5000000 reached at 5018000 microseconds
    Input #0, flv, from 'C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
     Duration: 00:00:06.00, start: 0.000000, bitrate: 118 kb/s
       Stream #0:0: Video: vp6f, yuv420p, 360x288, 409 kb/s, 1k tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 96 kb/s
    [libx264 @ 00000000024e7340] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
    [libx264 @ 00000000024e7340] constant rate-factor is incompatible with 2pass.
    Output #0, flv, to 'C:\xampp\tmp/1384191046-5281144681e51.flv':
     Metadata:
       audiodelay      : 0
       canSeekToEnd    : true
       Stream #0:0: Video: h264, yuv420p, 320x180, q=-1--1, pass 2, 90k tbn, 1k tbc
       Stream #0:1: Audio: none, 44100 Hz, stereo, fltp, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (vp6f -> libx264)
     Stream #0:1 -> #0:1 (mp3 -> aac)
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    I am not Unix Wizard to get the things out of this. Please help me in suggesting the right path.