Opened 6 years ago

Closed 6 years ago

#6982 closed defect (needs_more_info)

Convert Subtitles or Respect PTS

Reported by: Facundo Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello,

I'm trying to send a stream with subtitles. The input subtitles codec is dvb_subtitles, which is a bitmap based subtitle.
Nowadays we are burning subtitles into the video, but we don't know how to follow pts, so they are not consistant with the audio or video.

How we can acchive that?

These are live ingest so we can't use different tools that increase delay. We would like to do it only with ffmpeg.

ffmpeg -nostdin -loglevel verbose -hwaccel cuvid -deint 0 -c:v h264_cuvid -resize 1280x720 -y -re -i udp://226.212.2.0:4010?pkt_size=1316\&buffer_size=409600\&fifo_size=1000000\&overrun_nonfatal=1 -filter_complex "[i:0x1e00]hwdownload,format=nv12[base]; [i:0xc0]scale=1280:720[subtitle]; [base][subtitle]overlay[v]; [v]hwupload_cuda[v]" -map "[v]" -map i:0x1020 -c:a libfdk_aac -ac 2 -b:a 64k -map i:0x1021 -c:a libfdk_aac -ac 2 -b:a 64k -c:v hevc_nvenc -preset llhq -b:v 2000k -maxrate 2160k -bufsize 5000k -metadata service_name="HBO HD" -metadata:s:a:0 language=eng -metadata:s:a:0 title="English Audio" -metadata:s:a:1 language=spa -metadata:s:a:1 title="Spanish Audio" -f mpegts -mpegts_copyts 1 -pcr_period 40 udp://226.35.2.0:5000

Output command is not relevant to my question.

Thanks!

Change History (8)

comment:1 by Carl Eugen Hoyos, 6 years ago

Do you want to report a bug with current ffmeg git head? If yes, please provide the simplified command line (no hwaccels) and the complete, uncut console output to make this a valid ticket.
See the user mailing lists for usage support.

comment:2 by Facundo, 6 years ago

I'm asking a question, I'd don't know yet if is a bug.

Complete command with output:

