Friday 22 May 2009

ffmpeg

587202560 bytes ( 560 MB )
x 8 = 4697620480 bits

323077120 bits (128000 x 2524.04) audio

4697620480
- 323077120 = 4374543360 bits video

4374543360
/ 2524.04 = 1733151.360517266 bits per second video

total bits - (duration * audio bitrate) = duration * video bitrate
a-bc=bd
a=bc+bd
a/b=c+d

total bits / duration = audio bitrate + video bitrate
total bits / duration - audio bitrate = video bitrate

4697620480 / 2524.04 - 128000 = 1733151.360517266

8 bits per byte
(8*1024)/1000 = 8.192 kilobits per kilobyte
(8*1024*1024)/1000/1000 = 8.388608 megabits per megabyte
(8*1024*1024*1024)/1000/1000/1000 = 8.589934592 gigabits per gigabyte
y=1024^x/1000^x

560 megabytes x 8.388608 = 4697.62048 megabits

4697.62048 / 2524.04 - 0.128 = 1.733151361 megabits

ffmpeg -i VTS_01_VOBID_005_1.VOB -pass 1 -passlogfile ffmpeg_dv_tight.log -t 0:42:4.00 -vcodec libxvid -an -f rawvideo -y /dev/null

ffmpeg -i VTS_01_VOBID_005_1.VOB -pass 2 -passlogfile ffmpeg_dv_tight.log -t 0:42:4.00 -vcodec libxvid -vtag xvid -g 300 -mbd 2 -cmp 2 -subcmp 2 -flags +mv4+qpel+ildct+ilme -b 1.733151361m -acodec libmp3lame -ab 128k -y out.avi

overhead = 3044735.999999991
percent = 0.696082%
(100/0.696082)*3,044,735.999999991 = 437,410,534.96570677 bytes = 417.147192922 megabytes


:~$ mediainfo --Inform="General;%Duration/String3%" VIDEO.VOB
00:42:36.000

:~$ ffmpeg -i VIDEO.VOB 2>&1 | tr '\r' '\n' | grep Duration
Duration: 00:42:35.96, start: 0.287267, bitrate: 6066 kb/s

Thursday 14 May 2009

TV picture shakes/jitters/wobbles when using Nvidia 9600GT

Seems to result from the driver defaulting to 50Hz. Hopefully fixed by making the following changes to xorg.conf:

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 9600 GT"
Option "FlatPanelProperties" "Scaling = Native"
Option "SecondMonitorVertRefresh" "60i"
EndSection


Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: 1920x1080_60i +1680+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection


References:
http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8774/README/appendix-d.html

Green noise displayed on TV with Nvidia 9600GT

Only occurs when the computer is on but not sending a "strong enough" signal.
E.g. only occurs in black areas when something is being displayed or all over the screen when nothing is being displayed. Dissapears when the brightness is increased by computer software / nvidia proprietary driver configuration.