kimastergeorge <[EMAIL PROTECTED]> added the comment:

In MPEG-1 & MPEG-2, creating a video from a series of image files which are 4096
pixels wide will work, but the resulting video does not have the correct
headers. The sequence extension header will not fill in the bits used for
additional size information. In this case, the width will show up as 0 in the
sequence header, as it should, but the 2 bits in the sequence extension which
are intended to extend this will show up as 00 when they should be 01. This
means the width is written as 0, which is not at all the intention.

I have a small patch which fixes this, but the files it generates give an error
when I try to decode them with FFmpeg. I have attached the patch.

Here are the results of encoding with my patch:
$ ./ffmpeg -y -t 1 -an -r 24 -bf 2 -i
~/4KpxVidNEW/shot2_tiffSeq/data/shot2_static_%05d.tiff -vcodec mpeg2video
-qscale 10 too_big.m2v
FFmpeg version SVN-r13943, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: 
  libavutil version: 49.7.0
  libavcodec version: 51.57.2
  libavformat version: 52.16.0
  libavdevice version: 52.0.0
  built on Jun 24 2008 09:55:54, gcc: 4.0.1 (Apple Inc. build 5465)
Input #0, image2, from
'/Users/wuchi/4KpxVidNEW/shot2_tiffSeq/data/shot2_static_%05d.tiff':
  Duration: 00:00:12.50, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: tiff, rgb24, 4096x2048, 24.00 tb(r)
Output #0, mpeg2video, to 'too_big.m2v':
    Stream #0.0: Video: mpeg2video, yuv420p, 4096x2048, q=2-31, 200 kb/s, 24.00
tb(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=   24 fps=  5 q=10.0 Lsize=    1536kB time=0.96 bitrate=13129.8kbits/s    
video:1536kB audio:0kB global headers:0kB muxing overhead 0.000000%

Here are the results of decoding a video created with my patch:
./ffmpeg -y -i too_big.m2v -an -sameq too_big_2.m2v
FFmpeg version SVN-r13943, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: 
  libavutil version: 49.7.0
  libavcodec version: 51.57.2
  libavformat version: 52.16.0
  libavdevice version: 52.0.0
  built on Jun 24 2008 09:55:54, gcc: 4.0.1 (Apple Inc. build 5465)
[mpegvideo @ 0x41e020]Could not find codec parameters (Video: mpeg2video,
4096x2048, 104857 kb/s)
too_big.m2v: could not find codec parameters

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue499>
______________________________________________________

Reply via email to