Opened 9 years ago

Last modified 9 years ago

#4165 reopened enhancement

Improve page selection for dvb teletext

Reported by: dinhka Owned by:
Priority: wish Component: undetermined
Version: git-master Keywords: dvb_teletext
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
I want to select SWE language in a dvb_teletext. But the dvb_teletext decoder outputs FIN language. Please help me. Thanks.
How to reproduce:
ffmpeg -i input -filter_complex [0:v][0:s:0]overlay=x=120:y=310[v] -map [v] -map 0:a:0 -tune zerolatency -rtbufsize 64M -af aresample=async=1 -acodec libfdk_aac -b:a 48k -ar 48000 -ac 2 -vcodec libx264 -b:v 900k -profile:v main -preset:v faster -x264opts keyint=250 -y -s 720x576 -r 25 -vsync vfr -f flv -f flv rtmp://ip/live/test
[mpeg2video @ 0x23d37c0] Invalid frame dimensions 0x0.
Last message repeated 8 times
Input #0, mpegts, from '​http://ip':
Duration: N/A, start: 90879.289622, bitrate: 384 kb/s
Program 201
Stream #0:0[0x3e9]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x3ea](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x192](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:3[0xc9](swe,fin): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
[libx264 @ 0x240bd40] using SAR=64/45
[libx264 @ 0x240bd40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x240bd40] profile Main, level 3.0
[libx264 @ 0x240bd40] 264 - core 142 r2491 24e4fed - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - ​http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=4 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=9 lookahead_threads=9 sliced_threads=1 slices=9 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=900 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp://IP/live4/test':
Metadata:
encoder : Lavf56.15.100
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 900 kb/s, 25 fps, 1k tbn, 25 tbc (default)
Metadata:
encoder : Lavc56.13.100 libx264
Stream #0:1(swe): Audio: aac (libfdk_aac) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, s16, 48 kb/s
Metadata:
encoder : Lavc56.13.100 libfdk_aac
Stream mapping:
Stream #0:0 (mpeg2video) -> overlay:main (graph 0)
Stream #0:3 (libzvbi_teletextdec) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))
Press [q] to stop, ? for help

Change History (12)

comment:1 by Carl Eugen Hoyos, 9 years ago

Keywords: bug removed

Please upload a sample input stream and please provide your actual command line including the complete, uncut console output to make this a valid ticket.

in reply to:  description comment:2 by dinhka, 9 years ago

Replying to dinhka:
ffmpeg -i http://93.158.221.243:50004 -filter_complex [0:v][0:s:0:0]overlay=x=120:y=310[v] -map [v] -map 0:a:0 -tune zerolatency -rtbufsize 64M -af aresample=async=1 -acodec libfdk_aac -b:a 48k -ar 48000 -ac 2 -vcodec libx264 -b:v 900k -profile:v main -preset:v faster -x264opts keyint=250 -y -s 720x576 -r 25 -vsync vfr -f flv -f flv rtmp://192.99.47.26/live/test
[mpeg2video @ 0x301b7c0] Invalid frame dimensions 0x0.

Last message repeated 10 times

Input #0, mpegts, from 'http://93.158.221.243:50004':

Duration: N/A, start: 79510.741178, bitrate: 384 kb/s
Program 201

Stream #0:0[0x3e9]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x3ea](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x192](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:3[0xc9](swe,fin): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250

[libx264 @ 0x30e6100] using SAR=64/45
[libx264 @ 0x30e6100] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x30e6100] profile Main, level 3.0
[libx264 @ 0x30e6100] 264 - core 142 r2491 24e4fed - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=4 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=9 lookahead_threads=9 sliced_threads=1 slices=9 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=900 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp://192.99.47.26/live/test':

Metadata:

encoder : Lavf56.15.102
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 900 kb/s, 25 fps, 1k tbn, 25 tbc (default)
Metadata:

encoder : Lavc56.14.100 libx264

Stream #0:1(swe): Audio: aac (libfdk_aac) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, s16, 48 kb/s
Metadata:

encoder : Lavc56.14.100 libfdk_aac

Stream mapping:

Stream #0:0 (mpeg2video) -> overlay:main (graph 0)
Stream #0:3 (libzvbi_teletextdec) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))

Press [q] to stop, ? for help

comment:3 by dinhka, 9 years ago

Actual command line:

ffmpeg -i http://93.158.221.243:50004 -filter_complex [0:v][0:s:0:0]overlay=x=120:y=310[v] -map [v] -map 0:a:0 -tune zerolatency -rtbufsize 64M -af aresample=async=1 -acodec libfdk_aac -b:a 48k -ar 48000 -ac 2 -vcodec libx264 -b:v 900k -profile:v main -preset:v faster -x264opts keyint=250 -y -s 720x576 -r 25 -vsync vfr -f flv -f flv rtmp://192.99.47.26/live/test