ffmpeg -nostdin -loglevel verbose -c:v h264_cuvid -resize 1280x720 -y -re -i udp://226.212.2.0:4010?pkt_size=1316\&buffer_size=409600\&fifo_size=1000000\&overrun_nonfatal=1 -filter_complex "[i:0x1e00]hwdownload,format=nv12[base]; [i:0xc0]scale=1280:720[subtitle]; [base][subtitle]overlay[v]; [v]hwupload_cuda[v]" -map "[v]" -map i:0x1021 -c:a libfdk_aac -ac 2 -b:a 64k -c:v hevc_nvenc -preset llhq -b:v 2000k -maxrate 2160k -bufsize 5000k -f mpegts udp://226.35.2.10:5000
ffmpeg version N-89674-g57d0c24 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.5) 20160609
  configuration: --prefix=/usr/local/ffmpeg_build --extra-cflags='-I/usr/local/ffmpeg_build/include -I/usr/local/cuda/include/' --disable-yasm --extra-ldflags='-L/usr/local/ffmpeg_build/lib -L/usr/local/cuda/lib64/' --bindir=/usr/local/bin --extra-libs=-ldl --enable-nvenc --enable-cuda --enable-libnpp --enable-cuvid --enable-gpl --enable-libx264 --enable-libfdk-aac --enable-nonfree --enable-version3
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  3.100 / 58.  3.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  8.100 /  7.  8.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[mpegts @ 0x3a3b6c0] parser not found for codec none, packets or times may be invalid.
    Last message repeated 1 times
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] SPS unavailable in decode_picture_timing
[h264 @ 0x3a60900] non-existing PPS 0 referenced
[h264 @ 0x3a60900] decode_slice_header error
[h264 @ 0x3a60900] no frame!
[h264 @ 0x3a60900] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x3a60900] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x3a60900] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
[h264 @ 0x3a60900] Increasing reorder buffer to 2
[mpegts @ 0x3a3b6c0] max_analyze_duration 7000000 reached at 7008000 microseconds st:1
[mpegts @ 0x3a3b6c0] Could not find codec parameters for stream 3 (Unknown: none ([130][0][0][0] / 0x0082)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x3a3b6c0] Could not find codec parameters for stream 4 (Unknown: none ([130][0][0][0] / 0x0082)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'udp://226.212.2.0:4010?pkt_size=1316&buffer_size=409600&fifo_size=1000000&overrun_nonfatal=1':
  Duration: N/A, start: 63342.319056, bitrate: N/A
  Program 716 
    Metadata:
      service_name    : HBO HD
      service_provider: 
    Stream #0:0[0x1e00]: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(top first, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1020]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x1021]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:3[0x1040]: Unknown: none ([130][0][0][0] / 0x0082)
    Stream #0:4[0x1041]: Unknown: none ([130][0][0][0] / 0x0082)
    Stream #0:5[0xc0]: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[Parsed_scale_2 @ 0x3c2d480] w:1280 h:720 flags:'bilinear' interl:0
[h264_cuvid @ 0x3a67b80] Initializing cuvid hwaccel
[AVBSFContext @ 0x461e6c0] The input looks like it is Annex B already
[h264_cuvid @ 0x3a67b80] CUVID capabilities for h264_cuvid:
[h264_cuvid @ 0x3a67b80] 8 bit: supported: 1, min_width: 48, max_width: 4096, min_height: 16, max_height: 4096
[h264_cuvid @ 0x3a67b80] 10 bit: supported: 0, min_width: 0, max_width: 0, min_height: 0, max_height: 0
[h264_cuvid @ 0x3a67b80] 12 bit: supported: 0, min_width: 0, max_width: 0, min_height: 0, max_height: 0
Stream mapping:
  Stream #0:0 (h264_cuvid) -> hwdownload (graph 0)
  Stream #0:5 (dvbsub) -> scale (graph 0)
  hwupload_cuda (graph 0) -> Stream #0:0 (hevc_nvenc)
  Stream #0:2 -> #0:1 (ac3 (native) -> aac (libfdk_aac))
[mpegts @ 0x3a3b6c0] Correcting start time by 65755
[h264_cuvid @ 0x3a67b80] Initializing cuvid hwaccel
[h264_cuvid @ 0x3a67b80] Formats: Original: cuda | HW: cuda | SW: nv12
[graph_1_in_0_2 @ 0x3ad6140] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0x3ad6500] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_resampler_0 @ 0x3ad9680] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[Parsed_scale_2 @ 0x489e4c0] w:1280 h:720 flags:'bilinear' interl:0rate=  -0.0kbits/s speed=N/A    
[graph 0 input from stream 0:0 @ 0x4eac440] w:1280 h:720 pixfmt:cuda tb:1/90000 fr:30000/1001 sar:1/1 sws_param:flags=2
[mpegts @ 0x3a3b6c0] sub2video: using 1920x1080 canvas
[graph 0 input from stream 0:5 @ 0x4ead8c0] w:1920 h:1080 pixfmt:bgra tb:1/90000 fr:0/1 sar:0/1 sws_param:flags=2
[Parsed_scale_2 @ 0x489e4c0] w:1920 h:1080 fmt:bgra sar:0/1 -> w:1280 h:720 fmt:yuva420p sar:0/1 flags:0x2
[Parsed_overlay_3 @ 0x3afc7c0] main w:1280 h:720 fmt:nv12 overlay w:1280 h:720 fmt:yuva420p
[Parsed_overlay_3 @ 0x3afc7c0] [framesync @ 0x489d7a8] Selected 1/90000 time base
[Parsed_overlay_3 @ 0x3afc7c0] [framesync @ 0x489d7a8] Sync level 2
[hevc_nvenc @ 0x3aa5780] Loaded Nvenc version 8.0
[hevc_nvenc @ 0x3aa5780] Nvenc initialized successfully
[mpegts @ 0x3b75c80] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'udp://226.35.2.10:5000':
  Metadata:
    encoder         : Lavf58.3.100
    Stream #0:0: Video: hevc (hevc_nvenc) (Main), 1 reference frame, cuda, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 29.97 fps, 90k tbn, 29.97 tbc (default)
    Metadata:
      encoder         : Lavc58.9.100 hevc_nvenc
    Side data:
      cpb: bitrate max/min/avg: 2160000/0/2000000 buffer size: 5000000 vbv_delay: -1
    Stream #0:1: Audio: aac (libfdk_aac), 48000 Hz, stereo, s16, delay 2048, 64 kb/s
    Metadata:
      encoder         : Lavc58.9.100 libfdk_aac
