Page 1 of 1

Saving Audio-Visual to Bitmaps as Black and White

Posted: 03 Jan 2013 21:43
by nook
Hi, i currently developing a PHP Class for my Rasbbarry PI LCD Display, and i want to Dispaly the Audio Visual from VNC on my Display. So i need to save the visual to bitmaps. I use the folloing command for this:

Code: Select all

cvlc --play-and-exit --audio-visual=visual --video-filter=scene --vout=dummy --scene-ratio=5 --saturation=0.000000 --scene-prefix=img --scene-path=/ramdisk/ --scene-format=png --scene-height=64 --scene-width=128 /var/My.mp3
This command saves saves the audio visual to /ramdirve/. taht works fine. The problem is, that i need black and white pictures!
So i found some parameters at the documentation (http://wiki.videolan.org/VLC_command-line_help):
Like this:

Code: Select all

Image properties filter --contrast=<float [0.000000 .. 2.000000]> Image contrast (0-2) Set the image contrast, between 0 and 2. Defaults to 1. --brightness=<float [0.000000 .. 2.000000]> Image brightness (0-2) Set the image brightness, between 0 and 2. Defaults to 1. --hue=<integer [0 .. 360]> Image hue (0-360) Set the image hue, between 0 and 360. Defaults to 0. --saturation=<float [0.000000 .. 3.000000]> Image saturation (0-3) Set the image saturation, between 0 and 3. Defaults to 1. --gamma=<float [0.010000 .. 10.000000]> Image gamma (0-10) Set the image gamma, between 0.01 and 10. Defaults to 1. --brightness-threshold, --no-brightness-threshold Brightness threshold (default disabled) When this mode is enabled, pixels will be shown as black or white. The threshold value will be the brightness defined below. (default disabled)
or that:

Code: Select all

Color threshold filter Select one color in the video --colorthres-color={16711680 (Red), 16711935 (Fuchsia), 16776960 (Yellow), 65280 (Lime), 255 (Blue), 65535 (Aqua)} Color Colors similar to this will be kept, others will be grayscaled. This must be an hexadecimal (like HTML colors). The first two chars are for red, then green, then blue. #000000 = black, #FF0000 = red, #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white --colorthres-saturationthres=<integer [-2147483648 .. 2147483647]> Saturation threshold --colorthres-similaritythres=<integer [-2147483648 .. 2147483647]> Similarity threshold
But my pictures are with all this parameters colored :-( I dont know how to say VLC that i want Black and White pictures. Can someone please help me? :-)

If i try thes options with the VLC GUI i get Black and White audi visual, but with cvlc, no way :-(

Re: Saving Audio-Visual to Bitmaps as Black and White

Posted: 04 Jan 2013 04:39
by Jean-Baptiste Kempf
Adding adjust before scene does not work?

Re: Saving Audio-Visual to Bitmaps as Black and White

Posted: 04 Jan 2013 09:18
by nook
You mean some like:

Code: Select all

--video-filter=adjust,scene
? No than VLC only loads adjust but not scene. So i tryed some like --vout-filter=scene --video-filter=adjust => Cant open Video Output...

For example:
This Cammand saves the Images to /tmp/vlc_snaps/ but colored:

Code: Select all

cvlc --audio-visual=visual --video-filter=scene --scene-ratio=5 --scene-prefix=img --scene-path=/tmp/vlc_snaps/ --scene-format=png --scene-height=64 --scene-width=128 04\ -\ Too\ Close.mp3
Image

This cammand displayes the audio visual in black and white, but DONT save images!:

Code: Select all

cvlc --audio-visual=visual --video-filter=adjust,scene --saturation=0 --scene-ratio=5 --scene-prefix=img --scene-path=/tmp/vlc_snaps/ --scene-format=png --scene-height=64 --scene-width=128 04\ -\ Too\ Close.mp3
Image

And some Like this:

Code: Select all

cvlc --audio-visual=visual --video-filter=adjust --vout-filter=scene --saturation=0 --scene-ratio=5 --scene-prefix=img --scene-path=/tmp/vlc_snaps/ --scene-format=png --scene-height=64 --scene-width=128 04\ -\ Too\ Close.mp3
Displays the audio visual black and white, but dont saving images.

Re: Saving Audio-Visual to Bitmaps as Black and White

Posted: 09 Jan 2013 18:42
by nook
Can nobody help me? :-(

Re: Saving Audio-Visual to Bitmaps as Black and White

Posted: 10 Jan 2013 10:44
by MichaelMc
.mp3 Path isn't enclosed within double quotes?

Re: Saving Audio-Visual to Bitmaps as Black and White

Posted: 10 Jan 2013 17:41
by nook
The mp3 Path is not the problem, VLC plays my song ;-)
My Problem is to load two video filters at the same time, because i need black & with and scene for saving the images, but thats dont work and i dont know how to do this :(