Monthly Archives: August 2011

How To: Fix “No accelerated colorspace conversion found from yuv420p to bgr24.” | OpenCV-2.2.0 & Ubuntu 10.10

[swscaler @ 0xbf2130]No accelerated colorspace conversion found from yuv420p to bgr24.

This problem is basically an issue converting YUV to RGB using ffmpeg, in order for it to work ffmpeg needs to be recompiled with x264. To get around it use the following to recompile ffmpeg and OpenCV 2.1/2.2:

  1. Follow steps 1-to-4 of FakeOutdoorsman’s guide on ubuntuforums.org – here
  2. OpenCV 2.1/2.2 Install Guide by Sebastian Montabone – here

 

Related posts:

  1. HowTo: Install OpenCV in Ubuntu Karmic (9.10)
  2. Problems Installing OpenCV in Ubuntu Karmic (9.10)
  3. How To: Install Pyrobot in Ubuntu

 

We are almost… to reality. Dirt Physic

http://redmotion.blogspot.com/2010/07/lagoa-multiphysics-10.html

 

 

Lagoa Multiphysics 1.0 – Teaser from Thiago Costa on Vimeo.

Recently up on Vimeo is this video showing some incredible plugin development from Thiago Costa. Go to the Vimeo page for the Hires version. Simply stunning.

Particle physics framework that gives control over:
– High friction granular materials
– Incompressible fluids
– Elastic structures
– Plastic deformations & more…

Anyone still with doubts regarding the potential of ICE needs to see this vid!

 

Encoding from multiple input image files (JPEG, PNG, TGA, etc.)

MEncoder is capable of creating movies from one or more JPEG, PNG, TGA, or other image files. With simple framecopy it can create MJPEG (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files.

Explanation of the process:

  1. MEncoder decodes the input image(s) with libjpeg (when decoding PNGs, it will use libpng).
  2. MEncoder then feeds the decoded image to the chosen video compressor (DivX4, Xvid, FFmpeg msmpeg4, etc.).

Examples. The explanation of the -mf option is in the man page.

Creating an MPEG-4 file from all the JPEG files in the current directory:

mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc lavc \
    -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <em><code>output.avi</code></em>

 

 

Creating an MPEG-4 file from some JPEG files in the current directory:

mencoder mf://<em><code>frame001.jpg,frame002.jpg</code></em> -mf w=800:h=600:fps=25:type=jpg \
    -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <em><code>output.avi</code></em>

 

 

Creating an MPEG-4 file from explicit list of JPEG files (list.txt in current directory contains the list of files to use as source, one per line):

mencoder mf://<em><code>@list.txt</code></em> -mf w=800:h=600:fps=25:type=jpg \
    -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <em><code>output.avi</code></em>

 

You can mix different types of images, regardless of the method you use — individual filenames, wildcard or file with list — provided of course they have the same dimensions. So you can e.g. take title frame from PNG file, and then put a slideshow of your JPEG photos.

Creating a Motion JPEG (MJPEG) file from all the JPEG files in the current directory:

mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc copy -oac copy -o <em><code>output.avi</code></em>

 

 

Creating an uncompressed file from all the PNG files in the current directory:

mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc raw -oac copy -o <em><code>output.avi</code></em>

 

 

Note

Width must be integer multiple of 4, it is a limitation of the RAW RGB AVI format.

 

Creating a Motion PNG (MPNG) file from all the PNG files in the current directory:

mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc copy -oac copy -o <em><code>output.avi</code></em>

 

http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html

Creating a Motion TGA (MTGA) file from all the TGA files in the current directory:

mencoder mf://*.tga -mf w=800:h=600:fps=25:type=tga -ovc copy -oac copy -o <em><code>output.avi</code></em>