LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
 
Search this Thread
Old 05-08-2010, 10:34 PM   #1
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
How to set bitrate for mplayer?


Trying to play a *.mp4 video using mplayer and the picture is jumpy and the sound completely screwed.

It say it is guessing the bitrate thus:

Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)

In fact the bitrate should be 139 or possibly 132. So assume that is what is wrong.

Have assiduously coated myself with nourishing smegma and the like but am unable to work out how to set the bitrate in this case. Anybody know?
 
Old 05-09-2010, 03:17 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Does the video improve if you add the option -nosound when starting mplayer ?

If not then the problem is unlikely to be the audio bitrate. More likely a non-spec mp4 file.

You might want to use mediainfo to find out more about the file concerned.

Last edited by smoker; 05-09-2010 at 03:19 AM.
 
Old 05-09-2010, 03:23 AM   #3
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,972

Rep: Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628
Try these in turn in a terminal
mplayer -vo help
mplayer -ao help
Most of the cpu, driver & bandwidth issues are with video (ati particularly). It defaults to xvid iirc. My box only works on
mplayer -vo sdl

You can always try
mplayer -vo null somefile to just get the audio track
mplayer -ao null just to get the video track
 
Old 05-09-2010, 02:23 PM   #4
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Original Poster
Rep: Reputation: 49
Thanks both.

When used -nosound the video was alright, it did not jump. Incidentally, clever idea.

When used mplayer -vo null the video *did* jump, as before.

When used mplayer -ao null it advised me the computer was too slow to play this, it isn't.

mplayer -vo sdl gave the original problem: Incidentally the video jumps and the audio jumps too, it seems like the same thing is happening to both.

Tried mplayer -abr 139 filename.mp4 but it does not recognize this as sensible.

Code:
lugo@fido:~/Politics/Economics$ mediainfo moneyAsDebt.mp4                   
General                                                                     
Complete name                    : moneyAsDebt.mp4                          
Format                           : MPEG-4                                   
Format profile                   : Base Media                               
Codec ID                         : isom                                     
File size                        : 138 MiB                                  
Duration                         : 47mn 9s                                  
Overall bit rate                 : 409 Kbps                                 
Movie name                       : Money As Debt                            
Encoded date                     : UTC 2007-10-11 01:02:59                  
Tagged date                      : UTC 2007-10-11 01:02:59                  

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Baseline@L1.1       
Format settings, CABAC           : No                  
Format settings, ReFrames        : 1 frame             
Codec ID                         : avc1                
Codec ID/Info                    : Advanced Video Coding
Duration                         : 47mn 9s              
Bit rate mode                    : Variable             
Bit rate                         : 281 Kbps             
Maximum bit rate                 : 2 323 Kbps           
Width                            : 320 pixels           
Height                           : 240 pixels           
Display aspect ratio             : 4:3                  
Frame rate mode                  : Constant             
Frame rate                       : 29.970 fps           
Resolution                       : 8 bits               
Colorimetry                      : 4:2:0                
Scan type                        : Progressive          
Bits/(Pixel*Frame)               : 0.122                
Stream size                      : 94.7 MiB (69%)       
Encoded date                     : UTC 2007-10-11 01:02:59
Tagged date                      : UTC 2007-10-11 01:03:07

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4           
Format profile                   : LC                  
Format settings, SBR             : No
Codec ID                         : 40
Duration                         : 47mn 7s
Bit rate mode                    : Variable
Bit rate                         : 126 Kbps
Maximum bit rate                 : 265 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 44.1 KHz
Stream size                      : 42.3 MiB (31%)
Encoded date                     : UTC 2007-10-11 01:03:04
Tagged date                      : UTC 2007-10-11 01:03:07
Still lost, any suggestions might be helpful.
 
Old 05-09-2010, 03:19 PM   #5
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
You could try using the option -autosync 1 or a higher number, but read man mplayer for what it does.

or -ac ffaac to use a different audio decoder.
 
Old 05-09-2010, 05:49 PM   #6
John VV
Guru
 
Registered: Aug 2005
Posts: 14,455

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
how much ram is there , the mp4 uses a lot
is it running on the cpu or in the nvidia gpu (cuda)
that is if you have a nvidia card

i find that the smplayer front end really slows down mp4's
i run them from the terminal.
 
Old 05-09-2010, 08:07 PM   #7
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by John VV View Post
how much ram is there , the mp4 uses a lot
is it running on the cpu or in the nvidia gpu (cuda)
that is if you have a nvidia card

i find that the smplayer front end really slows down mp4's
i run them from the terminal.
Running from terminal inside X. 4GB RAM.

Tried all the above advice, nothing worked unfortunately, probably give up on it. Does not *appear* to be just this file, bug perhaps.

However, "is it running on the cpu or in the nvidia gpu (cuda)" You mean is the GPU doing it or the CPU? - how would I tell?

EDIT: Tried running it under Enlightenment17, a light thing, instead of the heavy KDE to ensure the computer is not overloaded and got the same problem with it guessing the bitrate, it also said the computer was too slow (It is an "entry level games machine"). An interesting feature was that the 'scroll lock' led on the keyboard flashed irregularly - well it interested me.

