[Ffmpeg-devel] JPEG support in ffmpeg
Chris Wilson
chris
Wed Jul 5 01:26:08 CEST 2006
Hello Herve and all,
On Sat, 1 Jul 2006, [ISO-8859-1] Herv? W. wrote:
> On 01/07/06, Chris Wilson <chris at qwirx.com> wrote:
>> > The manual page says "FFmpeg can use any supported file format and
>> > protocol as input". But this does not seem to be true:
>> >
>> > chris at rocio:/tmp/ffmpeg$ ./ffmpeg -i ~/photos/raw/img_5834.jpg foo.mpg
>> > FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
>> > configuration:
>> > libavutil version: 49.0.0
>> > libavcodec version: 51.9.0
>> > libavformat version: 50.4.0
>> > built on Jun 8 2006 18:29:38, gcc: 4.0.2 20050808 (prerelease) (Ubuntu
>> > 4.0.1-4ubuntu9)
>> > /home/chris/photos/raw/img_5834.jpg: Unknown format
>
> I don't know if jpeg as input is supposed to be supported, but have
> you tried forcing
> it (possibly after applying your hack) with
> -f fmt force format
> like:
> -f image
> or
> -f image2
Thanks for your suggestions, and sorry for the delay in replying. I get
(using a different version of ffmpeg, 0.4.8):
chris at gcc(raw)$ ffmpeg -i img_5834.jpg /tmp/foo.mpg
img_5834.jpg: Unknown format
chris at gcc(raw)$ ffmpeg -i img_5834.jpg -f image /tmp/foo.mpg
img_5834.jpg: Unknown format
chris at gcc(raw)$ ffmpeg -f image -i img_5834.jpg /tmp/foo.mpg
img_5834.jpg: Incorrect image filename syntax.
Use '%d' to specify the image number:
for img1.jpg, img2.jpg, ..., use 'img%d.jpg';
for img001.jpg, img002.jpg, ..., use 'img%03d.jpg'.
chris at gcc(raw)$ ffmpeg -f image2 -i img_5834.jpg /tmp/foo.mpg
Unknown input or output format: image2
I don't want to specify the images using '%d' syntax, because they don't
start at 0001, but perhaps I could rename them if it's the only way.
> and/or
> -img img_fmt force image format
> like:
> -img jpeg
chris at gcc(raw)$ ffmpeg -img jpeg -i img_5834.jpg /tmp/foo.mpg
img_5834.jpg: Unknown format
Incidentally, this version reports:
chris at gcc(raw)$ ffmpeg -formats
[...]
Input image formats: pnm pam pgmyuv yuv png jpeg gif
chris at gcc(raw)$ rpm -qif `which ffmpeg`
Name : ffmpeg Relocations: (not relocatable)
Version : 0.4.8 Vendor: Freshrpms.net
Release : 3.1.fc2.fr Build Date: Wed 19 May 2004
10:11:04 BST
Install Date: Mon 21 Mar 2005 22:53:26 GMT Build Host:
python2.freshrpms.net
Group : System Environment/Libraries Source RPM:
ffmpeg-0.4.8-3.1.fc2.fr.src.rpm
Size : 2155457 License: GPL
Signature : DSA/SHA1, Wed 19 May 2004 10:36:38 BST, Key ID
692ac459e42d547b
Packager : Matthias Saou <matthias.saou at est.une.marmotte.net>
URL : http://ffmpeg.sourceforge.net/
Summary : Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder
and decoder
[...]
> Also, according to http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html
> "Progressive JPEG is not supported".
chris at gcc(raw)$ file img_5834.jpg
img_5834.jpg: JPEG image data, EXIF standard 0.73, 10752 x 2048
I'm pretty sure they are not progressive JPEGs, as GQView renders them in
one pass. I'm not sure why "file" reports a ridiculous horizontal size for
them (they are 3072 x 2048) but GIMP and GQView can read them just fine.
Thanks for your help so far.
Cheers, Chris.
--
_ ___ __ _
/ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |
More information about the ffmpeg-devel
mailing list