Opened 14 years ago
Closed 14 years ago
#301 closed defect (fixed)
Problems encoding stills to video after v.5 to v.7 upgrade
Reported by: | Daniel Wilkinson | Owned by: | Michael Niedermayer |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | encoding stills |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I am trying to encode image stills into a video.
I have had success with encoding both PNG and JPEG stills to mpeg-1 with ffmpeg v.5.
I upgraded to v.7 with the intent of experimenting WEBM when things started to get strange.
The mpg output has an image that is mangled and colors that are wrong when viewed in WMP.
The mp4 output has a correct image but the quality is very low in QT.
I modeled these two command strings from your FAQ suggestion. Only the '-f image2' is new to what I used before.
I applied the FAQ suggestions regarding increasing MPEG4 quality and the output actually got smaller.
ffmpeg -y -f image2 -i sxi_%04d.jpg noaa_dcw_imageMangled_colorsWrong.mpg
ffmpeg -y -f image2 -i sxi_%04d.jpg -vcodec libx264 noaa_dcw_imageCorrect_veryLowQuality.mp4
All input and output files can be found here: http://satdat.ngdc.noaa.gov/sxi/dataexport/xComboOut/
I can also upload them to your site if you wish.
Attachments (5)
Change History (8)
by , 14 years ago
Attachment: | noaa_dcw_imageMangled_colorsWrong_mpg_consoleOutput.txt added |
---|
by , 14 years ago
Attachment: | noaa_dcw_imageCorrect_veryLowQuality_mp4_consoleOutput.txt added |
---|
Console output for mp4.
follow-up: 2 comment:1 by , 14 years ago
Component: | FFmpeg → undetermined |
---|---|
Status: | new → open |
Version: | 0.7.1 → unspecified |
Your jpgs produce a fine mpg for me with ffmpeg -i sxi_00%2d.jpg out.mpg and I get no decoding errors.
Please test a supported version of FFmpeg, that is either latest git (preferred) or 0.7.1 (the version you tested is much older) or 0.8.
Please try to avoid --extra-cflags if compilation succeeds without them, if you believe some of them make sense, please report so they can be added automatically.
(Irrelevant stack alignment warning cut.)
$ ffmpeg -i sxi_00%2d.jpg out.mpg ffmpeg version N-30996-gf925b24, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 24 2011 22:26:42 with gcc 2.95.3 20010315 (release) configuration: --cc=/usr/local/gcc-2.95.3/bin/gcc --disable-sse libavutil 51. 10. 0 / 51. 10. 0 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 Duration: 00:00:02.12, start: 0.000000, bitrate: N/A Stream #0.0: Video: mjpeg, yuvj420p, 720x864 [PAR 1:1 DAR 5:6], 25 fps, 25 tbr, 25 tbn, 25 tbc Incompatible pixel format 'yuvj420p' for codec 'mpeg1video', auto-selecting format 'yuv420p' [buffer @ 0x8c882f0] w:720 h:864 pixfmt:yuvj420p tb:1/1000000 sar:1/1 sws_param: [buffersink @ 0x8c856c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0x8c87a60] w:720 h:864 fmt:yuvj420p -> w:720 h:864 fmt:yuv420p flags:0x4 [mpeg @ 0x8c80e70] VBV buffer size not set, muxing may fail Output #0, mpeg, to 'out.mpg': Metadata: encoder : Lavf53.4.0 Stream #0.0: Video: mpeg1video, yuv420p, 720x864 [PAR 1:1 DAR 5:6], q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help frame= 53 fps= 0 q=31.0 Lsize= 394kB time=00:00:02.08 bitrate=1551.8kbits/s video:390kB audio:0kB global headers:0kB muxing overhead 0.952586%
(I did not test x264 output, but I assume some defaults changed if the quality seems worse to you compared to older versions of FFmpeg and x264.)
comment:2 by , 14 years ago
Replying to cehoyos:
Thank you for your help!
I had my admin install v.8 and all is well. Now to choose a format that will please the masses.
Dan
Your jpgs produce a fine mpg for me with ffmpeg -i sxi_00%2d.jpg out.mpg and I get no decoding errors.
Please test a supported version of FFmpeg, that is either latest git (preferred) or 0.7.1 (the version you tested is much older) or 0.8.
Please try to avoid --extra-cflags if compilation succeeds without them, if you believe some of them make sense, please report so they can be added automatically.
(Irrelevant stack alignment warning cut.)
$ ffmpeg -i sxi_00%2d.jpg out.mpg ffmpeg version N-30996-gf925b24, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 24 2011 22:26:42 with gcc 2.95.3 20010315 (release) configuration: --cc=/usr/local/gcc-2.95.3/bin/gcc --disable-sse libavutil 51. 10. 0 / 51. 10. 0 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 Duration: 00:00:02.12, start: 0.000000, bitrate: N/A Stream #0.0: Video: mjpeg, yuvj420p, 720x864 [PAR 1:1 DAR 5:6], 25 fps, 25 tbr, 25 tbn, 25 tbc Incompatible pixel format 'yuvj420p' for codec 'mpeg1video', auto-selecting format 'yuv420p' [buffer @ 0x8c882f0] w:720 h:864 pixfmt:yuvj420p tb:1/1000000 sar:1/1 sws_param: [buffersink @ 0x8c856c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0x8c87a60] w:720 h:864 fmt:yuvj420p -> w:720 h:864 fmt:yuv420p flags:0x4 [mpeg @ 0x8c80e70] VBV buffer size not set, muxing may fail Output #0, mpeg, to 'out.mpg': Metadata: encoder : Lavf53.4.0 Stream #0.0: Video: mpeg1video, yuv420p, 720x864 [PAR 1:1 DAR 5:6], q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help frame= 53 fps= 0 q=31.0 Lsize= 394kB time=00:00:02.08 bitrate=1551.8kbits/s video:390kB audio:0kB global headers:0kB muxing overhead 0.952586%(I did not test x264 output, but I assume some defaults changed if the quality seems worse to you compared to older versions of FFmpeg and x264.)
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Console output for mpg