[FFmpeg-devel] [PATCH] Bluray Subtitle Support, v7 (Updated patch to v12)

Carl Eugen Hoyos cehoyos
Tue Aug 25 23:23:08 CEST 2009


On 2009-08-25 09:19, Reimar D?ffinger wrote:
> Do we have a sample file?

incoming/sample-dts-not-valid-dca-frame.m2ts

> Has someone tested transcoding to e.g. dvd or 
> xsub subtitles?

ffplay shows subtitles, ffmpeg -scodec copy produces a file that contains no 
subtitles (same size as without -scodec), ffmpeg -scodec dvdsub and -scodec 
xsub fail badly:

(gdb) r -i sample-dts-not-valid-dca-frame.m2ts -vcodec mpeg2video -ac 
2 -scodec dvdsub test.mpeg
Starting program: ffmpeg_g -i sample-dts-not-valid-dca-frame.m2ts -vcodec 
mpeg2video -ac 2 -scodec dvdsub test.mpeg
[Thread debugging using libthread_db enabled]
FFmpeg version SVN-r19703, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  
configuration: --cc=/opt/intel/cce/10.1.023/bin/icc --cpu=core2 --enable-gpl --extra-cflags=-parallel --extra-ldflags=-parallel --enable-postproc --enable-avfilter --enable-pthreads --enable-nonfree --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --extra-cflags='-I/usr/include/openjpeg -I/usr/include/gsm' --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.33. 0 / 52.33. 0
  libavformat   52.38. 0 / 52.38. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    0. 5. 0 /  0. 5. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Aug 25 2009 22:37:39, gcc: Intel(R) C++ gcc 4.3 mode

Seems stream 0 codec frame rate differs from container frame rate: 47.95 
(48000/1001) -> 23.98 (24000/1001)
Input #0, mpegts, from 'sample-dts-not-valid-dca-frame.m2ts':
  Duration: 00:00:53.17, start: 11.608978, bitrate: 16276 kb/s
  Program 1
    Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 
23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0.1[0x1100]: Audio: dca, 48000 Hz, 5.1, s16, 1536 kb/s
    Stream #0.2[0x1101]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
    Stream #0.3[0x1102]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
    Stream #0.4[0x1103]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
    Stream #0.5[0x1200]: Subtitle: pgssub
    Stream #0.6[0x1201]: Subtitle: pgssub
    Stream #0.7[0x1202]: Subtitle: pgssub
    Stream #0.8[0x1203]: Subtitle: pgssub
    Stream #0.9[0x1204]: Subtitle: pgssub
    Stream #0.10[0x1205]: Subtitle: pgssub
    Stream #0.11[0x1206]: Subtitle: pgssub
    Stream #0.12[0x1207]: Subtitle: pgssub
    Stream #0.13[0x1208]: Subtitle: pgssub
    Stream #0.14[0x1209]: Subtitle: pgssub
    Stream #0.15[0x120a]: Subtitle: pgssub
    Stream #0.16[0x120b]: Subtitle: pgssub
    Stream #0.17[0x120c]: Subtitle: pgssub
    Stream #0.18[0x120d]: Subtitle: pgssub
    Stream #0.19[0x120e]: Subtitle: pgssub
[New Thread 0x7f198ae6e700 (LWP 21587)]
[New Thread 0x4091b950 (LWP 21590)]
[New Thread 0x40d1c950 (LWP 21591)]
Output #0, mpeg, to 'test.mpeg':
    Stream #0.0: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 
q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
    Stream #0.1: Audio: mp2, 48000 Hz, 2 channels, s16, 64 kb/s
    Stream #0.2: Subtitle: dvdsub
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
  Stream #0.5 -> #0.2
Press [q] to stop encoding
frame= 1084 fps= 43 q=31.0 size=       0kB time=44.57 bitrate=   0.0kbits/s
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f198ae6e700 (LWP 21587)]
output_packet (ist=0x49d4380, ist_index=21927172, ost_table=0x1, 
nb_ostreams=1037, pkt=0x7fff92ea18fc) at ffmpeg.c:1366
1366            if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) {
(gdb) bt
#0  output_packet (ist=0x49d4380, ist_index=21927172, ost_table=0x1, 
nb_ostreams=1037, pkt=0x7fff92ea18fc) at ffmpeg.c:1366
#1  0x000000000040bf46 in av_encode (output_files=0x49d4380, 
nb_output_files=21927172, input_files=0x1, nb_input_files=1037, 
stream_maps=0x7fff92ea18fc, nb_stream_maps=0) at ffmpeg.c:2274
#2  0x000000000040984c in main (argc=77415296, argv=0x14e9504) at 
ffmpeg.c:3970
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x40d032 to 0x40d072:
0x000000000040d032 <output_packet+1102>:        decl   0x1(%rax)
0x000000000040d035 <output_packet+1105>:        sub    %cl,-0x44(%r11,%r9,4)
0x000000000040d03a <output_packet+1110>:        and    $0xd0,%al
0x000000000040d03c <output_packet+1112>:        add    (%rax),%eax
0x000000000040d03e <output_packet+1114>:        add    %al,-0x4c(%rcx,%rcx,4)
0x000000000040d042 <output_packet+1118>:        and    $0xbc,%al
0x000000000040d044 <output_packet+1120>:        add    (%rax),%eax
0x000000000040d046 <output_packet+1122>:        add    %al,%bh
0x000000000040d048 <output_packet+1124>:        test   %ah,(%rax,%rbx,8)
0x000000000040d04b <output_packet+1127>:        add    (%rax),%eax
0x000000000040d04d <output_packet+1129>:        add    %al,(%rax)
0x000000000040d04f <output_packet+1131>:        add    %al,(%rax)
0x000000000040d051 <output_packet+1133>:        add    %cl,0x51(%rbx,%rcx,4)
0x000000000040d055 <output_packet+1137>:        or     %al,0x31(%rbp)
0x000000000040d058 <output_packet+1140>:        testb  $0x82,-0x75(%rcx)
0x000000000040d05c <output_packet+1144>:        or     %al,(%rcx)
0x000000000040d05e <output_packet+1146>:        add    %al,(%rax)
0x000000000040d060 <output_packet+1148>:        test   %eax,%eax
0x000000000040d062 <output_packet+1150>:        jne    0x40d1cc 
<output_packet+1512>
0x000000000040d068 <output_packet+1156>:        mov    0xaf221e(%rip),%edx        
# 0xeff28c <do_deinterlace.0>
0x000000000040d06e <output_packet+1162>:        xor    %r9d,%r9d
0x000000000040d071 <output_packet+1165>:        test   %edx,%edx
End of assembler dump.
(gdb) info all-registers
rax            0x1      1
rbx            0x141e950        21096784
rcx            0x950000040d     639950128141
rdx            0x1      1
rsi            0x14e9504        21927172
rdi            0x49d4380        77415296
rbp            0x3      0x3
rsp            0x7fff92ea1550   0x7fff92ea1550
r8             0x7fff92ea18fc   140735658203388
r9             0x0      0
r10            0x0      0
r11            0x4      4
r12            0x7fff92ea29e0   140735658207712
r13            0x7fff92ea18d8   140735658203352
r14            0x3      3
r15            0x0      0
rip            0x40d052 0x40d052 <output_packet+1134>
eflags         0x10202  [ IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
st0            -inf     (raw 0xffff0000000000000000)
st1            -inf     (raw 0xffff0000000000000000)
st2            -nan(0x80008000800080)   (raw 0xffff0080008000800080)
st3            -nan(0x80008000800080)   (raw 0xffff0080008000800080)
st4            -nan(0x1010101010101010) (raw 0xffff1010101010101010)
st5            -nan(0x1010101010101010) (raw 0xffff1010101010101010)
st6            -inf     (raw 0xffff0000000000000000)
st7            -inf     (raw 0xffff0000000000000000)
fctrl          0x37f    895
fstat          0x0      0
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x5f7cd0 6257872
foseg          0x7fff   32767
fooff          0x92ea0e60       -1830154656
fop            0x59c    1436

-scodec xsub fails similarly.

Carl Eugen



More information about the ffmpeg-devel mailing list