Ubuntu can't play MKV files?

The place to discuss linux version of MakeMKV
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Ubuntu can't play MKV files?

Post by brianp »

Hi,
I am using makemkv latest compiled from source and actually created a huge mkv file. No player on ubuntu 9.10 can read it.

Xine poofs away as soon as I select the file as though I hit exit rather than play. Vlc has no sound and 2 frames per second at full screen (2560x1600). It's single threaded and may not be using SSE. MPlayer has great sound and zero video.

Mplayer has an option to use multiple threads so I thought I would build it from source. I can't get the GUI going:
brianp@trex:~/download/mplayer/mplayer-export-2010-06-14$ ./configure --enable-gui
<snip>
Checking for GUI ... yes
Error: The GUI requires libavcodec with PNG support (needs zlib).

Synaptic shows that I do have libavcodec-dev and libavcodec52, both 4.0.5.1 which is latest.

Which exact magical incantations are required to use the mkv files on Linux?

Thank you,
BrianP
crowfax
Posts: 972
Joined: Thu Feb 18, 2010 5:55 am

Re: Ubuntu can't play MKV files?

Post by crowfax »

What type of disc did you rip? As far as I'm aware Totem will play MKV's made from DVD's and Blu-ray discs.

Also, try the latest VLC nightly: http://nightlies.videolan.org/
Home Theater PC: Assassin HTPC, XBMCbuntu 12.0 (Frodo), Intel i5 3570k 3.4 GHz Ivy Bridge w/ HD 4000, LG BD-ROM
Playback Devices: Mede8er MED600X3D, MyGica EnjoyTV 120, Xtreamer SideWinder 3, Crystal Acoustics MediaMatchBox
theophile
Posts: 21
Joined: Sat Jan 09, 2010 5:44 am

Re: Ubuntu can't play MKV files?

Post by theophile »

More info needed. What hardware do you have? Particularly CPU and video card. Also why not just install mplayer from the repos? Finally, what errors do you get from Xine on crash?
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Re: Ubuntu can't play MKV files?

Post by brianp »

Hi,
System: Q9550, 2.83 GHz, quad core, core 2
ATI radeon 4850 512 mb with ATI Linux driver installed.
4 GB Patriot Viper PC1333, CAS 7-7-7-20 RAM
Velociraptor 300 hard drive
LG 30 inch, 2560x1600 LCD monitor, 4 million pixels
This should be umpteen times as much crunch power as I need. I watch blu-ray dvds with xp on the same hardware with perfect results and ~27% cpu. See mediainfo below.

The main problem is VLC will show the Cuttlefish 1080p HD diving video only in a tiny, YouTube size window. Anything larger, the frame rate drops. Only ~2fps at full screen. My cpu meters show only 1 core active. The binary might not have been compiled for SSE2 or SSSE3 (?). And, there is no audio.

Mplayer can't decode WMV VC-1, but the sound is great. I want to build it from source to take advantage of as many CPU bells + whistles as possible and use threads=4 to try to get it to play at full screen. I need to compile something, mplayer, ffmpeg, ??? with support for the wmv codec. How do I do this?

Xine just poofs and is gone. I have no idea where to look for it's log files. I am disappointed with its behaviour and it has always been buggy. At least MPlayer gives you an error message to track down. I like mplayer so I figured I would try it first.

The whole thing could just be a codec problem. I would like to have it from source too and 64 bit. Is this necessary/possible?

Thanks,
BrianP


MediaInfo dump:
General
Complete name : /home/brianp/Videos/cuttlefish/title02.mkv
Format : Matroska
File size : 24.8 GiB
Duration : 2h 36mn
Overall bit rate : 22.7 Mbps
Encoded date : UTC 2010-06-13 20:55:43
Writing application : MakeMKV v1.5.6 beta linux(x64-release)
Writing library : libmakemkv v1.5.6 beta (0.7.7/0.8.1) x86_64-linux-gnu

Video
ID : 1
Format : VC-1
Format profile : AP@L3
Codec ID : WVC1
Codec ID/Hint : Microsoft
Duration : 2h 35mn
Bit rate : 19.9 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.400
Stream size : 21.7 GiB (87%)
theophile
Posts: 21
Joined: Sat Jan 09, 2010 5:44 am

