wang-bin / QtAV

A cross-platform multimedia framework based on Qt and FFmpeg. 基于Qt和FFmpeg的跨平台高性能音视频播放框架. Recommand to use new sdk https://github.com/wang-bin/mdk-sdk
http://qtav.org
3.96k stars 1.5k forks source link

MPEGTS embedded subtitles #848

Open DMJGilbert opened 7 years ago

DMJGilbert commented 7 years ago

Hi,

I am looking to display subtitles when playing a live MPEGTS over multicast. I have tried a stream containing both teletext subs and dvb subs. The player provides the references to the subtitles but I am not able to display them.

Snippet of the player setup:

player = new AVPlayer(this);
subtitleFilter = new SubtitleFilter(this);
player->installFilter(videoFilter);
subtitleFilter->setEnabled(true);
player->play("udp://@239.192.1.1:5000");
subtitleFilter->setEnabled(true);
player->setSubtitleStream(0);

I have also tried including subtitleFilter->setPlayer(player).

Other information: subtitleFilter->engine() FFmpeg

subtitleFilter->codec() AutoDetect

subtitleFilter->supportedSuffixes() "ass", "ssa", "cc_dec", "dvbsub", "dvdsub", "jacosub", "microdvd", "mov_text", "mpl2", "pgssub", "pjs", "realtext", "sami", "srt", "stl", "subrip", "subviewer", "subviewer1", "text", "vplayer", "webvtt", "xsub", "dvd_subtitle", "dvb_subtitle", "hdmv_pgs_subtitle", "dvb_teletext", "eia_608", "hdmv_text_subtitle"

player->interalSubtitleTracks() [{"codec":"dvb_teletext","extra":"\u0010�","file":"udp://@239.192.5.32:5000","id":0,"language":"eng"}]

player->interalSubtitleTracks() (With dvb_subtitles) [{"codec":"dvb_subtitle","extra":null,"file":"udp://@239.192.1.1:5000","id":0,"language":"eng"}]

Thanks in advance.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/43848833-mpegts-embedded-subtitles?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).
wang-bin commented 7 years ago

i need your log

DMJGilbert commented 7 years ago

Is there a way to enable more verbose logs?

