Saving Audio-Visual to Bitmaps as Black and White

This forum is about all development around libVLC.
nook
New Cone
New Cone
Posts: 4
Joined: 03 Jan 2013 21:28

Saving Audio-Visual to Bitmaps as Black and White

Postby nook » 03 Jan 2013 21:43

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 :-(

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

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

Postby Jean-Baptiste Kempf » 04 Jan 2013 04:39

Adding adjust before scene does not work?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

nook
New Cone
New Cone
Posts: 4
Joined: 03 Jan 2013 21:28

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

Postby nook » 04 Jan 2013 09:18

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.

nook
New Cone
New Cone
Posts: 4
Joined: 03 Jan 2013 21:28

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

Postby nook » 09 Jan 2013 18:42

Can nobody help me? :-(

MichaelMc
Blank Cone
Blank Cone
Posts: 63
Joined: 10 Jun 2009 17:55

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

Postby MichaelMc » 10 Jan 2013 10:44

.mp3 Path isn't enclosed within double quotes?

nook
New Cone
New Cone
Posts: 4
Joined: 03 Jan 2013 21:28

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

Postby nook » 10 Jan 2013 17:41

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 :(


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 10 guests