Page 1 of 2
mkv h.264 playback problems
Posted: 20 Apr 2009 06:48
by radiant
Hello,
I did some searching on the forum, but couldn't find much. Hopefully someone can help me out here.
For a while now, VLC seems to have problems playing mkv files on my macbook. It plays typically alright, and then certain segments, usually a scene where there's some substantial and sudden movement, it freezes. The audio continues to play, but all I get is a still frame for 3-5 seconds before the video resumes. Audio doesn't break at all though, so I basically just miss a bit of the action. It happens consistently in the same spot. Not sure if it's the mkv file itself, or VLC, but mplayer doesn't have a problem with it in Windows.
Hmmm... just tried it in VLC for Windows as well, and it still has the same problem...
Any insight would be appreciated! Thanks.
Re: mkv h.264 playback problems
Posted: 20 Apr 2009 07:23
by radiant
Since this problem seems to be happening in Windows as well, I did a search on the Windows side of the forum, and found that the problem is that mkv h.264 is reliant on CPU rather than GPU, and that VLC has been having issues with mkv for a while now. Though it's weird that it freezes at the exact same spot, even on a completely different machine.
I guess I'll wait for the upcoming 1.0.0 update to see if this issue has been addressed...
Re: mkv h.264 playback problems
Posted: 21 Apr 2009 15:32
by huhuhu
This problem is very annoying with mkv files, but is occurs at any other divx or xvid content as well. The video plays but after five minutes it stops for five-ten seconds while playing audio. Afterwards the picture is noisy for a while then it gets normal for another five minutes.
Re: mkv h.264 playback problems
Posted: 03 May 2009 09:40
by blackfire
I'm having the same problem when I try to watch 1080p videos on my Mac Mini.
I have a Mac Mini (Early 2009) with nVidia 9400 - 256MB video chipset and 4GB of RAM. In this same machine I run 1080p videos using Windows with BootCamp in Windows Media Player without any problems, but I can't find how to play 1080p HD films in the Mac. I'm new to Mac, and I thought the OS would be more efficient than Windows to run HD media.
Any help would be appreciated.
Thanks!!
Re: mkv h.264 playback problems
Posted: 03 May 2009 18:18
by radiant
I'm having the same problem when I try to watch 1080p videos on my Mac Mini.
I have a Mac Mini (Early 2009) with nVidia 9400 - 256MB video chipset and 4GB of RAM. In this same machine I run 1080p videos using Windows with BootCamp in Windows Media Player without any problems, but I can't find how to play 1080p HD films in the Mac. I'm new to Mac, and I thought the OS would be more efficient than Windows to run HD media.
Any help would be appreciated.
Thanks!!
As I had said earlier, h.264 uses CPU rather than GPU. You're trying to play full 1080p video on an underpowered CPU. I can't say Mac OS is more efficient, but it handles GPU tasks better than Windows, and has some better management for CPU stuff too.
Re: mkv h.264 playback problems
Posted: 04 May 2009 01:46
by blackfire
As I had said earlier, h.264 uses CPU rather than GPU. You're trying to play full 1080p video on an underpowered CPU. I can't say Mac OS is more efficient, but it handles GPU tasks better than Windows, and has some better management for CPU stuff too.
If it was true that it doesn't play right because of the CPU, and that h.264 video relies only on the CPU power, then why the same 1080p videos play seamlessly without any problems on Windows 7 running on this same Mac Mini??
Tank you for your reply, but I think there should be a better explanation, and if this Mac is not able to handle 1080p videos, I think its not because of the hardware, but because of VLC's decoder or Mac OS X. However, I'm trying to find out if anyone has found a workaround to it.
Re: mkv h.264 playback problems
Posted: 04 May 2009 02:04
by radiant
Keep in mind also that Windows Media Player is not VLC.
For me, the same problem occurs for VLC on both Windows and Mac. It sounds to me like your problem is different.
In any case, I hope the new 1.0 will have dealt with some of these issues.
Re: mkv h.264 playback problems
Posted: 06 May 2009 19:43
by ajmas
If it was true that it doesn't play right because of the CPU, and that h.264 video relies only on the CPU power, then why the same 1080p videos play seamlessly without any problems on Windows 7 running on this same Mac Mini??
Is this using the same version of VLC on both Windows 7 and MacOS X?
Re: mkv h.264 playback problems
Posted: 06 May 2009 20:25
by radiant
If it was true that it doesn't play right because of the CPU, and that h.264 video relies only on the CPU power, then why the same 1080p videos play seamlessly without any problems on Windows 7 running on this same Mac Mini??
Is this using the same version of VLC on both Windows 7 and MacOS X?
No, apparently, he's using Windows Media Player in Windows, and VLC in Mac.
Re: mkv h.264 playback problems
Posted: 06 May 2009 22:05
by ajmas
Is this using the same version of VLC on both Windows 7 and MacOS X?
No, apparently, he's using Windows Media Player in Windows, and VLC in Mac.
Ah, missed that. So, Apples and Oranges then (no pun intended). BTW If VLC uses 'Core Graphics', would that not offload the load to the GPU, or is that only for the rendering portion of the pipeline? If it is only the final stage, has anyone started to look into OpenCL based codecs as a possible direction in the future?
Edit: Just seen this thread:
DirectX - Support for hardware acceleration , which might be of interest, even if it starts off as a MS-Windows oriented topic.
Re: mkv h.264 playback problems
Posted: 06 May 2009 22:11
by nobody.loopback
Keep in mind also that Windows Media Player is not VLC.
For me, the same problem occurs for VLC on both Windows and Mac. It sounds to me like your problem is different.
In any case, I hope the new 1.0 will have dealt with some of these issues.
You might try a look into the future:
go to:
hxxp://mplayerosx.sttz.ch
This guy has built his own frontend to mplayer. This is nothing special, but he includes a binary of mplayer built with the ffmpeg-mt multithreaded video decoding library.
Download the package, right click the application, choose "show package contents".
now, navigate to: Contents/Resources/External_Binaries.
You find a file here called: mplayer-mt.
Again, right klick, choose "show package contents".
navigate to: Contents/MacOS
here is the mplayer binary: mplayer
copy this to your desktop
now, open a terminal,
drag and drop the mplayer into the terminal window,
drag and drop a mkv file of your choice in the terminal window,
add: -cache 16384 -lavdopts threads=6
to the command.
hit enter.
Enjoy ( more or less, because audio sync does not work very good, but video with 1080p works great, even on my old PPCG5 2Ghz )
VLC also relies on ffmpeg for decoding H.264 video. It will hopefully not take very long until this new ffmpeg version is included in VLC.
Re: mkv h.264 playback problems
Posted: 06 May 2009 22:17
by Jean-Baptiste Kempf
Suggesting to use a not official ffmpeg is not a good idea...
Re: mkv h.264 playback problems
Posted: 06 May 2009 23:40
by nobody.loopback
I only expressed my personal hope. And, it maybe will be official some day (?)
If I find a little time, I will try if I can make an experimental vlc build with it. This is also the only hope for my machine to survive for another year. I dont know how long it takes until 10.6 appears. Getting a MacPro now with the risk to have a an outdated machine for 10.6 is something I would not like to do.
Recently I added a MacMini to my collection, but I noticed the same performance problem with MacOS + Videolan as radiant. The Windows version of vlc is better ( tried 0.99 + 1.0).
I dont care if a movie is in 720p or 1080p - often the 1080p has the same quality as the 720 version. But if its only avail in 1080 I would like to play it. Quicktime player is useless because it preloads the video for ages, and, it also wont play any 1080p mkv. And, it is missing a few options which vlc does have. Mplayer might be an alternative, but I dont like it very much. I found past versions full of bugs and not very mac-like.
Re: mkv h.264 playback problems
Posted: 07 May 2009 02:24
by ajmas
Suggesting to use a not official ffmpeg is not a good idea...
Certainly. I would be interested to know whether the developer of that projects has attempted to submit changes to the main project, where is would benefit more people.
Edit: Just saw on the project page: "I hope to bring the project to more stable lands so that, maybe, one day the changes can be fed back to the original project. "
Re: mkv h.264 playback problems
Posted: 07 May 2009 02:27
by ajmas
I dont care if a movie is in 720p or 1080p - often the 1080p has the same quality as the 720 version. But if its only avail in 1080 I would like to play it. Quicktime player is useless because it preloads the video for ages, and, it also wont play any 1080p mkv. And, it is missing a few options which vlc does have. Mplayer might be an alternative, but I dont like it very much. I found past versions full of bugs and not very mac-like.
I wonder whether it would be possible to opt to skip lines in the playback, if doing so would actually make a difference and whether it would be worth the effort?
Re: mkv h.264 playback problems
Posted: 07 May 2009 14:02
by nobody.loopback
I dont know in depth information about this codec, so the following is pure speculation:
To remove a line from a frame, you have to decode the complete frame. Since the information of the frames depends on other frames, you have to decode them as well. I guess, most CPU time is spent on the decoding of the frames. If you already have done this, removing for example the half of the lines will only take additional cpu, thereby increasing decoding time for a picture.
Re: mkv h.264 playback problems
Posted: 09 May 2009 17:51
by nobody.loopback
I tried to link vlc to ffmpeg-mt.
No big build problems.
However, the result is not very promising on my machine ( Dual 2Ghz PPCG5 )
With only 2 threads enabled ffmpeg wil be too late to decode a picture - multithreaded decoding set to FF_THREAD_SLICE ( multiple threads will try to decode one frame).
With 4 or 6 Threads the CPU ist at 100%
I have not changed much to the vlc code, with the exeption to initialize ffmpeg with the parameters for enabling threads.
Most likely I need more knowledge of vlc, but I dont currently have the time to aquire it.
Re: mkv h.264 playback problems
Posted: 11 May 2009 01:45
by Jean-Baptiste Kempf
I tried to link vlc to ffmpeg-mt.
No big build problems.
However, the result is not very promising on my machine ( Dual 2Ghz PPCG5 )
With only 2 threads enabled ffmpeg wil be too late to decode a picture - multithreaded decoding set to FF_THREAD_SLICE ( multiple threads will try to decode one frame).
With 4 or 6 Threads the CPU ist at 100%
I have not changed much to the vlc code, with the exeption to initialize ffmpeg with the parameters for enabling threads.
Most likely I need more knowledge of vlc, but I dont currently have the time to aquire it.
What about posting the patch on vlc-devel@ ?
Re: mkv h.264 playback problems
Posted: 11 May 2009 07:31
by radiant
I tried to link vlc to ffmpeg-mt.
No big build problems.
However, the result is not very promising on my machine ( Dual 2Ghz PPCG5 )
With only 2 threads enabled ffmpeg wil be too late to decode a picture - multithreaded decoding set to FF_THREAD_SLICE ( multiple threads will try to decode one frame).
With 4 or 6 Threads the CPU ist at 100%
I have not changed much to the vlc code, with the exeption to initialize ffmpeg with the parameters for enabling threads.
Most likely I need more knowledge of vlc, but I dont currently have the time to aquire it.
So what you're saying is that you got VLC to use ffmpeg? But it's taking up way too much processing power?
Re: mkv h.264 playback problems
Posted: 11 May 2009 11:09
by nobody.loopback
I tried to link vlc to ffmpeg-mt.
No big build problems.
However, the result is not very promising on my machine ( Dual 2Ghz PPCG5 )
With only 2 threads enabled ffmpeg wil be too late to decode a picture - multithreaded decoding set to FF_THREAD_SLICE ( multiple threads will try to decode one frame).
With 4 or 6 Threads the CPU ist at 100%
I have not changed much to the vlc code, with the exeption to initialize ffmpeg with the parameters for enabling threads.
Most likely I need more knowledge of vlc, but I dont currently have the time to aquire it.
What about posting the patch on vlc-devel@ ?
Ok,
I will try to get a membership at the mailing list. I hope Its ok to ask a few beginners questions about vlc development.
Re: mkv h.264 playback problems
Posted: 11 May 2009 11:18
by nobody.loopback
I tried to link vlc to ffmpeg-mt.
No big build problems.
However, the result is not very promising on my machine ( Dual 2Ghz PPCG5 )
With only 2 threads enabled ffmpeg wil be too late to decode a picture - multithreaded decoding set to FF_THREAD_SLICE ( multiple threads will try to decode one frame).
With 4 or 6 Threads the CPU ist at 100%
I have not changed much to the vlc code, with the exeption to initialize ffmpeg with the parameters for enabling threads.
Most likely I need more knowledge of vlc, but I dont currently have the time to aquire it.
So what you're saying is that you got VLC to use ffmpeg? But it's taking up way too much processing power?
VLC already uses ffmpeg for h.264 decoding. I only tried to use a special branch of ffmpeg with vlc.
This branch is multithreaded, which means, even slower machines, as long as they are able to use threads might have better performance when decoding video.
This ffmpg-mt is already used in other "procducts" like XMBC. If vlc could make use of it that would be a big step forward for slower/older/PPC machines, but also Intel based C2D macs and Windows vlc would benefit from it.
But my attempt to use this library instead of the normal one was not very sucessful. Often vlc returns the error that the picture could not be decoded. Most likely this is because my limited knowledge of the vlc architecture, but it is also possible, that the CPU is already busy with other tasks. I simply have to get more into this matter.
Re: mkv h.264 playback problems
Posted: 16 May 2009 03:05
by Cuba
Hi there to all,
i just created an account to report the same issue. I have a 1080p The Dark Knight.mkv file and I cant play it on my Hackintosh. When I play the same file in Windows, it goes very smooth.
The thing is:
My current CPU is a core 2 duo overclocked to 3.6 Ghz! Even with VLC using only 1 core, i thought that 3.6Ghz should would be enough to process Full HD films. So this must be an VLC issue.
In windows, even at stock speeds it plays very smooth...
VLC is the best player by far, but unfortunately it has this problem...
Any prevision when this will be fixed?
Re: mkv h.264 playback problems
Posted: 16 May 2009 10:37
by Jean-Baptiste Kempf
On Windows, do you play it with VLC?
Re: mkv h.264 playback problems
Posted: 16 May 2009 16:14
by nobody.loopback
Has any of the developers tried out playing back one of those 1080p mkv's you get from usenet ?
For example, this one:
https : // www dot newzleech dot com/?group=&minage=&age=&min=200&max=max&q=zed625&m=search&adv=1
Re: mkv h.264 playback problems
Posted: 16 May 2009 17:37
by radiant
It seems that Mac support is still secondary at best compared to the Windows releases. We'll just have to wait, I suppose.