Project

General

Profile

How to implement streaming with subtitle output

Added by weijian liang over 5 years ago

hello:
The dvbt channel is streamed to the Android TV. Since the player cannot select subtitles, there are 3 subtitles. Can you output subtitles to the Android tv?
:tvheadend installed on ds418play

ffmpeg.png (51.7 KB) ffmpeg.png ffmpeg
tvheadend.png (13.9 KB) tvheadend.png tvheadend

Replies (9)

RE: How to implement streaming with subtitle output - Added by saen acro over 5 years ago

Progtv or kodi for android work perfect.

RE: How to implement streaming with subtitle output - Added by weijian liang over 5 years ago

Progtv is very good, but the interface remote control is not easy to operate, I use the perfect player, but the S905 new products and the HiSilicon chip do not support HW+, so the subtitles cannot be called up.

RE: How to implement streaming with subtitle output - Added by weijian liang over 5 years ago

Or how to use ffmpeg mapping subtitle output

RE: How to implement streaming with subtitle output - Added by saen acro over 5 years ago

Your idea is to burn subtitles in video, or limiting just specific language for subtitles?
First one is type of transcoding. (spawn profile + FFMpeg/Gstreamer )
Second can be done via stream filter menu in TVH.

RE: How to implement streaming with subtitle output - Added by weijian liang over 5 years ago

The subtitle output and the specific language are limited. The stream accepted by dvbt has subtitles, but the subtitle can be selected when outputting to the Android VLC player through the TVH pass channel, and is turned off by default. However, the player I need does not have a subtitle option, and I need to have a subtitle output stream on the tvheadend server.
What is the format of the transcoding type? I have not found the relevant information.
The TVH stream filtering menu filters out certain subtitles. Instead of displaying subtitles?
Can you talk about the specific method of operation?

Thank you!!

RE: How to implement streaming with subtitle output - Added by saen acro over 5 years ago

ffmpeg -i pipe:0 -filter_complex "[0:v][0:s]overlay[v]" -map "[v]" -vcodec libx264 -preset ultrafast -x264opts keyint=100:min-keyint=50 -threads -0 -f pipe:1

Not 100% shure but with more testing ;)

http://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
https://ffmpeg.org/pipermail/ffmpeg-user/2016-June/032555.html

RE: How to implement streaming with subtitle output - Added by weijian liang over 5 years ago

Can talk about what it means, in fact, I want to learn ffmepg. Is this code on the spawn?

RE: How to implement streaming with subtitle output - Added by weijian liang over 5 years ago

saen acro wrote:

[...]

Not 100% shure but with more testing ;)

http://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
https://ffmpeg.org/pipermail/ffmpeg-user/2016-June/032555.html

