Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2003 00:28:53 +0900 (JST)
From:      sugiura@kt.rim.or.jp (Sugiura Shiro)
To:        steve@sohara.org, freebsd-multimedia@freebsd.org
Subject:   Re: How to make high quality MPEG4 video
Message-ID:  <200309071528.AAA16436@mail4.rim.or.jp>
In-Reply-To: Your message of "Tue, 2 Sep 2003 18:37:09 %2B0200". <20030902183709.7534858c.steve@sohara.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20030902183709.7534858c.steve@sohara.org>
steve@sohara.org writes:

>> SS> I tried to direct encode a sportscast like following:
>> SS> 
>> SS> % ffmpeg -s 640x480 -tvstd ntsc -vcodec mpeg4 -b 2000 -acodec mp3 -ac
>> SS> 2 \
>> SS>   -ab 128 -f avi TV.avi
>> SS> 
>> SS> It uses about 30% CPU on average.
>> 
>> 	That seems too low. What version of FreeBSD are you running ?
>> There was an update merged to stable on 17 June this year that fixed a
>> nasty problem with the bktr sync signalling at full resolution YUV.

I use 5.1-CURRENT-20030812.
I tried to turned off HTT on BIOS, and rebuild kernel without SMP ,
then it likes so better. 

-------------------------------------------------------------------------
(1)% ffmpeg -r 29.97 -s 640x480 -ac 2 -ar 48000 -ab 256 -acodec mp3 -vcodec \
 mpegvideo -b 8000 -tvstd ntsc tv.mpg

  PID USERNAME PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  648 sugiura    8    0 11912K 10256K nanslp   0:52 49.88% 49.61% ffmpeg
 
(2)% ffmpeg -s 640x480 -tvstd ntsc -vcodec mpeg4 -b 2000 -acodec mp3 -ac 2 \
  -ab 256 -r 29.97 -f avi TV.avi

  PID USERNAME PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  657 sugiura  100    0 13092K 11588K RUN      1:47 36.77% 36.77% ffmpeg

(3)% ffmpeg -r 29.97 -s 640x480 -ac 2 -ar 48000 -acodec pcm_s16le -vcodec \
rawvideo -tvstd ntsc TV.avi

  PID USERNAME PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  685 sugiura    8    0 10064K  7216K nanslp   0:12 13.83% 13.62% ffmpeg
-------------------------------------------------------------------------

I recorded TV like (3) , then I want to encode to MPEG4 using ffmpeg.
But, I can't encode like following;

-------------------------------------------------------------------------
% ffmpeg -t 30 -r 29.97 -s 640x480 -ac 2 -ar 48000 -acodec pcm_s16le \
 -vcodec rawvideo -tvstd ntsc TV.avi

% ls -al TV.avi
-rw-r--r--  1 sugiura  users  420572266 Sep  8 00:15 TV.avi

% ffmpeg -i TV.avi -b 2000 -vcodec mpeg4 -acodec mp3 -ac 2 -ab 128 TV2.avi
Input #0, avi, from 'TV.avi':
  Duration: 00:00:30.0, bitrate: 112040 kb/s
  Stream #0.0: Video: rawvideo, yuv420p, 640x480, 29.97 fps
  Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Output #0, avi, to 'TV2.avi':
  Stream #0.0: Video: mpeg4, 640x480, 29.97 fps, q=2-31, 2000 kb/s
  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=    3 q=2.0 size=     776kB time=0.1 bitrate=63493.3kbits/s
----------------------------------^^^^^^^^-------------------------------

Only 0.1 sec "time" ????

-------------------------------------------------------------------------
% ls -al TV2.avi                                                     
-rw-r--r--  1 ssugiura  users  814516 Sep  8 00:15 TV2.avi
-------------------------------------------------------------------------

TV2.avi file is too small, and I can't playback TV2.avi with mplayer.

Is there any options to encode MPEG4?

--  
Sugiura Shiro      E-mail : sugiura@kt.rim.or.jp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309071528.AAA16436>