Opened 6 years ago

#7308 new defect

Recording of dvb_teletext does not stop until subtitles are available

Reported by: jakubvojacek Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: When using ffmpeg to transcode portion of live stream that includes dvb_teletext, the ffmpeg does not stop until there are some data in the dvb_teletext stream. The dvb_teletext stream contains subtitle only like 50% of time and until some subtitles are available, it will keep the ffmpeg running. Below is a simple sample ffmpeg command that should record 10 seconds of stream.
How to reproduce:

time ffmpeg -y -txt_format text -txt_page 888 -i "udp://@239.100.200.2:1234?overrun_nonfatal=1&fifo_size=10000000" -map 0 -copyinkf -scodec mov_text -vcodec copy -acodec copy -t 10 -f mp4 test.mp4

The output of this command is

ffmpeg version 4.0-hd Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --cpu=native --enable-pthreads --extra-version=hd --enable-vaapi --enable-vdpau --enable-nonfree --enable-gpl --enable-swscale --enable-libx264 --enable-version3 --enable-nvenc --enable-libnpp --enable-cuda --enable-cuvid --enable-cuda-sdk --enable-filter=scale_cuda --enable-filter=thumbnail_cuda --extra-cflags=-I/usr/local/cuda-9.1/include --extra-ldflags=-L/usr/local/cuda-9.1/lib64 --enable-libx264 --enable-libx265 --enable-libxvid --enable-libass --enable-libwavpack --enable-libsoxr --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libnpp --enable-opengl --enable-version3 --enable-avresample --enable-avisynth --enable-openal --enable-opencl --enable-libzvbi --enable-iconv
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100

Input #0, mpegts, from 'udp://@239.100.200.2:1234?overrun_nonfatal=1&fifo_size=10000000':
  Duration: N/A, start: 73177.274233, bitrate: N/A
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 720x480 [SAR 40:33 DAR 20:11], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 720x480 [SAR 40:33 DAR 20:11], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:2[0x102](cze): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 144 kb/s
    Stream #0:3[0x103](cze): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Output #0, mp4, to 'test.mp4':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 720x480 [SAR 40:33 DAR 20:11], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Stream #0:1: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 720x480 [SAR 40:33 DAR 20:11], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Stream #0:2(cze): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 144 kb/s
    Stream #0:3(cze): Subtitle: mov_text (tx3g / 0x67337874), 492x250
    Metadata:
      encoder         : Lavc58.18.100 mov_text
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (dvb_teletext (libzvbi_teletextdec) -> mov_text (native))
Press [q] to stop, [?] for help
frame=  250 fps=0.2 q=-1.0 Lq=-1.0 size=    1820kB time=00:00:09.98 bitrate=1493.7kbits/s speed=0.00774x    
video:1655kB audio:159kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.366925%
Exiting normally, received signal 2.

real	21m34.743s
user	0m4.100s
sys	0m3.020s

While I was trying to record just 10 seconds, it kept on recording and would have kept waiting until some subtitles would be available. I have waited 21 minutes until I canceled it manually. When there are subtitles available at the time of transcoding, it does end on time (specified by the -t parameter)

I have tried to record the multicast using multicat into a file and process this file and it worked (didnt wait). Therefore it seems like it is only reproducible on live input.

Do you need any more information please?

Change History (0)

Note: See TracTickets for help on using tickets.