Video playback not working in Ubuntu 11.10

7,340

Solution 1

This could be due to conflicting plugins - especially if you have been playing installing various media players and other codecs.

Unfortunately - plugins arent necessarily obviously named so to find the correct conflicting pluging could be difficult.

If you don't mind a bit of breakage (you can always reinstall afterwards) then you could try the following. Alternatively use Clonezilla or Partimage to backup your hard-drive if you want a quick way to recover.

remove conflicting media players

sudo apt-get remove smplayer
sudo apt-get remove mplayer
sudo apt-get remove libx264-67 --purge
sudo apt-get remove vlc

Disable Medibuntu repository

As the title says - in software sources, until medibuntu if you have it enabled.

tidy up installed codecs

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

Note - if you have E: Unable to locate package xxxx" type statements - remove the missing package from the line above.

reinstalling codecs

Try playing your video - install only the codec that Totem says that is missing. i.e.

sudo apt-get install [package-name]

Usually installing ubuntu-restricted-extras (or the variant for lubuntu/xubuntu/kubuntu) is safe, so you could try installing that package again.

i.e. - for ubuntu

sudo apt-get install ubuntu-restricted-extras

source


There is a report on the archlinux forums with regards to the gstreamer-ffmpeg version which looks like it could apply to Ubuntu and your issue.

Ubuntu 11.10 and archlinux share the same version:

Developers of gstreamer have decided to switch to libav (a fork of ffmpeg) as of version 0.10.12. Some of the functions libav provides are not the same as in ffmpeg, and there's a problem: any application that depends on those ffmpeg function calls (from gstreamer0.10-ffmpeg plugin) will not function

I think this should be reported as a launchpad bug report.

Assuming that it is this problem - two possible workarounds.

  1. Use vlc as your video-player - it doesnt depend on gstreamer.
  2. Install the ffmpeg package and use ffplay to play your videos.

File the bug report - however I hope someone else can resolve your issue in the interim.

Solution 2

Judging from the output of gst-launch, my guess is that this is indeed a codec problem, at least for that file. If installing gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly doesn't help, I think your best option is to use vlc for that files.

If however no videos work at all, not even running

gst-launch-0.10 videotestsrc ! autovideosink

then there's definitely a problem with video output too. Try running gstreamer-properties and make sure all the test buttons for output work.

Share:
7,340
Questioner
Author by

Questioner

Updated on September 18, 2022

