[FFmpeg-trac] #956(FFmpeg:closed): ffmpeg V0.10 cannot convert to a jpg file, but ffmpeg v0.9 can
FFmpeg
trac at avcodec.org
Mon Jan 30 09:58:34 CET 2012
#956: ffmpeg V0.10 cannot convert to a jpg file, but ffmpeg v0.9 can
-------------------------------------+-------------------------------------
Reporter: | Owner:
chenct1976@… | Status: closed
Type: defect | Component: FFmpeg
Priority: normal | Resolution:
Version: 0.10 | worksforme
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Changes (by cehoyos):
* keywords: convert jpg file Error =>
* status: new => closed
* resolution: => worksforme
* reproduced: 1 => 0
Comment:
Unrelated to your problem that I cannot reproduce:
"-f image2" is superfluous, -vframes is an output option, it has no effect
when used before "-i".
{{{
$ md5sum input.mp4
7ab621d46e9ec4b6d0d2bbd0c697539a input.mp4
$ ffmpeg -ss 20 -vframes 1 -t 0.001 -i input.mp4 -y -f image2 -s 350x240
outfile.jpg
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 30 2012 09:47:43 with gcc 4.5.3
configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf53.31.100
comment : FlixEngineLinux_8.0.16.0 (www.on2.com)
Duration: 00:00:35.03, start: 0.000000, bitrate: 517 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
540x360 [SAR 1:1 DAR 3:2], 383 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95
tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
s16, 128 kb/s
Metadata:
handler_name :
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting
format 'yuvj420p'
[buffer @ 0x13dab40] w:540 h:360 pixfmt:yuv420p tb:1/1000000 sar:1/1
sws_param:
[scale @ 0x13db1a0] w:540 h:360 fmt:yuv420p -> w:350 h:240 fmt:yuvj420p
flags:0x4
Output #0, image2, to 'outfile.jpg':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
comment : FlixEngineLinux_8.0.16.0 (www.on2.com)
encoder : Lavf53.31.100
Stream #0:0(und): Video: mjpeg, yuvj420p, 350x240 [SAR 36:35 DAR 3:2],
q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
[image2 @ 0x13ee3c0] Could not get frame filename number 2 from pattern
'outfile.jpg'
av_interleaved_write_frame(): Invalid argument
$ file outfile.jpg
outfile.jpg: JPEG image data, JFIF standard 1.02, comment: "Lavc53.60.100"
}}}
The error in my output ("Could not get frame filename number 2") can be
avoided with "-vframes 1" after "-i input.mp4", the output file
outfile.jpg is created in any case.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/956#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list