2019-03-08 23:00:44.947 subscription: 0118: "HTTP" unsubscribing from "jade", hostname="10.10.10.8", username="test", client="VLC/3.0.6 LibVLC/3.0.6"
2019-03-08 23:00:44.998 mpegts: 650MHz in dtmb - tuning on 2
2019-03-08 23:00:45.020 subscription: 0119: "HTTP" subscribing on channel "jade", weight: 100, adapter: "2", network: "dtmb", mux: "650MHz", provider: "TVB", service: "翡翠台", profile="111", hostname="10.10.10.8", username="test", client="VLC/3.0.6 LibVLC/3.0.6"
2019-03-08 23:00:45.021 spawn: Executing "//volume1/appstore/ffmpeg/bin/ffmpeg"
2019-03-08 23:00:45.039 spawn: ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
2019-03-08 23:00:45.039 spawn: built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
2019-03-08 23:00:45.039 spawn: configuration: --target-os=linux --cross-prefix=/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-fontconfig --enable-libass --enable-libbluray --enable-avresample --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libsoxr --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-gnutls --disable-debug --disable-doc --disable-static --arch=x86_64 --enable-thumb --enable-vaapi
2019-03-08 23:00:45.039 spawn: libavutil 56. 22.100 / 56. 22.100
2019-03-08 23:00:45.039 spawn: libavcodec 58. 35.100 / 58. 35.100
2019-03-08 23:00:45.039 spawn: libavformat 58. 20.100 / 58. 20.100
2019-03-08 23:00:45.039 spawn: libavdevice 58. 5.100 / 58. 5.100
2019-03-08 23:00:45.039 spawn: libavfilter 7. 40.101 / 7. 40.101
2019-03-08 23:00:45.039 spawn: libavresample 4. 0. 0 / 4. 0. 0
2019-03-08 23:00:45.039 spawn: libswscale 5. 3.100 / 5. 3.100
2019-03-08 23:00:45.039 spawn: libswresample 3. 3.100 / 3. 3.100
2019-03-08 23:00:45.039 spawn: libpostproc 55. 3.100 / 55. 3.100
2019-03-08 23:00:45.041 spawn: Trailing options were found on the commandline.
2019-03-08 23:00:45.244 spawn: [h264
0x1edf200] non-existing SPS 0 referenced in buffering period
2019-03-08 23:00:45.244 spawn: [h264 0x1edf200] SPS unavailable in decode_picture_timing
2019-03-08 23:00:45.244 spawn: [h264
0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.244 spawn: [h264 0x1edf200] non-existing SPS 0 referenced in buffering period
2019-03-08 23:00:45.244 spawn: [h264
0x1edf200] SPS unavailable in decode_picture_timing
2019-03-08 23:00:45.244 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.244 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.244 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.244 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.244 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.244 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.244 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.244 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.245 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.245 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.245 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.245 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.245 spawn: [h264 0x1edf200] no frame!
2019-03-08 23:00:45.340 spawn: [h264
0x1edf200] non-existing SPS 0 referenced in buffering period
2019-03-08 23:00:45.340 spawn: [h264 0x1edf200] SPS unavailable in decode_picture_timing
2019-03-08 23:00:45.340 spawn: [h264
0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.341 spawn: [h264 0x1edf200] non-existing SPS 0 referenced in buffering period
2019-03-08 23:00:45.341 spawn: [h264
0x1edf200] SPS unavailable in decode_picture_timing
2019-03-08 23:00:45.341 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.341 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.341 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.341 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.341 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.341 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.341 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.341 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.341 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.341 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.341 spawn: [h264 0x1edf200] non-existing PPS 0 referenced
2019-03-08 23:00:45.341 spawn: [h264
0x1edf200] decode_slice_header error
2019-03-08 23:00:45.341 spawn: [h264 @ 0x1edf200] no frame!
2019-03-08 23:00:48.075 subscription: 0119: "HTTP" unsubscribing from "jade", hostname="10.10.10.8", username="test1", client="VLC/3.0.6 LibVLC/3.0.6"
2019-03-08 23:00:48.079 spawn: Input #0, mpegts, from 'pipe:0':
2019-03-08 23:00:48.079 spawn: Duration: N/A, start: 40820.080267, bitrate: N/A
2019-03-08 23:00:48.079 spawn: Program 1
2019-03-08 23:00:48.080 spawn: Metadata:
2019-03-08 23:00:48.080 spawn: service_name : Jade
2019-03-08 23:00:48.080 spawn: service_provider: TVB
2019-03-08 23:00:48.080 spawn: Stream #0:0[0x32b]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
2019-03-08 23:00:48.080 spawn: Stream #0:1[0x32c]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
2019-03-08 23:00:48.080 spawn: Stream #0:2[0x32d]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
2019-03-08 23:00:48.080 spawn: Stream #0:3[0x32e]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
2019-03-08 23:00:48.080 spawn: Stream #0:4[0x32f](CHI): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
2019-03-08 23:00:48.080 spawn: Stream #0:5[0x330](ENG): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
2019-03-08 23:00:48.081 spawn: Stream #0:6[0x331](CHS): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
2019-03-08 23:00:48.081 spawn: Filter overlay has an unconnected output
2019-03-08 23:00:48.082 spawn: Exiting normally, received signal 15.

    (1-9/9)