View Full Version : Reduce a video bitrate in mplayer
marce_245
2008-08-02, 00:53
Is there any command in mplayer that allows you to play a video with high bitrate by reducing it, for example if I have a video with 2000 kbps that the n800 obviously cant play, is there a command in mplayer to decode the video as if it was, lets say, 700 kbps (which is a bitrate the tablet can handle). All this without actually converting the video.
Thanks
...there's a whole separate executable, mencoder, that usually installs along with mplayer, that handles transcoding video files.
but, to answer your question, no -- there's no command within mplayer to accomplish that.
marce_245
2008-08-02, 01:20
So youre saying that theres a way but not from mplayer?, or there is no way at all?, would it be possible to 'modify' the mencoder settings to do that?
So youre saying that theres a way but not from mplayer?
Yes. I am saying that there is no such option in mplayer.
would it be possible to 'modify' the mencoder settings to do that?
I'm not sure you entirely understand what the mencoder executable does. It is a transcoding program, which allows you to create video files with parameters you set. You'd feed your high rate video files into it and specify options to create the output video you want.
It might be considerably easier for you to search for tablet_encode and/or the Video Converter software published by Nokia (Windows) -- feed it your high rate video files and get one output that has been optimized to run on the tablet. Either of those solutions will ultimately do what you want -- create a video file that plays on your tablet. As a side bonus, you won't need to eat up 2.25 gigabytes per hour of video in storage on your tablet, either. :)
fatalsaint
2008-08-02, 01:48
I use a small script that uses mencoder to encode my dvd's or avi's to something watchable on my tablet.. still creates a new file.. ends up between 5-800mb for a dvd..
mencoder ftw.
marce_245
2008-08-02, 01:50
Sorry, when it comes to linux im a little slow. So mencoder is like a video converter but for the tablet?, anyway what i was looking for was not to transcode the video into another one but to decode the original video 'on demand' (well acrually not fully decoding, decode it with lower bitrate).
Thanks for your help
fatalsaint
2008-08-02, 01:54
No mencoder has nothing to do with the tablet.. it allows a huge range of possible options to convert video from say AVI to MPEG4 or whatever...
I dont know of any way to transcode a video 'on the fly' because it usually takes a ton of processor power and usually a long time to transcode video... doing it 'on the fly' would result in very slow choppy video i would think...
"mplayer -lavdopts lowres=1 video.avi" will decode a video at reduced resolution, which improves performance at the expense of quality.
marce_245
2008-08-02, 03:53
Ok thanks for your help anyway
vjones777
2008-08-02, 05:41
Hi Marce,
Excuse me if I'm wrong, but I detect a bit of uncertainty. Your original post is a little confusing to me.
Correct me if I'm wrong- I think what you are trying to do is send a full resolution video to the Nokia. Then you want to play that on the nokia, without creating any extra files on the nokia.
I see a couple of problems. Firstly, you are transferring a LOT of data to the nokia. For example, a full length DVD would be over 4Gb. That will take a lot of storage space and some time to transfer.
Secondly, the nokia is not powerful enough to re-encode the video on the fly while you watch it, as has been pointed out. Theoretically you could transcode the video on the Nokia before watching it, but that would take quite a while (processing power limitation again), plus you would need even more storage space (0.3 to 0.8Gb) for the converted file, and probably the same again for temporary files created during the conversion.
The way around all this is to covert (transcode) the files on your computer (laptop or desktop), then transfer the converted files over to the nokia. That way the file you transfer is smaller (0.3 to 0.8Gb) and can be played directly on the nokia.
There are a number of ways to convert the video on your PC. It depends what operating system you have. Media converter (http://www.internettablettalk.com/wiki/index.php?title=Multimedia:Converting_videos_to_No kia_770_format) works on Windows and on Mac or Linux machines. There are other options listed on that wiki page also.
Theres also some more help to be had here Converting (re-encoding) videos, playing music, ebooks (http://www.internettablettalk.com/wiki/index.php?title=Main_Page#Multimedia).
The bottom line is convert the video on a PC to a format the mobile device can handle, then transfer just the converted file.
Hope that helps.
marce_245
2008-08-04, 03:20
No, let me explain what I wanted. I have an avi video, average resolution, but the bitrate is above 2000 kbps. The same video with a bitrate of around 750 kbps plays perfectly (I converted it with my pc). I had to convert it because obviously the n800 can't handle the original video. Now my question is: the same way mplayer has the option to 'decode' the video at a reduced resolution like ace said (on the fly, meaning that the file is not previously converted, but mplayer plays it like if it already was at a lower resolution), is there any command that does the same but to decode the video at a reduced BITRATE?.
Thanks for trying vjones777 though.
josiahg777
2008-08-04, 05:11
well... this may not be EXACTLY what you were looking for, but another forum member and I created a script that plays back movies at a reduced resolution depending on how high the bitrate is. You can get that here (http://bleachedblack.com/scsdc/private/media/NIT%20Stuff/mplayer-opt-0.4-0.deb) and run it from the command line with: "mplayer-opt <video file>"
However the bitrate of a video corresponds to how many bytes of information is processed per second and the only way to play a video at a lower bitrate is to slow the whole video down and play it in slow motion :P
So your best bet is a lower RESOLUTION decoding solution :)
marce_245
2008-08-04, 07:18
Ok josiah777, I didn't know that about the bitrate. Too bad it can't be done. On the other hand I tried the script and its working great, obviously it can't do miracles but it improved the playback of my file (now its playable without the need to convert it).
Thanks for your help guys!
If you need transcoding on the fly you could set up a UPnP AV server with transcoding capabilities on a machine powerful enough. Canola, the built-in media player, MediaStreamer, and the next of version of MediaBox all support playing directly from UPnP devices over the network.
pedrosurf
2010-05-28, 23:02
Try: mplayer -vo x11 filename
I can see the video, very slow indeed, but I can see it.
... the same way mplayer has the option to 'decode' the video at a reduced resolution ... is there any command that does the same but to decode the video at a reduced BITRATE?
Sorry, but the question is simply misconceived. Bitrate of the video component (i.e. non-audio) is the product of three factors:
(1) frames per second
(2) pixels per frame (a.k.a. resolution)
(3) inverse of the conversion factor of bits to pixels (i.e. bits per pixel instead of pixels per bit).
File conversion will alter all of these factors, but the first and third factors can only be adjusted to a limited extent.
Factor (1): For a mobile device, you can reduce the fps from its usual 25 to about 18. Anything less will make the video look jerky.
Factor (3): Some file formats are a little more efficient than others, but you are not going to make much of a gain in practical terms. File compression can give you more pixels per MB, but then your processor will have the extra work of decompression when playing the video. This slows all processes down and takes you back where you started or worse.
Resolution is the one factor where you really have a chance to make a difference. Reduce it from 1280x960 to 320x240, and you can reduce the bitrate to 1/16 of what it was before. According to the wiki, 400x240 is ideal for N8x0 tablets. (320x240 amounts to the same thing if the original video is not in wide-screen format.) On such a small screen, you are simply not going to see any improvement from a higher resolution.
In addition to the file conversion utilities previously mentioned in this thread, I would recommend Format Factory, particularly for non-Linux users. Among the many options for the output file format, there are 14 intended specifically for playing video on Nokia devices (in the "All to Mobile Device" menu).
I would also add that audio bitrates are often unnecessarily high. When we have to use dial-up internet, my wife and I sometimes listen to opera on a Russian internet radio station at 24 kbps. However slow the connection, we can always get that one. It sounds like a vinyl recording without the scratches and pops (and in fact much of the station's material comes from vinyl LP's). There is nothing wrong with it, although 32 kbps is better and 64 kbps is better still. Beyond that, you are into the realm of fads and fanaticism, not music. If you are listening through loudspeakers, the speakers don't have the audio resolution to show any difference beyond 64 kbps.
vBulletin® v3.8.8, Copyright ©2000-2025, vBulletin Solutions, Inc.