1

我有一堆从 Silicondust HDHomerun 调谐器获得的 mpegts 视频文件。在 gstreamer 0.10 中寻找真的很慢(见我以前的帖子)。现在搜索有了很大的改进(在1.0.6中),但仍然存在问题。这是一些标准输出:

$ ./fullscreen02

No accelerated IMDCT transform found
No accelerated IMDCT transform found
pos_ns: 1700833333, seek_ns: 11700833333
position: 0:00:11.700833333

(fullscreen02:30989): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed

(fullscreen02:30989): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed
Seek failed!
pos_ns: 1878166666, seek_ns: 11878166666
position: 0:00:11.878166666

(fullscreen02:30989): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed

(fullscreen02:30989): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed
Seek failed!
pos_ns: 1468916666, seek_ns: 11468916666
position: 0:00:11.468916666

(fullscreen02:30989): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed

(fullscreen02:30989): GStreamer-CRITICAL **: gst_segment_do_seek: assertion `segment->format == format' failed
Seek failed!
^C

正如你所看到的,pos_ns 前后跳跃,尽管这是三个十秒向前跳跃的输出,如下所示:

        gint64 dur_ns, pos_ns, seek_ns;
        GstFormat format;

        format = GST_FORMAT_TIME;

        if ( !gst_element_query_position(pipeline,format,&pos_ns) )
            g_print("query position failed\n");

        seek_ns = pos_ns + 10*GST_SECOND;
        g_print ("pos_ns: %li, seek_ns: %li\n",pos_ns,seek_ns);
        g_print ("position: %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (seek_ns));

        if ( !gst_element_seek_simple (pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, seek_ns) ) 
          g_print ("Seek failed!\n");

您还可以在同一个标​​准输出中看到,即使在屏幕上向前跳过似乎是成功的,但 gst_element_seek_simple 返回 false 并因此抱怨搜索失败。

我发现了一个可能相关的错误,但与其等待该补丁通过系统运行,我想我会确定我不只是做错了什么。

关于文件类型的一些额外信息:

$ ffmpeg -i EP00753796.0160_1357005474.67.mpg

[mpeg2video @ 0x629fa0] mpeg_decode_postinit() failure
    Last message repeated 2 times
[mpegts @ 0x626320] PES packet size mismatch
Input #0, mpegts, from 'EP00753796.0160_1357005474.67.mpg':
  Duration: 00:29:59.69, start: 69837.938167, bitrate: 17997 kb/s
  Program 3 
    Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 17000 kb/s, 30.43 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x34](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), s16, 384 kb/s
    Stream #0:2[0x35](esl): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, s16, 192 kb/s (visual impaired)

还有我的管道:

pipeline = gst_parse_launch("filesrc location=EP00753796.0160_1357005474.67.mpg ! decodebin name=decoder decoder. ! queue ! audioconvert ! audioresample ! alsasink decoder. ! deinterlace ! videoconvert ! xvimagesink",&error);

尽管我在同一个 C 程序中使用 playbin 得到了相同的行为。

任何想法将不胜感激。谢谢。

4

0 回答 0