视频播放在 Ubuntu 11.10 中不起作用

Que*_*ner 5 video nvidia 11.10 gstreamer

(Ubuntu 11.10, Gnome Classic with Compiz, Nvidia 显卡)

每个视频都会出现此问题,无论是 Firefox 中的 Youtube 视频、电影播放器​​中的 AVI 文件,还是任何其他视频。视频根本不起作用。

当我开始播放任何类型的视频时,图像会在一两秒后停止。然而,声音还在继续。

之前似乎如果我删除 中的所有文件~/.gstreamer-0.10/,然后重新启动,视频就会播放。然而,情况已不再如此。操作该目录中的文件对这种情况没有任何帮助。

我现在不再确定这是 gstreamer 问题还是其他问题。我对任何和所有可能性都持开放态度。

如何让视频播放在我的机器上流畅运行?


更新: VLC 现在似乎正在工作。但是,视频不会在任何浏览器中播放,因此仍然存在一些问题。


根据评论中的要求,这是从命令行播放的输出。请注意,它说“您的系统太慢,无法播放!” 这显然是不真实的。在升级到 11.10 之前,计算机播放任何大小的视频都没有任何问题。我假设这是其他一些问题的征兆。

$ mplayer standup_20090523.mp4
MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing standup_20090523.mp4.
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  480x320  24bpp  29.970 fps  706.1 kbps (86.2 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 creation_time: 1970-01-01 00:00:00
 encoder: Lavf52.64.2
Load subtitles in .
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Asking decoder to use 4 threads if supported.
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 123.9 kbit/8.07% (ratio: 15492->192000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
A:   0.0 V:   0.0 A-V:  0.000 ct:  0.000   0/  0 ??% ??% ??,?% 0 0 
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [vdpau] 480x320 => 480x360 Planar YV12 
[vdpau] Got display refresh rate 60.020 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption manually.
A:   0.2 V:   0.3 A-V: -0.040 ct: -0.000   0/  0 ??% ??% ??,?% 0 0 
[AO_ALSA] Write error: Broken pipe
[AO_ALSA] Trying to reset soundcard.
A:   7.7 V:   2.0 A-V:  5.775 ct: -0.000   0/  0  7%  4% 61.8% 50 0 


           ************************************************
           **** Your system is too SLOW to play this!  ****
           ************************************************

Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
  - Try -ao sdl or use the OSS emulation of ALSA.
  - Experiment with different values for -autosync, 30 is a good start.
- Slow video output
  - Try a different -vo driver (-vo help for a list) or try -framedrop!
- Slow CPU
  - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,
    e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- Broken file
  - Try various combinations of -nobps -ni -forceidx -mc 0.
- Slow media (NFS/SMB mounts, DVD, VCD etc)
  - Try -cache 8192.
- Are you using -cache to play a non-interleaved AVI file?
  - Try -nocache.
Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.

A:   7.9 V:   8.0 A-V: -0.036 ct:  0.000   0/  0  2%  2% 15.2% 218 0 
[AO_ALSA] Write error: Broken pipe
[AO_ALSA] Trying to reset soundcard.
A:  11.1 V:  11.2 A-V: -0.043 ct:  0.000   0/  0  2%  2% 19.3% 300 0 
[AO_ALSA] Write error: Broken pipe
[AO_ALSA] Trying to reset soundcard.
A:  16.7 V:  11.2 A-V:  5.443 ct:  0.000   0/  0  2%  2% 24.7% 300 0 

Exiting... (Quit)
Run Code Online (Sandbox Code Playgroud)

更多请求的命令行输出:

$ gst-launch-0.10 --gst-debug='*:2' playbin2 uri=file:///home/dave/Vi
Videos/ Visa/   
dave@homebase:~/Videos/Stand_Up_for_Mobile$ gst-launch-0.10 --gst-debug='*:2' playbin2 uri=file:///home/dave/Videos/Stand_Up_for_Mobile/standup_20090523.mp4
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.070988199 19816  0x97287c0 WARN                 qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avc1
0:00:00.071037322 19816  0x97287c0 WARN                 qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avcC
0:00:00.071062385 19816  0x97287c0 WARN                 qtdemux qtdemux.c:8541:qtdemux_parse_tree:<qtdemux0> Can't handle datetimes before 1970 yet, please file a bug at http://bugzilla.gnome.org
0:00:00.071373884 19816  0x97287c0 WARN                 qtdemux qtdemux.c:6896:qtdemux_parse_trak:<qtdemux0> unknown version 00000000
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.147461464 19816  0x959f050 WARN                     bin gstbin.c:2380:gst_bin_do_latency_func:<playbin20> did not really configure latency of 0:00:00.000000000
New clock: GstPulseSinkClock
0:00:27.651053215 19816  0x992aef0 WARN                   pulse pulsesink.c:630:gst_pulsering_stream_underflow_cb:<audiosink-actual-sink-pulse> Got underflow
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 45797315295 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Run Code Online (Sandbox Code Playgroud)

fos*_*dom 2

这可能是由于插件冲突 - 特别是如果您一直在安装各种媒体播放器和其他编解码器。

不幸的是 - 插件不一定有明显的命名,因此找到正确的冲突插件可能很困难。

如果您不介意稍微损坏(之后可以随时重新安装),那么您可以尝试以下操作。如果您想要快速恢复,也可以使用ClonezillaPartimage来备份您的硬盘。

删除冲突的媒体播放器

sudo apt-get remove smplayer
sudo apt-get remove mplayer
sudo apt-get remove libx264-67 --purge
sudo apt-get remove vlc
Run Code Online (Sandbox Code Playgroud)

禁用 Medibuntu 存储库

正如标题所说 - 在软件源中,直到 medibuntu(如果您启用了它)。

整理已安装的编解码器

sudo apt-get remove --purge ffmpeg gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-ugly liba52-0.7.4 libavcodec52 libavformat52 libavutil49 libdvdnav4 libdvdread4 libgsm1 libid3tag0 libmad0 libmpeg2-4 libpostproc51 libschroedinger-1.0-0 libsidplay1 libswscale0 libtwolame0 ubuntu-restricted-extras libavcodec52 libavformat52 libswscale0 libvlc2 libvlccore2 vlc vlc-data vlc-nox vlc-plugin-pulse
Run Code Online (Sandbox Code Playgroud)

注意 - 如果您有E: Unable to located package xxxx”类型语句 - 从上面的行中删除丢失的包。

重新安装编解码器

尝试播放您的视频 - 仅安装 Totem 指出缺少的编解码器。IE

sudo apt-get install [package-name]
Run Code Online (Sandbox Code Playgroud)

通常安装ubuntu-restricted-extras(或 lubuntu/xubuntu/kubuntu 的变体)是安全的,因此您可以尝试再次安装该软件包。

ie - 适用于 ubuntu

sudo apt-get install ubuntu-restricted-extras
Run Code Online (Sandbox Code Playgroud)

来源


archlinux 论坛上有一份关于 gstreamer-ffmpeg 版本的报告,看起来它可能适用于 Ubuntu 和您的问题。

Ubuntu 11.10 和 archlinux 共享相同版本:

gstreamer 的开发人员决定从 0.10.12 版本开始切换到 libav(ffmpeg 的一个分支)。libav 提供的一些功能与 ffmpeg 中的不同,并且存在一个问题:任何依赖于这些 ffmpeg 函数调用(来自 gstreamer0.10-ffmpeg 插件)的应用程序将无法运行

我认为这应该作为启动板错误报告进行报告。

假设是这个问题 - 两种可能的解决方法。

  1. 用作vlc您的视频播放器 - 它不依赖于 gstreamer。
  2. 安装该ffmpeg软件包并用于ffplay播放您的视频。

提交错误报告 - 但我希望其他人可以暂时解决您的问题。


bse*_*old 1

从 gst-launch 的输出来看,我的猜测是这确实是一个编解码器问题,至少对于该文件来说是这样。如果安装gstreamer0.10-ffmpeg,gstreamer0.10-plugins-badgstreamer0.10-plugins-ugly没有帮助,我认为最好的选择是使用 vlc 来处理该文件。

但是,如果视频根本不起作用,甚至无法运行

gst-launch-0.10 videotestsrc ! autovideosink
Run Code Online (Sandbox Code Playgroud)

那么视频输出肯定也有问题。尝试运行gstreamer-properties并确保所有输出测试按钮都工作。