- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这是我到目前为止想出的边玩边找的方法:
case GDK_Up:
{
gint64 pos_ns, dur_ns, seek_ns;
GstFormat format;
format = GST_FORMAT_TIME;
gst_element_query_duration(pipeline,&format,&dur_ns);
gst_element_query_position(pipeline,&format,&pos_ns);
g_print ("Time: %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (pos_ns), GST_TIME_ARGS (dur_ns));
seek_ns = pos_ns + 60*GST_SECOND;
if (!gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT,
GST_SEEK_TYPE_SET, seek_ns,
GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
{
g_print ("Seek failed!\n");
}
}
break;
这是我的管道:
pipeline = gst_parse_launch("filesrc location=filename.mpg ! decodebin name=decoder decoder. ! queue ! audioconvert ! alsasink decoder. ! deinterlace ! ffmpegcolorspace ! glimagesink",&error);
第一个搜索将需要大约 3 秒的时间来执行,到第 5 或第 6 个搜索时,需要 15 到 20 秒才能从新位置开始播放。我知道我一定做错了什么,但我无法从文档中弄清楚那是什么。
这是我构建管道的方式吗?我意识到我在这里走了一些捷径。
是媒体文件的类型吗? (mpeg2ts)是媒体文件的长度吗? (4 小时)
文档说:
应用程序在管道上发出搜索,搜索调用返回后立即播放新媒体。
那么为什么 seek 调用需要这么长时间才能返回?
如有任何帮助,我们将不胜感激。
更新:
这是调试级别 2 的调试日志:
(fullscreen02:4554): GLib-GObject-WARNING **: g_object_set_property: property `device-name' of object class `GstAlsaSink' is not writable
0:00:01.137170699 4554 0x9d9500 WARN mpegtsdemux gstmpegtsdemux.c:754:gst_mpegts_demux_fill_stream: AC3 stream type found but no corresponding descriptor to differentiate between AC3 and EAC3. Assuming plain AC3.
0:00:01.179042694 4554 0x9d9500 WARN mpegtsdemux gstmpegtsdemux.c:754:gst_mpegts_demux_fill_stream: AC3 stream type found but no corresponding descriptor to differentiate between AC3 and EAC3. Assuming plain AC3.
0:00:01.188213891 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:01.188464979 4554 0x7ff9d80270e0 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
No accelerated IMDCT transform found
0:00:01.211118745 4554 0x7ff9d8023c40 WARN alsa gstalsa.c:124:gst_alsa_detect_formats:<alsasink0> skipping non-int format
No accelerated IMDCT transform found
0:00:01.237512648 4554 0x7ff9d8023c40 WARN audioconvert gstaudioconvert.c:832:gst_audio_convert_fixate_channels:<audioconvert0> downstream caps contain no channel layout
0:00:01.239176189 4554 0x9dabd0 WARN audioconvert gstaudioconvert.c:832:gst_audio_convert_fixate_channels:<audioconvert0> downstream caps contain no channel layout
0:00:01.273765960 4554 0x7ff9d8023c40 WARN audioconvert gstaudioconvert.c:832:gst_audio_convert_fixate_channels:<audioconvert0> downstream caps contain no channel layout
Got prepare-xwindow-id msg
0:00:01.326878070 4554 0x6068b0 WARN default xoverlay.c:354:gst_x_overlay_set_xwindow_id:<glimagesink0> Using deprecated gst_x_overlay_set_xwindow_id()
0:00:01.326931302 4554 0x6068b0 WARN default xoverlay.c:390:gst_x_overlay_set_window_handle:<glimagesink0> Calling deprecated set_xwindow_id() method
0:00:01.337897164 4554 0x7ff9cc002cd0 WARN bin gstbin.c:2380:gst_bin_do_latency_func:<pipeline0> did not really configure latency of 0:00:00.000000000
0:00:02.042181425 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:03.016673305 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:04.489319920 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:05.961069736 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
Counter: 0:00:05.930250000 / 3:37:14.178723991 (this is when a 60 sec seek forward was initiated)
0:00:07.300999850 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:07.317269896 4554 0x7ff9cc005cd0 WARN bin gstbin.c:2380:gst_bin_do_latency_func:<pipeline0> did not really configure latency of 0:00:00.000000000
0:00:07.641986233 4554 0x9d9500 WARN decodebin gstdecodebin.c:1485:queue_filled_cb:<decoder> Queue is bigger than 20Mbytes, something else is going wrong
0:00:11.059481122 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:11.474393831 4554 0x9d9500 WARN decodebin gstdecodebin.c:1485:queue_filled_cb:<decoder> Queue is bigger than 20Mbytes, something else is going wrong
previous line repeated 55 times
0:00:12.532097973 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:12.538414925 4554 0x9d9500 WARN decodebin gstdecodebin.c:1485:queue_filled_cb:<decoder> Queue is bigger than 20Mbytes, something else is going wrong
previous line repeated 26 times
Counter: 0:02:05.745916667 / 3:37:14.178723991 (this is when a 60 sec seek forward was initiated)
0:00:13.113363951 4554 0x7ff9cc002c80 WARN bin gstbin.c:2380:gst_bin_do_latency_func:<pipeline0> did not really configure latency of 0:00:00.000000000
0:00:13.116343604 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:13.472504323 4554 0x9d9500 WARN decodebin gstdecodebin.c:1485:queue_filled_cb:<decoder> Queue is bigger than 20Mbytes, something else is going wrong
previous line repeated 9 times
0:00:25.545042104 4554 0x7ff9d8023c40 WARN mpegtsdemux gstmpegtsdemux.c:2865:gst_mpegts_demux_src_pad_query:<mpegtsdemux0> unsupported query format or no bitrate yet to approximate duration from bytes
0:00:25.580215323 4554 0x9d9500 WARN decodebin gstdecodebin.c:1485:queue_filled_cb:<decoder> Queue is bigger than 20Mbytes, something else is going wrong
previous line repeated 43 times
我目前正在查找其中一些警告。
最佳答案
您的管道看起来不错。对 mpegts 元素进行了大量优化。您的 gstreamer 安装是否最新。如果您的安装是最新的,您可以运行诸如 oprofile 之类的分析器来查看是否存在热点。您还可以检查 gstreamer 调试日志,看看是否有关于该文件的任何投诉。
关于c - gstreamer gst_element_seek 在 mpeg2ts 上非常慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12024019/
我正在创建一个播放静态 mpeg-DASH 文件的应用程序。我一直在使用 MP4Box 创建 DASH .mp4 和 .mpd 文件。 MPD 文件包含单个 .mp4 文件中的字节范围偏移列表。这工作
我检查了一些 MPEG-4 视频 header ,并在开头看到了一些字节数组,如下所示: 00 00 01 B0 01 00 00 01 B5 89 13 我知道 00 00 01 部分,但 B0 B
我正在尝试实现用于播放受 widevine 保护的视频的 Android 应用程序。我在 Exoplayer 上构建我的应用程序,但我遇到了 MediaDrm 问题。 android.media.Me
我正在寻找区分使用 MPEG-1 和 MPEG-2 容器的文件的具体方法,因为我发现的大多数资源都表明这两个容器的起始代码都是 00 00 01 BA。 我尝试使用 VLC 的 GUI 将 MP4 容
我已经编写了 MPEG-TS 解复用器。它将传输流解包为 PES 数据包。现在我想丢弃所有帧,直到遇到关键帧。 我该怎么做?我应该在每个 PES 帧中找到序列 block 吗? 最佳答案 您应该能够在
我正在尝试能够从 MPEG、MPEG-TS 和 MPEG-PS 文件以及实时流(网络/UDP/RTP 流)中挑选出帧(视频和元数据)。我正在研究使用 JCODEC 来执行此操作,我开始尝试使用 Fra
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为
在带有 ARM 和/DSP 的 Android 平台上,哪个解码器会更快:MPEG-4 或 MPEG-2 还是 3GP?为什么? 谢谢 最佳答案 “更快”是一个相对术语。鉴于您问题中的信息,无法回答。
通过 UDP 流式传输,我有一个 MPEG Transport Stream包含: MPEG-2 视频和 MPEG-1 音频,或 H.264 视频和 MPEG-1 音频,或 H.264 视频和 AC3
我对编解码器了解较少。我所知道的编解码器代表解码/编码。在编解码器中将内置在手机中,外部库可以用作替代方案。编解码器对音频\视频起着重要作用,其中格式已编码为文件并解码以播放它们。 问题: Andro
我不知道我需要在哪个标签上问这个问题。 我目前正在研究数字电视广播的 ATSC 标准。我在浏览内容时有疑问。在数字电视广播中,一个带宽将包含多个 channel (服务)。 由广播公司编码和复用的数据
MPEG中节目时钟引用(PCR)的最大值是多少? 据我了解,它源自 27MHz 时钟,定期加载到 42 位寄存器中。 PCR(i)=PCR_Base(i) * 300 + PCR_Ext(i) 其中
我有一些与将 mpeg PES 流(打包)多路复用到 mpeg TS 相关的问题。 为什么 DTS 和 PTS 值包含在 PES 头中,而 PCR 值包含在传输流头中? 如果我们想以某种方式播放 PE
关闭。这个问题需要更多 focused .它目前不接受答案。 想改进这个问题?更新问题,使其仅关注一个问题 editing this post . 1年前关闭。 Improve this questi
。我试图了解 mpd 文件如何播放,我指的是以下数据集: http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/Valkaama/MPDs/Valkaa
我正在尝试将几个 .wav 文件转换为 .mp3 格式 所需的 .mp3 格式是: 我尝试使用 FFmpeg 使用以下代码: ffmpeg -i input.wav -vn -ac 2 -b:a 16
我有一个支持 CENC 的 MPD 剪辑,如何在不使用任何特定 DRM 引擎的情况下解密和播放?是否有任何解密算法可用于解密 AES CTR 128 位?如果有,它将用于解密 MPEG-DASH 内容
以下是MPEG2VideoDescriptor的十六进制转储: 06 0e 2b 34 02 53 01 01 0d 01 01 01 01 01 51 00 83 00 00 f3 3c 0a 00
我需要检测文件是否为 MPEG ADTS 文件。我已经四处搜索了它,但无论是我寻找得很糟糕还是其他东西,但我找不到我可以肯定地说某些文件具有 MPEG ADTS 格式的签名。 例如如果文件以这样的签名
我正在开发用于网络吞吐量测试的点对点视频流。两个对等点之间的网络支持低比特率传输。 我使用 OpenCV 为视频流制作了简单的 python 程序。 该程序从网络摄像头抓取视频帧并将其编码为 JPEG
我是一名优秀的程序员,十分优秀!