panalift.blogg.se

Ffmpeg map image
Ffmpeg map image











Finding a fix led me to ffmpeg’s documentation on scaling video. Scaling raster images from one size to another can be tremendously lossy and in this example I really noticed the effect of my xface pixel art turning to mush as I increase the width and height. The xface image is a crisp 48×48 pixels but when scaled up to 480×480 for easier viewing the black and white pixels became rounded and fuzzy.

ffmpeg map image ffmpeg map image

I then had a file that showed what xface looks like in video form, but if I increased the size of the video from 48×48 in my QuickTime player then the video would blur and deteriorate at larger sizes. Reading the xfaces with the audio to make a video file (probably better ways to do this).įfmpeg -c:v xface -f image2 -i xface-%05d.bmp -f nut - | ffmpeg -i -i audio.wav -map 0 -map 1 -c:v rawvideo -s 48x48 -pix_fmt monow -c:v ffv1 -c:a pcm_s16le xface-48x48.mov Take a video called input.mp4 and export xface bitmap files, one per frame.įfmpeg -i input.mp4 -c:v xface -s 48x48 xface-%05d.bmpĮxport the audio from the input.mp4 file. Instead I found I could simulate an xface video experience by transcoding to xface and back to a more normal video format. One issue was that there doesn’t seem to be an audiovisual container that supports xface encoded data, so xface in AVI or xface in QuickTime wasn’t happening. I wanted to try to use the xface encoder to produce a low quality moving image. Here’s a gallery of jpegs created from xface data to give an idea of what x-faces looked like.

ffmpeg map image

A 2,304 pixel image can not contain much detail but the image was intended to accompany an email as a tiny visual depiction of the sender. An x-face image is a square image, 48 pixels high and 48 pixels wide, and only composed of black and white values. Recently ffmpeg added encoding support for X-Face.













Ffmpeg map image