[graph 0 input from stream 0:5 @ 0x4ead8c0] Changing frame properties on the fly is not supported by all filters.

comment:3 by Carl Eugen Hoyos, 6 years ago

What is wrong with the output stream?
Is the issue also reproducible if you write to an output file instead of an output network stream?
Is the issue only reproducible if the input is a network stream or is it also reproducible with file input?
Is the hardware decoder needed to reproduce the issue or is it also reproducible with the default software decoder?
Is the issue only reproducible with a hardware encoder?

comment:4 by Facundo, 6 years ago

My problem is that subtitles appead before the dialoge, way before.
My conclusion is than my command doesn't respect pts times, but I donn't know how to tell ffmpeg to follow pts information.

Here you have an ffprobe of my input:

root@ffmpeg:/code/src# ffprobe -loglevel quiet -print_format json -show_programs -timeout 10 udp://226.204.2.33:4010
{
    "programs": [
        {
            "program_id": 257,
            "program_num": 257,
            "nb_streams": 5,
            "pmt_pid": 5062,
            "pcr_pid": 2310,
            "start_pts": 63055416200,
            "start_time": "63055.416200",
            "tags": {
                "service_name": "",
                "service_provider": ""
            },
            "streams": [
                {
                    "index": 0,
                    "codec_name": "h264",
                    "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
                    "profile": "High",
                    "codec_type": "video",
                    "codec_time_base": "1001/60000",
                    "codec_tag_string": "[27][0][0][0]",
                    "codec_tag": "0x001b",
                    "width": 1920,
                    "height": 1080,
                    "coded_width": 1920,
                    "coded_height": 1080,
                    "has_b_frames": 2,
                    "sample_aspect_ratio": "1:1",
                    "display_aspect_ratio": "16:9",
                    "pix_fmt": "yuv420p",
                    "level": 40,
                    "chroma_location": "left",
                    "field_order": "tt",
                    "refs": 1,
                    "is_avc": "false",
                    "nal_length_size": "0",
                    "id": "0x906",
                    "r_frame_rate": "30000/1001",
                    "avg_frame_rate": "30000/1001",
                    "time_base": "1/90000",
                    "start_pts": 5675085341,
                    "start_time": "63056.503789",
                    "bits_per_raw_sample": "8",
                    "disposition": {
                        "default": 0,
                        "dub": 0,
                        "original": 0,
                        "comment": 0,
                        "lyrics": 0,
                        "karaoke": 0,
                        "forced": 0,
                        "hearing_impaired": 0,
                        "visual_impaired": 0,
                        "clean_effects": 0,
                        "attached_pic": 0,
                        "timed_thumbnails": 0
                    }
                },
                {
                    "index": 1,
                    "codec_name": "ac3",
                    "codec_long_name": "ATSC A/52A (AC-3)",
                    "codec_type": "audio",
                    "codec_time_base": "1/48000",
                    "codec_tag_string": "[129][0][0][0]",
                    "codec_tag": "0x0081",
                    "sample_fmt": "fltp",
                    "sample_rate": "48000",
                    "channels": 2,
                    "channel_layout": "stereo",
                    "bits_per_sample": 0,
                    "dmix_mode": "-1",
                    "ltrt_cmixlev": "-1.000000",
                    "ltrt_surmixlev": "-1.000000",
                    "loro_cmixlev": "-1.000000",
                    "loro_surmixlev": "-1.000000",
                    "id": "0x8fc",
                    "r_frame_rate": "0/0",
                    "avg_frame_rate": "0/0",
                    "time_base": "1/90000",
                    "start_pts": 5674992189,
                    "start_time": "63055.468767",
                    "bit_rate": "128000",
                    "disposition": {
                        "default": 0,
                        "dub": 0,
                        "original": 0,
                        "comment": 0,
                        "lyrics": 0,
                        "karaoke": 0,
                        "forced": 0,
                        "hearing_impaired": 0,
                        "visual_impaired": 0,
                        "clean_effects": 0,
                        "attached_pic": 0,
                        "timed_thumbnails": 0
                    }
                },
                {
                    "index": 2,
                    "codec_name": "ac3",
                    "codec_long_name": "ATSC A/52A (AC-3)",
                    "codec_type": "audio",
                    "codec_time_base": "1/48000",
                    "codec_tag_string": "[129][0][0][0]",
                    "codec_tag": "0x0081",
                    "sample_fmt": "fltp",
                    "sample_rate": "48000",
                    "channels": 6,
                    "channel_layout": "5.1(side)",
                    "bits_per_sample": 0,
                    "dmix_mode": "-1",
                    "ltrt_cmixlev": "-1.000000",
                    "ltrt_surmixlev": "-1.000000",
                    "loro_cmixlev": "-1.000000",
                    "loro_surmixlev": "-1.000000",
                    "id": "0x8fd",
                    "r_frame_rate": "0/0",
                    "avg_frame_rate": "0/0",
                    "time_base": "1/90000",
                    "start_pts": 5674987458,
                    "start_time": "63055.416200",
                    "bit_rate": "384000",
                    "disposition": {
                        "default": 0,
                        "dub": 0,
                        "original": 0,
                        "comment": 0,
                        "lyrics": 0,
                        "karaoke": 0,
                        "forced": 0,
                        "hearing_impaired": 0,
                        "visual_impaired": 0,
                        "clean_effects": 0,
                        "attached_pic": 0,
                        "timed_thumbnails": 0
                    }
                },
                {
                    "index": 3,
                    "codec_name": "dvb_subtitle",
                    "codec_long_name": "DVB subtitles",
                    "codec_type": "subtitle",
                    "codec_time_base": "0/1",
                    "codec_tag_string": "[6][0][0][0]",
                    "codec_tag": "0x0006",
                    "id": "0x950",
                    "r_frame_rate": "0/0",
                    "avg_frame_rate": "0/0",
                    "time_base": "1/90000",
                    "start_pts": 5675080899,
                    "start_time": "63056.454433",
                    "disposition": {
                        "default": 0,
                        "dub": 0,
                        "original": 0,
                        "comment": 0,
                        "lyrics": 0,
                        "karaoke": 0,
                        "forced": 0,
                        "hearing_impaired": 0,
                        "visual_impaired": 0,
                        "clean_effects": 0,
                        "attached_pic": 0,
                        "timed_thumbnails": 0
                    }
                },
                {
                    "index": 4,
                    "codec_tag_string": "[137][0][0][0]",
                    "codec_tag": "0x0089",
                    "id": "0x1b6f",
                    "r_frame_rate": "0/0",
                    "avg_frame_rate": "0/0",
                    "time_base": "1/90000",
                    "disposition": {
                        "default": 0,
                        "dub": 0,
                        "original": 0,
                        "comment": 0,
                        "lyrics": 0,
                        "karaoke": 0,
                        "forced": 0,
                        "hearing_impaired": 0,
                        "visual_impaired": 0,
                        "clean_effects": 0,
                        "attached_pic": 0,
                        "timed_thumbnails": 0
                    }
                }
            ]
        }
    ]
}

This issue is reproducible on all other cases with same input.

comment:5 by Carl Eugen Hoyos, 6 years ago

Is the issue also reproducible if you write to an output file instead of an output network stream?

comment:6 by Facundo, 6 years ago

Yes.
What I did now is to add a filter

[i:0x950]setpts=300000+PTS+2/TB[subs]

The 300000 is aprox "the start_pts of the the video" - "start_pts of the the subtitle".

Is there a way to do it dynamically?

comment:7 by Carl Eugen Hoyos, 6 years ago

Is the hardware decoder needed to reproduce the issue or is it also reproducible with the default software decoder?
If yes, please record the input stream with tools/aviocat or another tool that dumps streams (not ffmpeg) and point is to the sample.

comment:8 by Carl Eugen Hoyos, 6 years ago

Keywords: subtitles dvb pts removed
Resolution: needs_more_info
Status: newclosed
Note: See TracTickets for help on using tickets.