AudioResampler::Register(..., FFmpeg)
Singleton 00000217BFA632F0 created...
AudioResampler::Register(..., Libav)
AudioOutputBackend::Register(..., XAudio2)
Singleton 00000217BFA63750 created...
AudioOutputBackend::Register(..., DirectSound)
AudioOutputBackend::Register(..., OpenAL)
VideoDecoder::Register(..., CUDA)
Singleton 00000217BFA63340 created...
VideoDecoder::Register(..., D3D11)
VideoDecoder::Register(..., DXVA)
registerRenderers...........
VideoRenderer::Register(..., OpenGLWindow)
Singleton 00000217BFA63B10 created...
SubtitleProcessor::Register(..., LibASS)
Singleton 00000217BFA63520 created...
SubtitleProcessor::Register(..., FFmpeg)
AudioDecoder::Register(..., FFmpeg)
Singleton 00000217BFA63B60 created...
AudioEncoder::Register(..., FFmpeg)
Singleton 00000217BFA637F0 created...
ImageConverter::Register(..., FFmpeg)
Singleton 00000217BFA63020 created...
MediaIO::Register(..., QIODevice)
Singleton 00000217BFA638E0 created...
MediaIO::Register(..., QFile)
AudioOutputBackend::Register(..., null)
VideoDecoder::Register(..., FFmpeg)
VideoEncoder::Register(..., FFmpeg)
Singleton 00000217BFA62F30 created...
VideoRenderer::Register(..., OpenGLWidget)
VideoRenderer::Register(..., QGLWidget2)
VideoRenderer::Register(..., Widget)
VideoRenderer::Register(..., GDI)
VideoRenderer::Register(..., Direct2D)
VideoRenderer::Register(..., GraphicsItem)
registerRenderers...........
AudioOutputBackend::id("XAudio2")
VideoRenderer::id("Widget")
Unknown id SubtitleProcessor::id("LibASS")
capi::version: 0.6.0
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileName(const char *)@347: dso.setFileName("ass")
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: ass.dll
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class capi::dso>::dll_helper(const char *[],const int [])@319: capi can not load {library name: ass, version -1}
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class capi::dso>::dll_helper(const char *[],const int [])@319: capi can not load {library name: ass, version 5}
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class capi::dso>::dll_helper(const char *[],const int [])@319: capi can not load {library name: ass, version 4}
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileNameAndVersion(const char *,int)@354: dso.setFileNameAndVersion("ass", 5)
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: ass.dll
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileNameAndVersion(const char *,int)@354: dso.setFileNameAndVersion("ass", 4)
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: ass.dll
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileName(const char *)@347: dso.setFileName("libass")
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: libass.dll
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class capi::dso>::dll_helper(const char *[],const int [])@319: capi can not load {library name: libass, version -1}
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileNameAndVersion(const char *,int)@354: dso.setFileNameAndVersion("libass", 5)
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: libass.dll
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class capi::dso>::dll_helper(const char *[],const int [])@319: capi can not load {library name: libass, version 5}
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class capi::dso>::dll_helper(const char *[],const int [])@319: capi can not load {library name: libass, version 4}
SubtitleProcessor::id("FFmpeg")
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileNameAndVersion(const char *,int)@354: dso.setFileNameAndVersion("libass", 4)
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: libass.dll
capi::version: 0.6.0
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileName(const char *)@347: dso.setFileName("libEGL")
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: libEGL.dll
resolving WGL_NV_DX_interop...
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class egl::EGLLib>::dll_helper(const char *[],const int [])@316: capi loaded {library name: libEGL, version: -1}
[D:\dev\QtAV\contrib\capi\capi.h] void __cdecl capi::dso::setFileName(const char *)@347: dso.setFileName("libEGL")
[D:\dev\QtAV\contrib\capi\capi.h] bool __cdecl capi::dso::load(void)@368: dso.load: libEGL.dll
[D:\dev\QtAV\contrib\capi\capi.h] __cdecl capi::internal::dll_helper<class egl::EGLLib>::dll_helper(const char *[],const int [])@316: capi loaded {library name: libEGL, version: -1}
[D:\dev\QtAV\contrib\capi\capi.h] void *__cdecl capi::dso::resolve(const char *,bool)@402: dso.resolve("eglGetCurrentDisplay", 1)
[D:\dev\QtAV\src\capi\egl_api.cpp] void *__cdecl egl::capi::eglGetCurrentDisplay(void)@162: dll::api_t::eglGetCurrentDisplay: @00007FFEC8C61180
Remote debugging server started successfully. Try pointing a Chromium-based browser to http://127.0.0.1:23654
AudioDecoder::id("FFmpeg")
"[ShaderManager] cache a new shader material type(10): gl material 16to8bit: 0, planar: 1, has alpha: 0, 2d texture: 1, 2nd plane rg: 0"
updating vao...
updating vbo...
wang-bin commented 7 years ago

environment var QTAV_LOG=all or setLogLevel()

DMJGilbert commented 7 years ago

Here is an example of dvb_teletext subs:

https://gist.github.com/DMJGilbert/249f0119eb8f487224887b782e2e2a8d

"subtitle avcodec_descriptor_get_by_name dvb_teletext"
"in {cl: 3, fmt: fltp, freq: 48000}"
"No subtitle decoder found for codec: dvb_teletext, try fron descriptor"

Could this be the problem: https://github.com/FFmpeg/FFmpeg/blob/master/ffmpeg_opt.c#L2198

Here is an example of dvb_subtitles subs:

https://gist.github.com/DMJGilbert/45bbf0c4ff8efb2af74f11dfeb1712de

wang-bin commented 7 years ago

You have to build ffmpeg with libzvbi to support that codec