Opened 12 years ago

Closed 9 years ago

#679 closed defect (fixed)

DVB subtitles are badly placed (and scaled) on the screen

Reported by: Carl Eugen Hoyos Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: dvbsub mpegts
Cc: mikie@iki.fi Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Attached sample shows subtitles too far right on the screen so that a part cannot be read.
mplayer -demuxer mpegts -sid 593 and mplayer -demuxer lavf -sid 0 show the subtitle at the right position in the center of the screen (but cuts away the upper half).

$ ffmpeg -i subtitles.ts
ffmpeg version N-35086-g530a540, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov 23 2011 00:29:45 with gcc 4.5.3
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32'
  libavutil    51. 26. 0 / 51. 26. 0
  libavcodec   53. 36. 0 / 53. 36. 0
  libavformat  53. 21. 0 / 53. 21. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 49. 0 /  2. 49. 0
  libswscale    2.  1. 0 /  2.  1. 0
[mpeg2video @ 0x8dac120] mpeg_decode_postinit() failure
    Last message repeated 10 times
[mpegts @ 0x8d93a80] max_analyze_duration 5000000 reached at 5016000
[NULL @ 0x8db0420] start time is not set in estimate_timings_from_pts
[NULL @ 0x8dd06c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x8dd6780] start time is not set in estimate_timings_from_pts
[NULL @ 0x8ddca00] start time is not set in estimate_timings_from_pts
[NULL @ 0x8de2c80] start time is not set in estimate_timings_from_pts
[mpegts @ 0x8d93a80] PES packet size mismatch
Input #0, mpegts, from 'subtitles.ts':
  Duration: 00:00:09.17, start: 11318.457333, bitrate: 2233 kb/s
  Program 8270
    Metadata:
      service_name    : ITV1
      service_provider: ITV
  Program 8325
    Metadata:
      service_name    : ITV2
      service_provider: ITV
  Program 8634
    Metadata:
      service_name    : Rabbit
      service_provider: Teletext Limited
  Program 8384
    Metadata:
      service_name    : Channel 4
      service_provider: Channel 4 TV
  Program 8448
    Metadata:
      service_name    : E4
      service_provider: Channel 4 TV
  Program 8442
    Metadata:
      service_name    : More 4
      service_provider: Channel 4 TV
    Stream #0:0[0x24e]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 544x576 [SAR 32:17 DAR 16:9], 15000 kb/s, 26.80 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x24f](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:2[0x250](eng): Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels, s16 (visual impaired)
    Stream #0:3[0x251](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:4[0x84f]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:5[0x911]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:6[0x912]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:7[0xbbb]: Unknown: none ([11][0][0][0] / 0x000B)
  Program 8452
    Metadata:
      service_name    : Channel 4+1
      service_provider: Channel 4 TV
  Program 8577
    Metadata:
      service_name    : Gay Rabbit
      service_provider: Teletext Limited
  Program 8500
    Metadata:
      service_name    : Channel 5
      service_provider: five
  Program 8370
    Metadata:
      service_name    : ITV1 +1
      service_provider: ITV
At least one output file must be specified

Attachments (2)

subtitles.ts (2.4 MB ) - added by Carl Eugen Hoyos 12 years ago.
oversized_pgs_subtitles.mkv (750.1 KB ) - added by Carl Eugen Hoyos 10 years ago.

Change History (8)

by Carl Eugen Hoyos, 12 years ago

Attachment: subtitles.ts added

comment:1 by reimar, 12 years ago

This should be related to something that was discussed previously: ffmpeg/ffplay does not scale bitmap subtitles to match the video resolution.
DVD subtitles are always stored to match a video at PAL/NTSC resolution. I _suspect_ that the same is true for DVB subtitles as used here.
I have not checked but for MPlayer I suspect that it guesses wrong whether the subtitles are for PAL or NTSC.

comment:2 by Carl Eugen Hoyos, 11 years ago

Another sample (with the opposite effect) is in http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2838/

in reply to:  2 comment:3 by Carl Eugen Hoyos, 10 years ago

Replying to cehoyos:

Another sample (with the opposite effect) is in http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2838/

I also uploaded the sample from vlc ticket 10919 with too small teletext subtitles.

by Carl Eugen Hoyos, 10 years ago

Attachment: oversized_pgs_subtitles.mkv added

comment:4 by Mika Raento, 9 years ago

Cc: mikie@iki.fi added

More samples in #4066

comment:5 by Michael Niedermayer, 9 years ago

Status: newopen
Summary: DVB subtitles are badly placed on the screenDVB subtitles are badly placed (and scaled) on the screen

comment:6 by Michael Niedermayer, 9 years ago

Reproduced by developer: set
Resolution: fixed
Status: openclosed

Fixed in 1fc20af6af3ec31d0ee665557885b6c20c6d3686 (for any player which uses the width/height fields like ffplay)
Someone should probably open a separate report for ffmpeg.c

Note: See TracTickets for help on using tickets.