Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been having a bit of a problem playing videos on my Linux Mint 17 laptop. The problem is that when I play a large video file, the playback will be normal for a few seconds, then it will freeze for a split second and continue for another few seconds before doing it all again. The problem seems to be independent of the player: vlc, mplayer, totem, etc...
I've managed to work around the problem with mplayer by increassing the cache via the comand line, e.g.
> mplayer -cache 10000 -cache-min 80 MyVideo.mp4
But this is a workaround and I have to keep rembering the options, which is hard for a person who drinks as heavily as I do
So here are my questions:
1 - Is there a more elegant solution to this problem? i.e. Are there software packages such as new codecs I should install or a config file I should try to alter?
2 - Is there a way I can save the command line arguments in some kind of alias so that when I call mplayer it is actually calling mplayer with these arguments?
I thought I had seen a linux command called "alias" before, but If I were a betting man, I would have never bet that I remembered that correctly. I will learn more about it in your link.
Regarding my hardware, here is the output of my lshw; another gold star for my memory:
One thing I forgot to ask, what output driver is MPlayer using? Check in settings (right click the main window with all of the controls) under Video, and let us know.
I believe there's also somewhere in the settings dialog where you can set the video and audio cache without having to do it from the command line every time, but I don't have MPlayer handy ATM.
How big is the file you are trying to play? What format is it and what is the resolution?
As far as I can see from your hardware, it would have issues playing 1080p
It could easily be the codec.
Alternatively check your cpu frequency settings. A bad setting could lead to bad movieplayback while everything else on computer works fine. I have had bugs with the "POWERSAVE" goovernor.
Check with "cpupower frequency-info" or cpufreq --help
I get the following messages when I run mplayer with no commandline arguments. I believe it contains all of the resoultion/frequency information. The file is 313.9 Mb.
Code:
MPlayer2 2.0-701-gd4c5b7f-2ubuntu2 (C) 2000-2012 MPlayer Team
Playing MyVideo.mp4.
Detected file format: QuickTime / MOV (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
Clip info:
major_brand: isom
minor_version: 1
compatible_brands: isom
creation_time: 2011-09-08 11:43:25
Load subtitles in .
SUB: Added subtitle file (1): ./MyVideo.srt
Failed to open VDPAU backend libvdpau_i965.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
[ass] auto-open
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libavcodec]
Selected audio codec: AAC (Advanced Audio Coding) [libavcodec]
AUDIO: 48000 Hz, 2 ch, floatle, 131.7 kbit/4.29% (ratio: 16458->384000)
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
VIDEO: 720x404 23.976 fps 579.4 kbps (72.4 kB/s)
VO: [xv] 720x404 => 720x404 Planar YV12
Colorspace details not fully supported by selected vo.
[ass] PlayResX undefined, setting to 384
A: 9.4 V: 8.3 A-V: 1.053 ct: 0.000 0/ 0 0% 2% 76.1% 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: 13.9 V: 13.9 A-V: 0.000 ct: 0.000 0/ 0 0% 2% 48.6% 78 0
The output from "cpupower frequency-info" is as follows:
Code:
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 1.20 GHz - 2.40 GHz
available frequency steps: 2.40 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 1.20 GHz and 2.40 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1.20 GHz.
cpufreq stats: 2.40 GHz:10,43%, 2.40 GHz:0,07%, 2.27 GHz:0,30%, 2.13 GHz:0,25%, 2.00 GHz:0,29%, 1.87 GHz:0,23%, 1.73 GHz:0,24%, 1.60 GHz:0,21%, 1.47 GHz:0,28%, 1.33 GHz:0,34%, 1.20 GHz:87,36% (43315)
boost state support:
Supported: yes
Active: yes
25500 MHz max turbo 4 active cores
25500 MHz max turbo 3 active cores
25500 MHz max turbo 2 active cores
25500 MHz max turbo 1 active cores
a single core cpu with 2.4GHz is good enough to play most non-HD video with mplayer.
the workaround you posted in post #1 is as good as it gets.
you can mark this [Solved] now.
ps:
to give you some rough estimation of what your computer is capable of:
a 45min TV episode should have less than 500MB, usually around 350.
a file can be smaller than that, but if it's only 5min long, then it's too hi-res for your machine.
you also have to watch your resources closely during video playback (e.g. close your browser completely).
Thanks everybody, although I feel there should be a more streamlined out-of-the-box solution for linux mint, the alias command is good enough for my purposes, so I'll mark my problem as solved. If anyone has further suggestions I'd be happy to try them out.
I feel there should be a more streamlined out-of-the-box solution for linux mint, the alias command is good enough for my purposes, so I'll mark my problem as solved. If anyone has further suggestions I'd be happy to try them out.
firstly, aliases can be made permanent by adding them to ~/.bash_profile (this file is sometimes named differently. search the web, or better mint forums, how bash works at login).
if you use a graphical environment, you can tell your file browser to open movie files with that same command (not the alias) via the "Open with..." menu.
you can tell mplayer to always use these settings via its own config.
firstly, aliases can be made permanent by adding them to ~/.bash_profile (this file is sometimes named differently. search the web, or better mint forums, how bash works at login).
if you use a graphical environment, you can tell your file browser to open movie files with that same command (not the alias) via the "Open with..." menu.
you can tell mplayer to always use these settings via its own config.
It doesn hurt to try to set the frequency governor to "performance". Some video cards leave much work on the computer. This also depends on the video players "output mode", which you should try various options of.
1. Try, as root or with sudo
Code:
cpupower frequency-set -g performance
And then play the video.
2. Play the video with VLC && gstreamer based interface. (not sure what mint uses)
3. Download ALL the correct codecs, aac, ac3, ffmpeg, faad, faac, mpeg etc etc.
Anyways, I have tried Mint and I quite like it. The one thing I found, alike to Ubuntu and all its derivatives, is that it is a bit slugish and slow compared to for example Mageia or source based GNU/Linux like Slackware.
You can always install another test distribution to check if the problem is distribution specific, or you can change to a lighter distribution.
In the end, the picture depends on the computer overall resources, the available resources and the graphic card. If the pictures pixelrate is very high and there are many pictures per second, then choppy picture quality might occur on hardware that cannot handle it. Even lower pixelrate and many pictures per second or high pixelrate and medium picture per second can cause choppy pictures on many laptops or old desktop computers.
I have had several choppy picture issues with videos in the past, but I always solved them by installing the correct codecs, adjusting the cpu frequency, using the correct display settings and driver (preferably the free driver). Even then my hardware has had limitations. HD 720p on this computer works fine, while HD 1080p is slightly choppy. Connecting things to a HDMI to 1080p tv, it plays 1080p very choppy and 720p very well. This is due to the hardware limitations and the display card on my computer. So I simply play the videos at 720p.
In the end, the picture depends on the computer overall resources
single core with 2.4GHz max.
that's why i said "it's as good as it gets".
ultimately, we would need to know more about the video(s) in question.
i had similar experiences on older devices - the usual 700mb compressed full-length movie plays just fine, put the 1080px dvd-rip (=HD) doesn't.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.