Last edited by lugoteehalt; 05-09-2010 at 08:27 PM.
 
Old 05-09-2010, 08:28 PM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,630

Rep: Reputation: 267Reputation: 267Reputation: 267
I had this issue. Upgrading from debian etch to debian lenny fixed it. You're probably using some old DLL or something in the decoding process. I'm not exactly sure WHAT is different I was running etch earlier this year and mplayer from svn within the past two months, so it's some other underlying issue like version of X or DLLs. FWIW, the computer in question is a 2006 laptop 32 bit / 2GHz single core. And as long as it's not 1080p30 or higher, it copes.
 
Old 05-09-2010, 08:35 PM   #9
John VV
Guru
 
Registered: Aug 2005
Posts: 14,455

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
Quote:
You're probably using some old DLL or something
a MS Windows dll ??? and not a linux .so ???

what is odd is according to
Code:
Width                            : 320 pixels           
Height                           : 240 pixels
the vid is VERY small
are you running it full screen at 1600x1200
with a 320x240 vid and 4 gig ram you should have NO problem running 4 at one time .

did you install 3d desktop ( compiz fusion ) and if so IS it also running ?
 
Old 05-09-2010, 09:34 PM   #10
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by John VV View Post
what is odd is according to
Code:
Width                            : 320 pixels           
Height                           : 240 pixels
the vid is VERY small
are you running it full screen at 1600x1200
with a 320x240 vid and 4 gig ram you should have NO problem running 4 at one time .

did you install 3d desktop ( compiz fusion ) and if so IS it also running ?
Mplayer automatically switches the resolution to 640x480 in a fairly small box, the same problem at full screen.

I have transparency in KDE and Enlightenment17. It is quite an up market computer, it is unlikely to be too slow unless there is a program problem.

Perhaps I should have said earlier that the motivation for using mplayer is that I normally run these *.mp4 files in iceweasel, i.e. firefox. But cannot get it to rewind, pause and that sort of thing: inconvenient. So mplayer is very good in that area. But perhaps something else would do the job?
 
Old 05-10-2010, 12:18 AM   #11
John VV
Guru
 
Registered: Aug 2005
Posts: 14,455

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
so this is inside firefox
is it the very old mplayer-plugin
or the current gecko-plugin

or are you just running mplayer as a separate process in a new window
 
Old 05-10-2010, 02:51 AM   #12
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,972

Rep: Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628Reputation: 628
The options were for running mplayer itself. There's a config file /etc/mplayer.conf which you can set these things in and have them run on the plugin. mplayer is something I would keep up to date. Mine is an SVN snapshot r29687-snapshot-4.2.4 compiled for x86_64, but I think the options are pretty universal.

There's also some sneaky option for predownloading. I did my testing and optimizing using a film dvd which eliminates bandwidth issues. There are some smoothness options too, iirc. Man page is one of the all-time great man pages.

Last edited by business_kid; 05-10-2010 at 02:55 AM.
 
Old 05-10-2010, 10:18 AM   #13
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,630

Rep: Reputation: 267Reputation: 267Reputation: 267
Quote:
Originally Posted by John VV View Post
a MS Windows dll ??? and not a linux .so ???
Yes a DLL.

ls /usr/lib/codecs/
 
Old 05-10-2010, 01:34 PM   #14
John VV
Guru
 
Registered: Aug 2005
Posts: 14,455

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
/usr/lib/codecs/ forgot about those i only see them one time when i set up mplayer
all-20100303.tar.bz2
 
Old 05-10-2010, 08:39 PM   #15
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by John VV View Post
so this is inside firefox
is it the very old mplayer-plugin
or the current gecko-plugin

or are you just running mplayer as a separate process in a new window
Just running mplayer seperate in new window.

Code:
lugo@fido:~/Politics/Economics$ ls /usr/lib/codecs/
cook.so  drvc.so  sipr.so
Tried vlc instead of mplayer and got:
Code:
lugo@fido:~/Politics/Economics$ vlc moneyAsDebt.mp4
VLC media player 0.8.6h Janus
[00000307] main decoder error: no suitable decoder module for fourcc `avc1'.
VLC probably does not support this sound or video format.
The sound played alright though.

I just initially thought all I had to do was set the audio bit rate manually and calmness would return to middle earth. Get impression it is a bug with mplayer, so I'd probably better just stop worrying about not being able to rewind and so on - when these *.mp4 files are run inside iceweasel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set double click to open video in full screen in mplayer ankur_linuxfan Linux - Software 1 05-14-2005 04:33 AM
How do I, set MPlayer as default and remove Totem? SonoranFun Linux - Software 6 01-24-2005 03:05 PM
How do set mplayer to loop by default? walterbyrd Linux - Software 3 07-24-2004 05:40 PM
Mplayer set window size taoweijia Linux - Software 0 09-16-2003 10:14 PM
mplayer or xine set my computer on standby tyiooo Linux - Software 1 07-09-2003 08:40 AM


All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration