As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label resolution. Show all posts

For a long time, I can't figure out why 480p or 640x480 videos are stretched by YouTube. The output resolution is still the same but they seems to be rescaled in Y-axis. This should be much problem for your daily life video, but it is for screencasting. They looks like 90s homemade video in analogy, just terrible.

You can see an example in my previous video like this one. I used the following command to record:
~/p/x11grabr/x11grabr -b -s 640x480 | ffmpeg -f rawvideo -pix_fmt bgra -s 640x480 -r 25 -i - -vcodec libx264 -vpre lossless_ultrafast -strict experimental -threads 0 test.mkv

 ~ $ mediainfo test.mkv 
General
Unique ID                                : 107803120395874480459111442715539922352 (0x511A2032421B3E79424266CB5EDBDDB0)
Complete name                            : test.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 584 KiB
Duration                                 : 2s 480ms
Overall bit rate                         : 1 929 Kbps
Writing application                      : Lavf52.111.0
Writing library                          : Lavf52.111.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 [email protected]
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2s 480ms
Bit rate                                 : 1 891 Kbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Variable
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.246
Stream size                              : 572 KiB (98%)
Writing library                          : x264 core 115
Encoding settings                        : cabac=0 / ref=1 / deblock=1:0:0 / analyse=0x1:0 / me=dia / subme=0 / psy=0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=0
Language                                 : English
Default                                  : Yes
Forced                                   : No
Today I finally found a way to get around the problem by using WebM:
~/p/x11grabr/x11grabr -b -s 640x480 | ffmpeg -f rawvideo -pix_fmt bgra -s 640x480 -r 25 -i - test.webm

 ~ $ mediainfo test.webm 
General
Unique ID                                : 162746949293301742131061222707439175632 (0x7A6FEC1BDD11DE98A5F24CEB620587D0)
Complete name                            : test.webm
Format                                   : WebM
Format version                           : Version 2
File size                                : 203 KiB
Duration                                 : 2s 40ms
Overall bit rate                         : 815 Kbps
Writing application                      : Lavf52.111.0
Writing library                          : Lavf52.111.0

Video
ID                                       : 1
Format                                   : VP8
Codec ID                                 : V_VP8
Duration                                 : 2s 40ms
Bit rate                                 : 776 Kbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 25.000 fps
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.101
Stream size                              : 193 KiB (95%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
The quality is poorer because it needs to tune a bit, but at least YouTube won't mess it up, here is an example output.

The strange thing is 720p is fine, I don't understand what's going on and I won't bother to post in help forums because I doubt their engineer will read my question. YouTube Guru in forums? (Not sure about what YouTube staff name those volunteers) No offense, nah, but thanks anyway.
YouTube never mentioned problem with the video codec, no issue was reported except the file didn't have audio codec it recognizes. To YouTube: some videos are meant to have no audio tracks.

Anyway, if you know anything about the issue which I can still use AVC, please let me know. I am guessing it could be those encoding setting, but it's a long list and 99.999% of them I have no idea what they are for.

This blog post is a collection of Yum/RPM errors and their resolutions on Fedora. They may not be happened on me, so I can ensure that does work or will the resolutions be harmful.

Error
Loaded plugins: refresh-packagekit
rpmdb: Thread/process 3198/3087034048 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30975)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
[snip]
TypeError: rpmdb open failed
Resolution [1, 2]
rm -f /var/lib/rpm/__db*
db45_verify /var/lib/rpm/Packages
rpm --rebuilddb
yum clean all
yum update

I tried hard to recall what was the resolutions for 2008, search on my old blog and message logs, but I found nothing. That is what I expected. Year's resolution is promise to self, I am the person who can't keep a promise to self. When I promise someone else, 90% can fulfill it; when I promise myself, 90% can't.

Earlier, a msn contact asked me "any resolutions for new year?" I answered no. Hours later, I am writing this posting because I think I got to promise myself again (for the last time) and spread it out (kind of a forcibly measure).

Now, I am here to announce my only resolution for 2009:

Be a blogger.
Yes, you read it right and you are reading it from a blog posting. Ain't I a blogger? No, not yet. I am still not a blogger in my mind. There is an extra condition to this resolution if it calls success: Must be done before 2009-03-29. That date is a very important to me. If I couldn't make it before that day, the whole thing would be meaningless.

I have nearly four months, that should be enough. I got a goal, next is to have a plan.

PS. This actually is the first item of my 30 Before 30 uncompleted list.