comment:4 by Carl Eugen Hoyos, 9 years ago

Resolution: needs_more_info
Status: newclosed

Please feel free to reopen this ticket if you believe your have found a bug and if you can provide your actual failing command line together with the complete, uncut console output.

If you need help using FFmpeg, please post your question on the user mailing list, this is not a support forum.

in reply to:  4 comment:5 by dinhka, 9 years ago

ffmpeg -i http://93.158.221.243:50004 -filter_complex [0:v][0:s:0:0]overlay=x=120:y=310[v] -map [v] -map 0:a:0 -tune zerolatency -rtbufsize 64M -af aresample=async=1 -acodec libfdk_aac -b:a 48k -ar 48000 -ac 2 -vcodec libx264 -b:v 900k -profile:v main -preset:v faster -x264opts keyint=250 -y -s 720x576 -r 25 -vsync vfr -f flv -f flv rtmp://192.99.47.26/live/test
ffmpeg version N-68289-g208c03a Copyright (c) 2000-2014 the FFmpeg developers

built on Dec 8 2014 03:10:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --disable-ffplay --disable-ffserver --disable-ffprobe --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --enable-version3 --enable-avfilter --enable-nonfree --enable-gpl --enable-libfdk_aac --enable-libx264 --enable-pthreads --disable-stripping --extra-cflags=-I/usr/local/include --disable-debug --enable-libzvbi
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100

[mpeg2video @ 0x28b37c0] Invalid frame dimensions 0x0.

Last message repeated 10 times

Input #0, mpegts, from 'http://93.158.221.243:50004':

Duration: N/A, start: 67275.503489, bitrate: 384 kb/s
Program 201

Stream #0:0[0x3e9]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x3ea](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x192](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:3[0xc9](swe,fin): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250

[libx264 @ 0x29492a0] using SAR=64/45
[libx264 @ 0x29492a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x29492a0] profile Main, level 3.0
[libx264 @ 0x29492a0] 264 - core 142 r2491 24e4fed - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=4 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=9 lookahead_threads=9 sliced_threads=1 slices=9 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=900 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp://192.99.47.26/live/test':

Metadata:

encoder : Lavf56.15.102
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 900 kb/s, 25 fps, 1k tbn, 25 tbc (default)
Metadata:

encoder : Lavc56.14.100 libx264

Stream #0:1(swe): Audio: aac (libfdk_aac) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, s16, 48 kb/s
Metadata:

encoder : Lavc56.14.100 libfdk_aac

Stream mapping:

Stream #0:0 (mpeg2video) -> overlay:main (graph 0)
Stream #0:3 (libzvbi_teletextdec) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))

Press [q] to stop, ? for help
[flv @ 0x29483e0] Failed to update header with correct duration.ate= 972.0kbits/s
[flv @ 0x29483e0] Failed to update header with correct filesize.
frame= 593 fps= 32 q=30.0 Lsize= 2916kB time=00:00:24.48 bitrate= 976.0kbits/s

comment:6 by Carl Eugen Hoyos, 9 years ago

Is the issue only reproducible with rtmp output or also with file output?
Is audio output necessary to reproduce the issue or is it also reproducible with -an?
Is using an external library (libx264) necessary to reproduce the issue or is it also reproducible with a native encoder (like -vcodec flv1)?
Can you download the input stream? Does file input also allow to reproduce the issue?

comment:7 by dinhka, 9 years ago

  1. the same with file.
  2. the same with no audio -an
  3. you can try direct with the input stream, it is online http://93.158.221.243:50004

i think problem is ffmpeg does not support the way to select correct language.

comment:8 by Carl Eugen Hoyos, 9 years ago

Resolution: needs_more_infoworksforme
$ ffmpeg -txt_page 691 -i input -filter_complex [0:0][0:3]overlay -qscale 2 out.avi

comment:9 by dinhka, 9 years ago

Hi,

It is right subtitle now. But how do i find my txt_page which i need (691 for swe). it does not output the txt_page in the stream ?

many thanks.

comment:10 by Carl Eugen Hoyos, 9 years ago

This is a missing feature.

in reply to:  10 comment:11 by dinhka, 9 years ago

Please add it. Many thanks.

comment:12 by Carl Eugen Hoyos, 9 years ago

Priority: normalwish
Reproduced by developer: set
Resolution: worksforme
Status: closedreopened
Summary: Bug with dvb_teletext. Thanks.Improve page selection for dvb teletext
Type: defectenhancement
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.