thandonguocmo2020 / phpvideotoolkit

Automatically exported from code.google.com/p/phpvideotoolkit
0 stars 0 forks source link

Problem with how "-an" is escaped causing ffmpeg to fail #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When trying to extract a single frame from a flv, phpvideotoolkit is
currently trying something like this, notice the "-an ''"

/usr/bin/ffmpeg -i 'web/uploads/assets/batman.flv' -an ''  -ss '00:00:07.0'
-t '00:00:07.0' -r '15' -vframes '1' -y web/uploads/assets/batman-%12d.jpg

This results in the error:

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man
--incdir=/usr/include/ffmpeg --enable-libmp3lame --enable-libogg
--enable-libvorbis --enable-libfaad --enable-libfaac --enable-libgsm
--enable-xvid --enable-x264 --enable-liba52 --enable-liba52bin --enable-pp
--enable-shared --enable-pthreads --enable-gpl --disable-strip
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jan 11 2008 02:31:29, gcc: 3.4.6 20060404 (Red Hat 3.4.6-9)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 15.00 (15/1)
Input #0, flv, from 'web/uploads/assets/batman.flv':
  Duration: 00:00:28.3, start: 0.000000, bitrate: 64 kb/s
  Stream #0.0: Video: flv, yuv420p, 320x240, 15.00 fps(r)
  Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Unable for find a suitable output format for ''

If I change "-an ''" to "-an" it works okay:

/usr/bin/ffmpeg -i 'web/uploads/assets/batman.flv' -an -ss '00:00:07.0' -t
'00:00:07.0' -r '15' -vframes '1' -y web/uploads/assets/batman-%12d.jpg

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man
--incdir=/usr/include/ffmpeg --enable-libmp3lame --enable-libogg
--enable-libvorbis --enable-libfaad --enable-libfaac --enable-libgsm
--enable-xvid --enable-x264 --enable-liba52 --enable-liba52bin --enable-pp
--enable-shared --enable-pthreads --enable-gpl --disable-strip
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jan 11 2008 02:31:29, gcc: 3.4.6 20060404 (Red Hat 3.4.6-9)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 15.00 (15/1)
Input #0, flv, from 'web/uploads/assets/batman.flv':
  Duration: 00:00:28.3, start: 0.000000, bitrate: 64 kb/s
  Stream #0.0: Video: flv, yuv420p, 320x240, 15.00 fps(r)
  Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Output #0, image2, to 'web/uploads/assets/batman-%12d.jpg':
  Stream #0.0: Video: mjpeg, yuvj420p, 320x240, q=2-31, 200 kb/s, 15.00 fps(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. Do not report crashes to FFmpeg developers.
frame=    1 fps=  0 q=5.5 Lsize=       0kB time=0.1 bitrate=   0.0kbits/s
video:8kB audio:0kB global headers:0kB muxing overhead -100.000000%

Original issue reported on code.google.com by ross.mot...@gmail.com on 23 Jul 2008 at 12:01

GoogleCodeExporter commented 8 years ago
Here is a patch that fixes the problem by setting argument to NULL when the 
command
option needs no argument.

Original comment by i...@tats.name on 18 Aug 2008 at 4:06

Attachments:

GoogleCodeExporter commented 8 years ago
many thanks. this issue will be updated in the next release.

Original comment by bugged...@gmail.com on 24 Sep 2008 at 9:53

GoogleCodeExporter commented 8 years ago
Has now been fixed in the latest svn

Original comment by bugged...@gmail.com on 14 Oct 2008 at 8:09