简体   繁体   English

Tizen TV 模拟器中的字幕

[英]Subtitles in Tizen TV Emulator

I am developing an application using AVPlay API.我正在使用 AVPlay API 开发应用程序。 I could play the video URL successfully, however the subtitles do not work.我可以成功播放视频 URL,但字幕不起作用。 They are working in the VLC Player.他们在 VLC 播放器中工作。 (See the image below.) (见下图。)

I am using the following code to get the stream properties, but cannot see anything related to the subtitles.我正在使用以下代码获取流属性,但看不到与字幕相关的任何内容。

How can I display the subtitles in the emulator?如何在模拟器中显示字幕? Thanks in advance...提前致谢...

getCurrentStreamInfo: function() {
    var streamInfo = webapis.avplay.getCurrentStreamInfo();
    var text = '';
         for (var i = 0; i < streamInfo.length; i++) {
         text += 'index: ' + streamInfo[i].index + '';
         text += 'type: ' + streamInfo[i].type + '';
         text += 'extra_info: ' + streamInfo[i].extra_info + '';
    }
    info.innerHTML = text;
},

However, I see the following when displaying the stream info in VLC Player但是,在 VLC Player 中显示流信息时,我看到以下内容

在此处输入图像描述

It looks like you are playing back an MPEG-2 Transport Stream with DVB subtitles which is not a supported format according to http://www.samsung.com/us/support/answer/ANS00049952/看起来您正在播放带有 DVB 字幕的 MPEG-2 传输流,根据http://www.samsung.com/us/support/answer/ANS00049952/这是不支持的格式

I'd use FFMPEG to transcode your file to a format that the TV/emulator can play back.我会使用 FFMPEG 将您的文件转码为电视/模拟器可以播放的格式。

I'd start with: ffmpeg -i YOUR_FILE -acodec libfaac -ar 48000 -ab 128k -ac 2 -vcodec libx264 -s 640x480 -b 512k -scodec mov_text output.mp4我将从以下内容开始:ffmpeg -i YOUR_FILE -acodec libfaac -ar 48000 -ab 128k -ac 2 -vcodec libx264 -s 640x480 -b 512k -scodec mov_text output.mp4

Likely you have to do some try and error finding the ffmpeg output that plays with subtitles in the emulator.可能您必须尝试和错误地查找在模拟器中播放字幕的 ffmpeg 输出。 There a number of formats that ffmpeg can write and that are on the list at http://www.samsung.com/us/support/answer/ANS00049952/ ffmpeg 可以编写多种格式,这些格式位于http://www.samsung.com/us/support/answer/ANS00049952/的列表中

My working one-liner, Camera: DAHUA EZ-IP IPC-D2B40-0360B我的工作单线,摄像头:DAHUA EZ-IP IPC-D2B40-0360B

Solution: convert RTSP to Samsung TIZEN, SipTV App.解决方案:将 RTSP 转换为 Samsung TIZEN、SipTV App。

#!/bin/bash

/usr/bin/ffmpeg -fflags nobuffer \
 -rtsp_transport tcp \
 -i "rtsp://admin:XXXXXXXXXXXXXXX@192.168.0.111:554/cam/realmonitor?channel=1&subtype=0" \
 -acodec libfaac -ar 48000 -ab 128k -ac 2 -vcodec libx264 -s 640x480 -b 512k -scodec mov_text \
 -f segment \
 -hls_flags delete_segments \
 -segment_wrap 10 \
 -segment_list_flags live \
 -segment_time 1 \
 -segment_list_size 1 \
 -segment_format mpegts \
 -segment_list /var/www/html/cctv/cctv.m3u8 \
 -segment_list_type m3u8 \
 -segment_list_entry_prefix /cctv/stream/ \
 /var/www/html/cctv/stream/%d.ts

It is nice to use RAMDisk, to store chunks.最好使用 RAMDisk 来存储块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM