LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 11-11-2010, 12:15 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
quality of video edited is poor any suggestions


I edited some videos via ffmpeg
as follows (it is a Ubuntu 10.04 64 bit server on an SSH connection)

Code:
 ffmpeg -i stats_estimation.mp4 -ar 22050 -acodec libmp3lame -ab 32K -r 25  -vcodec flv out2.flv
Things started perfectly
Code:
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009
Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr
--enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib
--enable-libgsm --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib
--disable-stripping --disable-vhook --enable-runtime-cpudetect
--enable-gpl --enable-postproc --enable-swscale --enable-x11grab
--enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar  4 2010 12:41:55, gcc: 4.4.3

Seems stream 0 codec frame rate differs from container frame rate:
29.94 (5000/167) -> 44.92 (539/12)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'stats_estimation.mp4':
  Duration: 02:47:05.56, start: 0.000000, bitrate: 237 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 320x240, 44.92 tbr, 14.97
tbn, 29.94 tbc
    Stream #0.1(eng): Audio: aac, 32000 Hz, stereo, s16
Output #0, flv, to 'out2.flv':
    Stream #0.0(eng): Video: flv, yuv420p, 320x240, q=2-31, 200 kb/s,
90k tbn, 25 tbc
    Stream #0.1(eng): Audio: libmp3lame, 22050 Hz, stereo, s16, 32 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
but the quality of resulting video is very poor.
What I see is when I enlarge the video there are square marks and
objects in video are blurred.

I had tried using
Code:
  ffmpeg -i stats_estimation.mp4 -ar 22050 -acodec libmp3lame -ab 32K -r 25  -s 470x290  -vcodec flv out2.flv
thinking as if size might have been the problem but that did not fixed
the issue I get the out put video as poor where as the video (which is
mp4)
is of good quality and no deterioration in its quality when I see the
unconverted video.
ffmpeg is doing some thing which makes the original quality go.
So any suggestions on this part?

Last edited by tkmsr; 11-11-2010 at 12:16 AM.
 
Old 11-11-2010, 10:53 AM   #2
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Use '-b' to set the video bitrate, otherwise it defaults to 200k (crap).
 
Old 11-11-2010, 08:51 PM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Can you give me idea of what bitrate should I choose I am not clear on this part how do you decide bitrate?
 
Old 11-11-2010, 09:54 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046
It is somewhat simple: Higher bitrate means better quality, but also larger files. Just give it a try and have a look at the results. If the default (200k) is crap, then try it with 400k and look if it is better. If not raise the bitrate again. Be aware that there is no standard solution in picking the bitrate. You can get good looking videos with a lower bitrate if you encode "The Simpsons", but this doesn't have to work with an action film with explosions and stuff.
 
Old 11-11-2010, 11:14 PM   #5
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Ok.
 
Old 11-12-2010, 07:35 AM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Yeah, just pick some bitrates and see what works. If you want the same quality as the input (probably will not work properly in this case) you can use '-sameq'. For variable bit rate (if it is supported by container) use '-qscale <q> =fixed quantizer q = 1 (best) 31 (worst)'.
 
  


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
Poor video quality Chris Hansen Linux - Software 4 12-14-2008 03:12 PM
poor sound quality deepti aggarwal Linux - Newbie 1 12-13-2008 06:44 AM
NX quality is poor chengas123 Linux - Software 2 07-06-2008 01:01 AM
poor quality video with M$ VX-1000 webcam+GSPCA driver deepclutch Linux - Hardware 1 05-09-2008 03:45 AM
Poor TV Card video quality fourwood Linux - Software 5 09-16-2003 11:59 AM


All times are GMT -5. The time now is 07:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration