New submission from Janos Barta <[email protected]>:

Hello,

I have a special mpeg2ts transport stream, that contains WSS (widescreen
signaling) information.
The ffmpeg can open that transport stream -and always opens it with the right
aspect ratio-, but can not handle the changes of the screen -during the
transcoding- dynamicly (16:9 <-> 4:3), when I use libx264 codec.

The ffmpeg works (the aspect change) fine, when I use mpeg2video:

ffmpeg -i wss_change.ts -an ./test.ts
        FFmpeg version git-0097d3b, Copyright (c) 2000-2010 the FFmpeg 
developers
          built on Sep 20 2010 15:34:00 with gcc 4.3.2

          configuration: --enable-avfilter --prefix=/usr/ --enable-gpl
--enable-nonfree --enable-postproc --enable-avfilter --enable-pthreads
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdirac
--enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libx264
--enable-libxvid --enable-version3 --enable-shared --enable-libdc1394
--enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libgsm
--enable-librtmp --enable-libnut --enable-libtheora --enable-libvpx
          libavutil     50.26. 0 / 50.26. 0
          libavcore      0. 9. 0 /  0. 9. 0
          libavcodec    52.89. 0 / 52.89. 0
          libavformat   52.78. 4 / 52.78. 4
          libavdevice   52. 2. 2 / 52. 2. 2
          libavfilter    1.38. 3 /  1.38. 3

          libswscale     0.11. 0 /  0.11. 0
          libpostproc   51. 2. 0 / 51. 2. 0
       
        Seems stream 0 codec frame rate differs from container frame rate: 50.00
(50/1) -> 450.00 (450/1)
        Input #0, mpegts, from 'wss_change.ts':
          Duration: 00:00:04.48, start: 3.000000, bitrate: 2628 kb/s
          Program 1
            Stream #0.0[0x800]: Video: h264, yuv420p, 704x576 [PAR 16:11 DAR
16:9], 25.45 fps, 450 tbr, 90k tbn, 50 tbc
            Stream #0.1[0x1f68](hun): Subtitle: [6][0][0][0] / 0x0006
            Stream #0.2[0x1f69]: Data: [6][0][0][0] / 0x0006
            Stream #0.3[0x1f43](hun): Audio: mp2, 48000 Hz, 2 channels, s16, 128
kb/s
            Stream #0.4[0x1f46](eng): Audio: mp2, 48000 Hz, 2 channels, s16, 128
kb/s
        File './test.ts' already exists. Overwrite ? [y/N] y
        [buffer @ 0x143ef00] w:704 h:576 pixfmt:yuv420p
        [mpegts @ 0x1441f20] muxrate VBR, pcr every 6 pkts, sdt every 200,
pat/pmt every 40 pkts
        Output #0, mpegts, to './test.ts':
          Metadata:
            encoder         : Lavf52.78.4
            Stream #0.0: Video: mpeg2video, yuv420p, 704x576 [PAR 16:11 DAR
16:9], q=2-31, 200 kb/s, 90k tbn, 60 tbc
        Stream mapping:
          Stream #0.0 -> #0.0
        Press [q] to stop encoding
        frame= 3986 fps=558 q=31.0 Lsize=    5985kB time=66.42 bitrate=
738.2kbits/s dup=3875 drop=1   
        video:5284kB audio:0kB global headers:0kB muxing overhead 13.266869%
       

It works fine too, when I use mpeg4:

ffmpeg -i wss_change.ts -an ./test.avi
        FFmpeg version git-0097d3b, Copyright (c) 2000-2010 the FFmpeg 
developers
          built on Sep 20 2010 15:34:00 with gcc 4.3.2

          configuration: --enable-avfilter --prefix=/usr/ --enable-gpl
--enable-nonfree --enable-postproc --enable-avfilter --enable-pthreads
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdirac
--enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libx264
--enable-libxvid --enable-version3 --enable-shared --enable-libdc1394
--enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libgsm
--enable-librtmp --enable-libnut --enable-libtheora --enable-libvpx
          libavutil     50.26. 0 / 50.26. 0
          libavcore      0. 9. 0 /  0. 9. 0
          libavcodec    52.89. 0 / 52.89. 0
          libavformat   52.78. 4 / 52.78. 4
          libavdevice   52. 2. 2 / 52. 2. 2
          libavfilter    1.38. 3 /  1.38. 3

          libswscale     0.11. 0 /  0.11. 0
          libpostproc   51. 2. 0 / 51. 2. 0
       
        Seems stream 0 codec frame rate differs from container frame rate: 50.00
(50/1) -> 450.00 (450/1)
        Input #0, mpegts, from 'wss_change.ts':
          Duration: 00:00:04.48, start: 3.000000, bitrate: 2628 kb/s
          Program 1
            Stream #0.0[0x800]: Video: h264, yuv420p, 704x576 [PAR 16:11 DAR
16:9], 25.45 fps, 450 tbr, 90k tbn, 50 tbc
            Stream #0.1[0x1f68](hun): Subtitle: [6][0][0][0] / 0x0006
            Stream #0.2[0x1f69]: Data: [6][0][0][0] / 0x0006
            Stream #0.3[0x1f43](hun): Audio: mp2, 48000 Hz, 2 channels, s16, 128
kb/s
            Stream #0.4[0x1f46](eng): Audio: mp2, 48000 Hz, 2 channels, s16, 128
