Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-28-2013, 01:57 PM
|
#1
|
|
LQ Newbie
Registered: May 2010
Location: Vista, CA
Distribution: Ubuntu 12.10, custom rolled distro
Posts: 19
Rep:
|
Lower video quality with ffmpeg?
I have a video in heigh quality I would like to play on my netbook, but it's chopy. I'm thinking my netbook doesn't have to power to play it. How can I lower the quality so my netbook will play it?
Code:
>ffmpeg -i Avata.mp4
ffmpeg version 0.8.5-4:0.8.5-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Jan 24 2013 18:03:14 with gcc 4.6.3
Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5000000/104271) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Avatar.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2011-08-23 18:27:53
Duration: 02:51:31.94, start: 0.000000, bitrate: 3336 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1920x864 [PAR 8:9 DAR 160:81], 2927 kb/s, PAR 853:960 DAR 853:432, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:
creation_time : 2011-08-23 18:27:53
Stream #0.1(eng): Audio: aac, 48000 Hz, 5.1, s16, 404 kb/s
Metadata:
creation_time : 2011-08-23 18:29:52
|
|
|
|
02-28-2013, 04:07 PM
|
#2
|
|
Member
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware, Mint, & random selection for VM
Posts: 175
Rep:
|
Not sure exactly the proper syntax but maybe something like:
Code:
ffmpeg -i /path/to/avatar.mp4 -s 1366x768 /location/for/converted/avatar.mpg
The -s option will change the output resolution of the original file. Might want to play around with that some. But this will take time to convert and maybe not worth your time.
I'm not at my linux machine so unable to test it but this should get you going. Check the man page for detailed info.
What application are you using to play this file? VLC is very good as it supports many av formats. Also mplayer, xine, dragon player might work.
Another app choice is 'avplay'
Keep us posted, good luck!
|
|
|
|
02-28-2013, 06:22 PM
|
#3
|
|
LQ Newbie
Registered: May 2010
Location: Vista, CA
Distribution: Ubuntu 12.10, custom rolled distro
Posts: 19
Original Poster
Rep:
|
I've been using vlc and totem. The command you gave me is not working.
Code:
ffmpeg -i Avatar.mp4 -s 1366x768 Avatar-lower.mpg <-- ~/Media
ffmpeg version 0.8.5-4:0.8.5-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Jan 24 2013 18:03:14 with gcc 4.6.3
Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5000000/104271) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Avatar.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2011-08-23 18:27:53
Duration: 02:51:31.94, start: 0.000000, bitrate: 3336 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1920x864 [PAR 8:9 DAR 160:81], 2927 kb/s, PAR 853:960 DAR 853:432, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:
creation_time : 2011-08-23 18:27:53
Stream #0.1(eng): Audio: aac, 48000 Hz, 5.1, s16, 404 kb/s
Metadata:
creation_time : 2011-08-23 18:29:52
[buffer @ 0x850afe0] w:1920 h:864 pixfmt:yuv420p
[scale @ 0x85027c0] w:1920 h:864 fmt:yuv420p -> w:1366 h:768 fmt:yuv420p flags:0x4
[mp2 @ 0x8501fa0] encoding 6 channel(s) is not allowed in mp2
Output #0, mpeg, to 'Avatar-lower.mpg':
Stream #0.0(und): Video: mpeg1video, yuv420p, 1366x768 [PAR 6824:6147 DAR 853:432], q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
Metadata:
creation_time : 2011-08-23 18:27:53
Stream #0.1(eng): Audio: mp2, 48000 Hz, 5.1, s16, 128 kb/s
Metadata:
creation_time : 2011-08-23 18:29:52
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
Looks to me the problem is '[mp2 @ 0x8501fa0] encoding 6 channel(s) is not allowed in mp2'. Any ideas?
|
|
|
|
02-28-2013, 11:54 PM
|
#4
|
|
Member
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 264
Rep:
|
Lower the quality means?
Do you want to reduce the resolution or reduce the size?
Try this
Code:
ffmpeg -i "Avatar.mp4" -f mp4 -vcodec mpeg4 -b 512k -r 30 -s 640x360 -acodec libfaac -ar 32000 -ab 128k -ac 2 -threads 8 "Avatar_out.mp4"
-b = video bit rate, lesser the value, lesser the size of the video. But it reduces the quality of video. If you put it 256k, you can see the video is pixelette.
-s = resolution of the video, 640x360 is common resolution for mobiles. but it should be according to aspect ratio. If you put it here anything, it gives error.
|
|
|
1 members found this post helpful.
|
03-01-2013, 02:20 AM
|
#5
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,706
|
My first recommendation is to try the multi-threaded decoding in mplayer:
Code:
mplayer -vo xv -af volnorm=1 -subfont-autoscale 1 -lavdopts threads=4 -idx movie.mp4
If that doesn't do it, then convert it like:
Code:
ffmpeg -i input.mkv -vcodec libx264 -vpre special -crf 15 -s 640x288 -aspect 16:9 -r 23.976 -threads 4 -acodec libvo_aacenc -ab 128k -ar 48000 -async 48000 -ac 2 -scodec copy output.mkv
preset:
Code:
coder=1
flags=+loop
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
subq=6
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=1
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=3
refs=5
trellis=1
wpredp=2
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:54 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|