Re: Ubuntu can't play MKV files?

Post by theophile »

Okay, that helps. Yes, CPU is plenty fine. Yes, Xine is temperamental. Try running it from the terminal to see if it gives you any more useful information. It probably won't.

Mplayer from the Ubuntu repos is 64-bit if you're running the AMD64 version of Ubuntu. It should also support multithreading out of the box. Mplayer handles the WVC-1 codec just fine, although it relies on Windows libraries to do it, libraries that are not installed (or available via apt) by default. You can enable them via the Medibuntu repo which you can read about here:

https://help.ubuntu.com/community/Medibuntu

The packages you are looking for are w32codecs and w64codecs. I'm pretty sure wvc1dmod.dll (which provides the WVC-1 codec) is in the former.

If you still want to compile mplayer from source, I highly recommend the following guide:

http://ubuntuforums.org/showthread.php?t=558538

I use this on my machines and with some slight tweaking for my purposes, it has always served me well. Good luck!
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Re: Ubuntu can't play MKV files?

Post by brianp »

Theophile,
I think I have everything you recommended. Check this out:
brianp@trex:/r5/video$ /bin/ls -l ` loc wvc1dmod.dll`
-rw-r--r-- 1 root root 1184984 2006-05-20 10:16 /usr/lib/codecs/wvc1dmod.dll

brianp@trex:/r5/video$ dpkg -l | grep codecs | grep w
ii w32codecs 20071007-0medibuntu5 Win32 codec binaries
ii w64codecs 20071007-0medibuntu2 Proprietary codec binaries, x86_64 version

brianp@trex:~/Videos/cuttlefish$ ll `fcmd.pl -e mplayer`
-rwxr-xr-x 1 root root 4.5M 2009-12-08 23:27 /usr/bin/mplayer
-rwxr-xr-x 1 root root 4.5M 2009-12-08 23:27 /usr/bin/X11/mplayer
-rwxr-xr-x 1 root root 11M 2010-06-15 16:23 /usr/local/bin/mplayer
brianp@trex:~/Videos/cuttlefish$ ll `fcmd.pl gmplayer`
-rwxr-xr-x 1 root root 4.9M 2009-12-08 23:27 /usr/bin/gmplayer
-rwxr-xr-x 1 root root 4.9M 2009-12-08 23:27 /usr/bin/X11/gmplayer
lrwxrwxrwx 1 root root 7 2010-06-15 16:23 /usr/local/bin/gmplayer -> mplayer
brianp@trex:~/Videos/cuttlefish$ which mplayer
/usr/local/bin/mplayer

I am still getting video and this error popup: Error opening/initializing the selected video_out (-vo) device.
brianp@trex:~/Videos/cuttlefish$ /usr/local/bin/gmplayer title02.mkv
MPlayer 1.0rc3-4.4.1 (C) 2000-2009 MPlayer Team
[GUI] Adding video filter: pp

Playing /home/brianp/Videos/cuttlefish/title02.mkv.
Cache fill: 0.00% (0 bytes)
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_DTS) "3/2+1", -aid 0, -alang eng
[mkv] Track ID 3: audio (A_AC3) "3/2+1", -aid 1, -alang eng
[mkv] Track ID 4: audio (A_AC3) "2/0", -aid 2, -alang fra
[mkv] Subtitle type 'S_HDMV/PGS' is not supported.
[mkv] Track ID 5: subtitles (S_HDMV/PGS), -sid 0, -slang eng
<snip>
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [WVC1] 1920x1080 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Requested audio codec family [dts] (afm=libdca) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Video: no video

How does one begin to debug this?

Thank you,

BrianP
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Re: Ubuntu can't play MKV files?

Post by brianp »

Theophile,
One additional note. I tried to play the 24 GB MKV file on a virtualbox xp/32bit install using latest 1.0.5 VLC for windoz 32 bit. Due to severe CPU limitations in virtualization, the video was quite choppy. It crashed and vanished away as soon as I tried to index into the middle of the video. It left a window with this error message:
No suitable decoder module:
VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this.

I am still left with zero options on either Linux or windoz to try out the MKV file.

What a drag!

BrianP
skittle
Posts: 349
Joined: Thu Jan 14, 2010 4:23 am

Re: Ubuntu can't play MKV files?

Post by skittle »

try this:

Code: Select all

$mplayer title.mkv -vo xv
EXTRA emphasis on selecting xv as the video out device!
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Re: Ubuntu can't play MKV files?

Post by brianp »

Skittle,
brianp@trex:~/Videos/cuttlefish$ /usr/local/bin/mplayer title02.mkv -vo xv
MPlayer 1.0rc3-4.4.1 (C) 2000-2009 MPlayer Team
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
...
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [WVC1] 1920x1080 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Video: no video

I did reboot to xp and neither windoz braindead media player 11 nor vlc 1.0.5 would play it. Vlc could not go beyond 1/2 of the video and then the video disappeared. But, the CCCP tools from Matroska actually looked fairly good, had only a few 1-2 second video lockups and fairly many 2-6 second audio dropouts. I scanned through to the end and it looked marginally passable.

Unfortunately, it is not a Linux solution. Boot to 1 system to extract. Reboot to another to watch. Reboot back to get your work done. There are numerous, free windoz solutions to both extract and watch.

When I installed CCCP, it was double click, agree, next, next, ... watch. That simple. I did not have to spend days doing brain surgery on my system.

Not a potential customer in a million is going to go through what I have endured these past 2 days to get viewable results. The few hardcore hackers who can and will won't need to buy a GUI anyway. They will use the freeware command line version.

I expect that MakeMKV's Linux revenues will prove my point. It is way, way, way to hard to get results to be worth while until they deliver a closed loop solution.

We were so close.

Ouch,

BrianP
theophile
Posts: 21
Joined: Sat Jan 09, 2010 5:44 am

Re: Ubuntu can't play MKV files?

Post by theophile »

Agreed, and if that doesn't work, please post the output of:

Code: Select all

xvinfo
The mplayer output indicates that mplayer is recognizing the video codec properly. There is also an error with the DTS audio track. That's decodable on Linux but for some reason it seems not to be compiled in. To play the AC3, add this to your mplayer line:

Code: Select all

-aid 1
It might also help to see the output of this:

Code: Select all

lsmod | grep fglrx
theophile
Posts: 21
Joined: Sat Jan 09, 2010 5:44 am

Re: Ubuntu can't play MKV files?

Post by theophile »

brianp wrote:Not a potential customer in a million is going to go through what I have endured these past 2 days to get viewable results. The few hardcore hackers who can and will won't need to buy a GUI anyway. They will use the freeware command line version.

I expect that MakeMKV's Linux revenues will prove my point. It is way, way, way to hard to get results to be worth while until they deliver a closed loop solution.
I suspect your gfx card is not configured properly. I have helped troubleshoot users' systems in connection with the mlbviewer project and invariably, these sorts of problems are caused by improper/incorrect video drivers and/or botched mplayer compilations. I'm not blaming you or anything, I'm just saying that maybe you should lay off the inflammatory language until you get to the bottom of things. Being pleasant tends to make people more helpful.
theophile
Posts: 21
Joined: Sat Jan 09, 2010 5:44 am

Re: Ubuntu can't play MKV files?

Post by theophile »

Okay, did some more investigation. Try this mplayer line and see what you get:

Code: Select all

mplayer -ao null -vc ffvc1
This will force the use of the ffmpeg VC1 library and disable sound (for troubleshooting purposes). I downloaded the 15mbps VC1 sample from here:

http://samples.mplayerhq.hu/V-codecs/WVC1/

and confirmed that I am able to play this back properly using 64-bit mplayer.
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Re: Ubuntu can't play MKV files?

Post by brianp »

Theophile,
Glad to see that you're not still mad at me. :)
brianp@trex:/mnt/xpdat$ mplayer -ao null -vc ffvc1 title02.mkv
MPlayer 1.0rc3-4.4.1 (C) 2000-2009 MPlayer Team

