encoding TO jpeg fails
Am Donnerstag, den 29.03.2007, 11:35 +0200 schrieb ffmpeg-user-request at mplayerhq.hu:
Message: 5 Date: Thu, 29 Mar 2007 08:34:09 +0200 From: Benoit Fouet <benoit.fouet at purplelabs.com> Subject: Re: [Ffmpeg-user] encoding TO jpeg fails To: FFmpeg user questions and RTFMs <ffmpeg-user at mplayerhq.hu> Message-ID: <460B5DE1.6070109 at purplelabs.com> Content-Type: text/plain; charset=ISO-8859-15
Hi,
Karl H. Beckers wrote:
Hi all, this fails for me:
../../ffmpeg-svn8539/ffmpeg -i test-0000.png -vcodec jpegls -f image2 \ test.jpg
unless you give the entire command output, i guess you are very unlikely to be helped
alright then, I just thought it looked completely normal: kb87850 at ubuntu:~/Quellen/xvidcap/trunk$ ../../ffmpeg-svn8539/ffmpeg -i test-0000.png -vcodec jpegls -f image2 test.jpg FFmpeg version SVN-r8539, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-libmp3lame --enable-pthreads --enable-swscaler --disable-ffserver --disable-ffplay libavutil version: 49.4.0 libavcodec version: 51.40.2 libavformat version: 51.11.0 built on Mar 28 2007 17:22:19, gcc: 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Input #0, image2, from 'test-0000.png': Duration: 00:00:00.0, start: 0.000000, bitrate: N/A Stream #0.0: Video: png, rgb32, 192x144, 25.00 fps(r) Output #0, image2, to 'test.jpg': Stream #0.0: Video: jpegls, bgr24, 192x144, q=2-31, 200 kb/s, 25.00 fps(c) Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding frame= 1 fps= 0 q=0.0 Lsize= 0kB time=0.0 bitrate= 0.0kbits/s video:28kB audio:0kB global headers:0kB muxing overhead -100.000000%
i can encode to jpeg, there is no reason why you could not ;)
Have you actually TRIED opening the resulting file? eog just does nothing, gimp says "Unsupported marker type 0xf7". If I do the same conversion with ImageMagick (like in the above example, convert test-0000.png test-2.jpg) that works OK (so it's not the source png, right?). The convert yields test-2.jpg with 17101 bytes off a png with 56056 where the ffmpeg conversion yields a jpeg with 28546 bytes (though I suppose some fuzziness is to be expected here.) Could you give an example of a working command line that produced jpeg output? Thanks, Karl.
Hi, Karl H. Beckers wrote: [snip]
Could you give an example of a working command line that produced jpeg output?
ffmpeg -i foo.png -f image2 bar.jpg Ben
Benoit Fouet wrote:
Hi,
Karl H. Beckers wrote: [snip]
Could you give an example of a working command line that produced jpeg output?
ffmpeg -i foo.png -f image2 bar.jpg
As the output messages (should) show, this uses codec mjpeg. The OP wants jpegls (maybe). If I add -vcodec jpegls to the above command I get: ../ffmpeg -i brol.png -f image2 -vcodec jpegls brol.jpg FFmpeg version SVN-r8448, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl libavutil version: 49.4.0 libavcodec version: 51.40.0 libavformat version: 51.11.0 built on Mar 29 2007 12:21:31, gcc: 3.3.5 (Debian 1:3.3.5-13) Input #0, image2, from 'brol.png': Duration: 00:00:00.0, start: 0.000000, bitrate: N/A Stream #0.0: Video: png, rgb24, 352x288, 25.00 fps(r) Output #0, image2, to 'brol.jpg': Stream #0.0: Video: jpegls, rgb24, 352x288, q=2-31, 200 kb/s, 25.00 fps(c) Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding frame= 1 fps= 0 q=0.0 Lsize= 0kB time=0.0 bitrate= 0.0kbits/s video:139kB audio:0kB global headers:0kB muxing overhead -100.000000% And gimp indeed complains on the file about 'Unsupported marker type 0xf7'. Is it OK to have jpegls in a .jpg file? Note the strange behaviour of ffmpeg on the resulting file: ffmpeg -f image2 -i brol.jpg -f image2 -vcodec bmp brol.bmp FFmpeg version SVN-r8448, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl libavutil version: 49.4.0 libavcodec version: 51.40.0 libavformat version: 51.11.0 built on Mar 29 2007 12:21:31, gcc: 3.3.5 (Debian 1:3.3.5-13) Input #0, image2, from 'brol.jpg': Duration: 00:00:00.0, start: 0.000000, bitrate: N/A Stream #0.0: Video: mjpeg, rgb24, 352x288, 25.00 fps(r) Output #0, image2, to 'brol.bmp': Stream #0.0: Video: bmp, bgr24, 352x288, q=2-31, 200 kb/s, 25.00 fps(c) Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding frame= 1 fps= 0 q=0.0 Lsize= 0kB time=0.0 bitrate= 0.0kbits/s video:297kB audio:0kB global headers:0kB muxing overhead -100.000000% (visu OK) ffmpeg -f image2 -vcodec jpegls -i brol.jpg -f image2 -vcodec bmp brol.bmp FFmpeg version SVN-r8448, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl libavutil version: 49.4.0 libavcodec version: 51.40.0 libavformat version: 51.11.0 built on Mar 29 2007 12:21:31, gcc: 3.3.5 (Debian 1:3.3.5-13) [image2 @ 0x83d0de0]Could not find codec parameters (Video: 0x0000) brol.jpg: could not find codec parameters -- Michel Bardiaux R&D Director T +32 [0] 2 790 29 41 F +32 [0] 2 790 29 02 E mailto:mbardiaux at mediaxim.be Mediaxim NV/SA Vorstlaan 191 Boulevard du Souverain Brussel 1160 Bruxelles http://www.mediaxim.com/
Hi, Michel Bardiaux wrote:
Benoit Fouet wrote:
Hi,
Karl H. Beckers wrote: [snip]
Could you give an example of a working command line that produced jpeg output?
ffmpeg -i foo.png -f image2 bar.jpg
As the output messages (should) show, this uses codec mjpeg. indeed. But i cannot really see the difference between jpeg and mjpeg anyway, especially for a single frame...
The OP wants jpegls (maybe). If I add -vcodec jpegls to the above command I get:
he asked for jpeg output, i gave him the simplest way to achieve it :) Ben
Benoit Fouet wrote:
Hi,
Michel Bardiaux wrote:
Benoit Fouet wrote:
Hi,
Karl H. Beckers wrote: [snip]
Could you give an example of a working command line that produced jpeg output?
ffmpeg -i foo.png -f image2 bar.jpg As the output messages (should) show, this uses codec mjpeg. indeed. But i cannot really see the difference between jpeg and mjpeg anyway, especially for a single frame...
There is none, and indeed there is no jpeg codec in ffmpeg. Only mjpeg.
The OP wants jpegls (maybe). If I add -vcodec jpegls to the above command I get:
he asked for jpeg output, i gave him the simplest way to achieve it :)
Ben
Let's get this straight. The initial message gave a command line with -vcodec jpegls to a .jpg file, and I took it for granted that was what the OP wanted, and went on from there. You misread the OP, or you guessed, that he actually wanted plain good old jpeg. That was indeed what he *meant*, but not what he *said*. HaND, -- Michel Bardiaux R&D Director T +32 [0] 2 790 29 41 F +32 [0] 2 790 29 02 E mailto:mbardiaux at mediaxim.be Mediaxim NV/SA Vorstlaan 191 Boulevard du Souverain Brussel 1160 Bruxelles http://www.mediaxim.com/
Michel Bardiaux wrote:
Benoit Fouet wrote:
Hi,
Michel Bardiaux wrote:
Benoit Fouet wrote:
Hi,
Karl H. Beckers wrote: [snip]
Could you give an example of a working command line that produced jpeg output?
ffmpeg -i foo.png -f image2 bar.jpg As the output messages (should) show, this uses codec mjpeg. indeed. But i cannot really see the difference between jpeg and mjpeg anyway, especially for a single frame...
There is none, and indeed there is no jpeg codec in ffmpeg. Only mjpeg.
The OP wants jpegls (maybe). If I add -vcodec jpegls to the above command I get:
he asked for jpeg output, i gave him the simplest way to achieve it :)
Ben
Let's get this straight. The initial message gave a command line with -vcodec jpegls to a .jpg file, and I took it for granted that was what the OP wanted, and went on from there.
You misread the OP, or you guessed, that he actually wanted plain good old jpeg. That was indeed what he *meant*, but not what he *said*. or i only read what he lastly asked: [quote] Could you give an example of a working command line that produced jpeg output? [/quote]
anyway, as i told in the other thread, this may be a bug, but i don't know... Ben
Karl H. Beckers wrote:
Am Donnerstag, den 29.03.2007, 11:35 +0200 schrieb ffmpeg-user-request at mplayerhq.hu:
Message: 5 Date: Thu, 29 Mar 2007 08:34:09 +0200 From: Benoit Fouet <benoit.fouet at purplelabs.com> Subject: Re: [Ffmpeg-user] encoding TO jpeg fails To: FFmpeg user questions and RTFMs <ffmpeg-user at mplayerhq.hu> Message-ID: <460B5DE1.6070109 at purplelabs.com> Content-Type: text/plain; charset=ISO-8859-15
Hi,
Karl H. Beckers wrote:
Hi all, this fails for me:
../../ffmpeg-svn8539/ffmpeg -i test-0000.png -vcodec jpegls -f image2 \ test.jpg
unless you give the entire command output, i guess you are very unlikely to be helped
alright then, I just thought it looked completely normal:
You never know.
kb87850 at ubuntu:~/Quellen/xvidcap/trunk$ ../../ffmpeg-svn8539/ffmpeg -i test-0000.png -vcodec jpegls -f image2 test.jpg FFmpeg version SVN-r8539, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-libmp3lame --enable-pthreads --enable-swscaler --disable-ffserver --disable-ffplay libavutil version: 49.4.0 libavcodec version: 51.40.2 libavformat version: 51.11.0 built on Mar 28 2007 17:22:19, gcc: 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) Input #0, image2, from 'test-0000.png': Duration: 00:00:00.0, start: 0.000000, bitrate: N/A Stream #0.0: Video: png, rgb32, 192x144, 25.00 fps(r) Output #0, image2, to 'test.jpg': Stream #0.0: Video: jpegls, bgr24, 192x144, q=2-31, 200 kb/s, 25.00 fps(c) Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding frame= 1 fps= 0 q=0.0 Lsize= 0kB time=0.0 bitrate= 0.0kbits/s video:28kB audio:0kB global headers:0kB muxing overhead -100.000000%
i can encode to jpeg, there is no reason why you could not ;)
Have you actually TRIED opening the resulting file? eog just does nothing, gimp says "Unsupported marker type 0xf7".
I can confirm that.
If I do the same conversion with ImageMagick (like in the above example, convert test-0000.png test-2.jpg) that works OK (so it's not the source png, right?). The convert yields test-2.jpg with 17101 bytes off a png with 56056 where the ffmpeg conversion yields a jpeg with 28546 bytes (though I suppose some fuzziness is to be expected here.)
The 'convert' uses the normal IJPG codec, *not* jpegls. So it doesnt prove anything.
Could you give an example of a working command line that produced jpeg output?
If you want garden-variety jpeg, use -vcodec mjpeg. If you really want jpegls, see my other message. -- Michel Bardiaux R&D Director T +32 [0] 2 790 29 41 F +32 [0] 2 790 29 02 E mailto:mbardiaux at mediaxim.be Mediaxim NV/SA Vorstlaan 191 Boulevard du Souverain Brussel 1160 Bruxelles http://www.mediaxim.com/
participants (3)
-
benoit.fouet@purplelabs.com -
karl.h.beckers@gmx.net -
mbardiaux@mediaxim.be