kb/s
        File './test.avi' already exists. Overwrite ? [y/N] y
        [buffer @ 0x1e8df30] w:704 h:576 pixfmt:yuv420p
        Output #0, avi, to './test.avi':
          Metadata:
            ISFT            : Lavf52.78.4
            Stream #0.0: Video: mpeg4, yuv420p, 704x576 [PAR 16:11 DAR 16:9],
q=2-31, 200 kb/s, 450 tbn, 450 tbc
        Stream mapping:
          Stream #0.0 -> #0.0
        Press [q] to stop encoding
        frame=  111 fps=  0 q=31.0 Lsize=     968kB time=66.43 bitrate=
119.3kbits/s dup=0 drop=1   
        video:261kB audio:0kB global headers:0kB muxing overhead 270.162555%
       


But the aspect change does not correct, when I use libx264 (-vcodec libx264).

ffmpeg -i wss_change.ts -vcodec libx264 -b 410k -bt 200k -maxrate 410k -r 25 -f
mpegts -bufsize 410k -threads 0 -an -qcomp 0.8 -qmin 10 -qmax 51 -qdiff 1 -bf 0
-g 30  test.ts 
FFmpeg version git-0097d3b, Copyright (c) 2000-2010 the FFmpeg developers
  built on Sep 28 2010 15:40:31 with gcc 4.3.2
  configuration: --enable-avfilter --prefix=/usr/ --enable-gpl --enable-nonfree
--enable-postproc --enable-avfilter --enable-pthreads --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libdirac --enable-libfaac
--enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libxvid
--enable-version3 --enable-shared --enable-libdc1394 --enable-libopenjpeg
--enable-libschroedinger --enable-libspeex --enable-libgsm --enable-librtmp
--enable-libnut --enable-libtheora --enable-libvpx
  libavutil     50.26. 0 / 50.26. 0
  libavcore      0. 9. 0 /  0. 9. 0
  libavcodec    52.89. 0 / 52.89. 0
  libavformat   52.78. 4 / 52.78. 4
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.38. 3 /  1.38. 3
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 450.00 (450/1)
Input #0, mpegts, from 'wss_change.ts':
  Duration: 00:00:04.48, start: 3.000000, bitrate: 2628 kb/s
  Program 1 
    Stream #0.0[0x800]: Video: h264, yuv420p, 704x576 [PAR 16:11 DAR 16:9],
25.45 fps, 450 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1f68](hun): Subtitle: [6][0][0][0] / 0x0006
    Stream #0.2[0x1f69]: Data: [6][0][0][0] / 0x0006
    Stream #0.3[0x1f43](hun): Audio: mp2, 48000 Hz, 2 channels, s16, 128 kb/s
    Stream #0.4[0x1f46](eng): Audio: mp2, 48000 Hz, 2 channels, s16, 128 kb/s
File 'test.ts' already exists. Overwrite ? [y/N] y
[buffer @ 0xd8ffa0] w:704 h:576 pixfmt:yuv420p
[libx264 @ 0xd8f560] using SAR=16/11
[libx264 @ 0xd8f560] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle 
SSE4.2
[libx264 @ 0xd8f560] profile Baseline, level 3.0
[mpegts @ 0xd92f20] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every
40 pkts
Output #0, mpegts, to 'test.ts':
  Metadata:
    encoder         : Lavf52.78.4
    Stream #0.0: Video: libx264, yuv420p, 704x576 [PAR 16:11 DAR 16:9], q=10-51,
410 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 1661 fps=263 q=-1.0 Lsize=    3250kB time=66.44 bitrate= 400.7kbits/s
dup=1550 drop=1    
video:2800kB audio:0kB global headers:0kB muxing overhead 16.076300%
[libx264 @ 0xd8f560] frame I:56    Avg QP:19.02  size: 37231
[libx264 @ 0xd8f560] frame P:1605  Avg QP:22.61  size:   487
[libx264 @ 0xd8f560] mb I  I16..4: 23.5%  0.0% 76.5%
[libx264 @ 0xd8f560] mb P  I16..4:  0.5%  0.0%  0.0%  P16..4:  5.8%  0.0%  0.0%
 0.0%  0.0%    skip:93.7%
[libx264 @ 0xd8f560] coded y,uvDC,uvAC intra: 70.8% 80.9% 54.4% inter: 1.3% 1.8%
0.1%
[libx264 @ 0xd8f560] i16 v,h,dc,p: 51% 19% 12% 18%
[libx264 @ 0xd8f560] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14%  6%  6% 13% 15% 17% 10%
12%  7%
[libx264 @ 0xd8f560] i8c dc,h,v,p: 47% 16% 26% 12%
[libx264 @ 0xd8f560] kb/s:345.22


x264 -V
x264 0.105.x
built on Sep 28 2010, gcc: 4.3.2
configuration: --bit-depth=8
x264 license: GPL version 2 or later
libavformat license: nonfree and unredistributable
WARNING: This binary is unredistributable!

Do I need to use any special command in that case? 


Thanks,
Jani
File 'wss_change.ts' not attached - you can download it from 
https://roundup.ffmpeg.org/file1103.

----------
files: wss_change.ts
messages: 12074
priority: normal
status: new
substatus: new
title: ffmpeg h264 wss
type: bug

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2255>
________________________________________________

Reply via email to