Playing title02.mkv.
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_DTS) "3/2+1", -aid 0, -alang eng
[mkv] Track ID 3: audio (A_AC3) "3/2+1", -aid 1, -alang eng
[mkv] Track ID 4: audio (A_AC3) "2/0", -aid 2, -alang fra
[mkv] Subtitle type 'S_HDMV/PGS' is not supported.
[mkv] Track ID 25: subtitles (S_HDMV/PGS), -sid 10, -slang eng
<snip>
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [WVC1] 1920x1080 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Forced video codec: ffvc1
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[vc1 @ 0xd36580]Incomplete extradata
Could not open codec.
VDecoder init failed :(
Cannot find codec matching selected -vo and video format 0x31435657.
Read DOCS/HTML/en/codecs.html!
==========================================================================
==========================================================================
Requested audio codec family [dts] (afm=libdca) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
AO: [null] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video


root@trex:/home/brianp# xvinfo
X-Video Extension version 2.2
screen #0
Adaptor #0: "Radeon Textured Video"
number of ports: 16
port base: 57
operations supported: PutImage
supported visuals:
depth 24, visualID 0x21
number of attributes: 6
"XV_VSYNC" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 1)
"XV_BRIGHTNESS" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_CONTRAST" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_SATURATION" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_HUE" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_COLORSPACE" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
maximum XvImage size: 8192 x 8192
Number of image formats: 4
id: 0x32595559 (YUY2)
guid: 59555932-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x32315659 (YV12)
guid: 59563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x30323449 (I420)
guid: 49343230-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x59565955 (UYVY)
guid: 55595659-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)

root@trex:/home/brianp# lsmod | grep fglrx
root@trex:/home/brianp#
This is weird. My windows are very snappy. Before I installed the ATI driver, they were slugish. I do have the ATI catalyst control center admin loaded. But, Failed to execute child process 'amdxdg-s' (no such file or directory). amdcccle is not in the path either. Hmmm. DVDs play fine.

I will reinstall the latest amd/ati driver and report back. I am running a big job right now.

The audio is broken too, but I figured I would burn that bridge when I get to it. Hopefully, it will be an easy configure option to get it built into mplayer permanently. It builds very easily. VLC must have a hundred configure options. I am sure I am missing a bunch.

Thanks 1E6,

Brian
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Re: Ubuntu can't play MKV files?

Post by brianp »

Theophile,
I reinstalled the ati driver, latest 64 bit from ati.com. Upon reboot, it ate my kernel. Kernel panic and no boot. Libc.so.6 can't open share file.

I had to reboot to the previous kernel. It installed OK on this one. Egad! Building vlc, mplayer, mediainfo, ffmpeg, matroska, makemkv and myriad dependencies while mixing 32bit and 64bit codecs has hosed something. I was meaning to setup Ubu 10.4 anyway. ;(

brianp@trex:/mnt/xpdat$ /usr/local/bin/gmplayer -ao null -vc ffvc1 title02.mkv
MPlayer 1.0rc3-4.4.1 (C) 2000-2009 MPlayer Team
[GUI] Adding video filter: pp
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_DTS) "3/2+1", -aid 0, -alang eng
[mkv] Track ID 3: audio (A_AC3) "3/2+1", -aid 1, -alang eng
[mkv] Track ID 4: audio (A_AC3) "2/0", -aid 2, -alang fra
[mkv] Subtitle type 'S_HDMV/PGS' is not supported.
[mkv] Track ID 5: subtitles (S_HDMV/PGS), -sid 0, -slang eng
[mkv] Track ID 25: subtitles (S_HDMV/PGS), -sid 10, -slang eng
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [WVC1] 1920x1080 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Requested audio codec family [dts] (afm=libdca) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
AO: [null] 48000Hz 2ch floatle (4 bytes per sample)
Video: no video

brianp@trex:/mnt/xpdat$ lsmod | grep fglrx
fglrx 2459640 28

BrianP
brianp
Posts: 14
Joined: Mon Jun 14, 2010 4:18 pm

Re: Ubuntu can't play MKV files?

Post by brianp »

Oh Crap!
MakeMKV BETA poopup
Fatal error occurred, program will now exit.

ok

Brian
Post Reply