Comments

  • Questioner
    Questioner over 1 year

    (Ubuntu 11.10, Gnome Classic with Compiz, Nvidia graphics card)

    This problem occurs with every and all video, whether it's a Youtube video in Firefox, an AVI file in movie player, or any other video. Video simply does not work.

    When I start any kind of video, the image halts after a second or two. The sound, however, continues.

    Before it seemed that if I delete all the files in ~/.gstreamer-0.10/, then reboot, the video will play. However this is no longer the case. Manipulating files in that directory does nothing to help the situation.

    I am now no longer sure this is a gstreamer issue or something else. I am open to any and all possibilities.

    How can I get video playback to run smoothly on my machine?


    Update: VLC seems to be working now. However, video will not play in any browser, so there is still something amiss.


    As requested in comments, this is the output from playing from the command line. Note it says "Your system is too SLOW to play this!" which is patently untrue. The computer has never had any trouble playing video of any size up until upgrading to 11.10. I am assuming that this is symptomatic of some other problem.

    $ 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)
    

    More requested command line output:

    $ 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 ...
    
    • nilsonneto
      nilsonneto over 12 years
      Dave - are you absolutely sure compiz is running? I've come across a similar issue on Lubuntu where flash videos halted because there was no compositer running.
    • bseibold
      bseibold over 12 years
      Do mplayer or vlc work? If not, please add the console output of mplayer when trying to playback a video using mplayer filename
    • Questioner
      Questioner over 12 years
      @fossfreedom: Every indication is that Compiz is running. Desktop cube, wobbly windows, expo... I'm pretty sure they would not be working if Compiz were not on.
    • Questioner
      Questioner over 12 years
      @bse: VLC works! Which is encouraging. However, no video in any browser works, so there is still something amiss. Also, I have updated the question with the command line output you requested.
    • bseibold
      bseibold over 12 years
      The problem with mplayer is likely to be related to sound, and will probably go away if you add -ao pulse. So it looks like your error is indeed with gstreamer. Could you please try if this works, and post the result if there are errors/warnings? gst-launch-0.10 --gst-debug='*:2' playbin2 uri=file:///home/user/complete/path/to/file. If you cancel playback, please do so by pressing Ctrl-C in the command line, not by closing the video window.
    • Questioner
      Questioner over 12 years
      @bse: Using -ao pulse did not change anything. I've added the command line output you requested to the question.
    • nilsonneto
      nilsonneto over 12 years
      @DaveMG - to see if this is a sound issue - try the sound trouble-shooting step 1 for oneiric as per this wiki - N.B. replace "gdm" with "lightdm" - this is a mistake. help.ubuntu.com/community/SoundTroubleshootingProcedure
    • Questioner
      Questioner over 12 years
      @fossfreedom: I'm hesitant to start making changes to my sound set up. Note that when I play video of any kind, the sound works fine, it is only the image that is frozen. Also, other applications, like Banshee and Clementine work perfectly. Is it likely to be a sound problem when it seems to me that sound is the only thing that is working?
    • nilsonneto
      nilsonneto over 12 years
      hmmm - I'm just following through bse observation - In these circumstances when I'm doing fundamental changes I always backup my system to an external hard-drive using clonezilla - I then have a quick way to restore. If you dont have a means to backup - can I suggest wait - hopefully someone else might have a better answer.
    • user5950
      user5950 over 12 years
      Are you sure that this is not a Compiz issue? Which type of graphics an drivers are you running?
    • Questioner
      Questioner over 12 years
      @user15533: I'm not sure it's not a Compiz issue, I am only sure that Compiz is running. I have no idea what the root of the problem is. I am running an Nvidia driver. I don't know how to be more specific, though, unless you give me a more specific method of giving the information.
    • Questioner
      Questioner over 12 years
      I have mooted this problem by doing a complete reinstall of Ubuntu, and changing hardware configurations.
  • Questioner
    Questioner over 12 years
    Great instructions. Thanks. However, one question... the line where you only have the word "reinstall" in the paragraph... Reinstall what, exactly?
  • Questioner
    Questioner over 12 years
    Thank you for the clarification. I went though all the steps. Rebooted. When I attempted to play a video, it said I needed to install 3 gstreamer packages. I let it automatically download them. After that, video does not play at all. Before there was sound, and now, there's not even that. :( I then tried installing restricted-extras. Did not help. Any ideas on how to progress from here?
  • Questioner
    Questioner over 12 years
    There were too many to list in a comment, so I took a screenshot and appended it to my question.
  • Questioner
    Questioner over 12 years
    I've revised the uploaded images to show what packages I have installed after removing the non-canonical ones. I also put an example of the packages Ubuntu wants to download (after the latest package changes). After letting it install, it still does not play the video. To answer your other question - this applies to all video, whether played in the browser, with gnome player, or anything else.
  • nilsonneto
    nilsonneto over 12 years
    ok - some more thoughts in an update - I'm out of ideas. I hope someone else can help you.
  • Questioner
    Questioner over 12 years
    Thank you for responding. I have those packages installed. The gstreamer-properties tests and the gst-launch command you suggest seem to work. In either case, I get an image of colour bars that comes up.
  • Patrick
    Patrick over 12 years
    Gtk-WARNING **: Unknown property: GtkDialog.has-separator gstreamer-properties-Message: Skipping unavailable plugin 'artsdsink' gstreamer-properties-Message: Skipping unavailable plugin 'esdsink' gstreamer-properties-Message: Skipping unavailable plugin 'sunaudiosink' ... 'glimagesink' ... 'sdlvideosink' ... 'v4lmjpegsrc' ... 'qcamsrc' ... 'v4lsrc' gstreamer-properties-Message: Skipping unavailable plugin 'esdmon' gstreamer-properties-Message: Skipping unavailable plugin 'sunaudiosrc'