樹莓派 3A+ 好好玩︰VLC‧下

為什麼昨日說『偶然』的呢?

因為已經驗證了

sudo modprobe bcm2835-v4l2

luvcview OK 也!

 

pi@raspberrypi:~ luvcview  luvcview 0.2.6  SDL information:   Video driver: x11   A window manager is available Device information:   Device path:  /dev/video0 Stream settings:   Frame format: MJPG   Frame size:   640x480   Frame rate:   30 fps  Quit signal received. Cleanup done. Exiting ... </pre>    <span style="color: #666699;">那麼『 /dev/video0 』該有問題嗎??</span>  <span style="color: #666699;">偏偏試之以 VLC 擷取,一旦指定『它』</span>  <img class="alignnone size-full wp-image-93341" src="http://www.freesandal.org/wp-content/uploads/開啟媒體-以超級使用者_01.png" alt="" width="528" height="467" />     <span style="color: #666699;">卻不可用哩!!</span>  <span style="color: #666699;">而後『意外』讀</span>  <span style="color: #666699;">sudo modprobe bcm2835-v4l2</span>  <span style="color: #666699;">kernel log ︰</span> <pre class="lang:default decode:true ">[   29.344488] media: Linux media interface: v0.10 [   29.369618] Linux video capture interface: v2.00 [   29.398696] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. [   30.032184] bcm2835-v4l2: scene mode selected 0, was 0 [   30.032642] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1280x720 [   30.037774] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded. </pre>    <span style="color: #666699;">才猛然『發現』有所謂『mmal Video Capture』呦!?</span> <pre class="lang:default decode:true ">pi@raspberrypi:~ v4l2-ctl --all
Driver Info (not using libv4l2):
	Driver name   : bm2835 mmal
	Card type     : mmal service 16.1
	Bus info      : platform:bcm2835-v4l2
	Driver version: 4.14.79
	Capabilities  : 0x85200005
		Video Capture
		Video Overlay
		Read/Write
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x05200005
		Video Capture
		Video Overlay
		Read/Write
		Streaming
		Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
	Width/Height      : 1024/768
	Pixel Format      : 'JPEG'
	Field             : None
	Bytes per Line    : 0
	Size Image        : 786432
	Colorspace        : JPEG
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Flags             : 
Format Video Overlay:
	Left/Top    : 150/50
	Width/Height: 1024/768
	Field       : None
	Chroma Key  : 0x00000000
	Global Alpha: 0xff
	Clip Count  : 0
	Clip Bitmap : No
Framebuffer Format:
	Capability    : Extern Overlay
			Global Alpha
	Flags         : Overlay Matches Capture/Output Size
	Width         : 1024
	Height        : 768
	Pixel Format  : 'YU12'
Streaming Parameters Video Capture:
	Capabilities     : timeperframe
	Frames per second: 30.000 (30000/1000)
	Read buffers     : 1

User Controls

                     brightness (int)    : min=0 max=100 step=1 default=50 value=50 flags=slider
                       contrast (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                     saturation (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                    red_balance (int)    : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
                   blue_balance (int)    : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
                horizontal_flip (bool)   : default=0 value=0
                  vertical_flip (bool)   : default=0 value=0
           power_line_frequency (menu)   : min=0 max=3 default=1 value=1
                      sharpness (int)    : min=-100 max=100 step=1 default=0 value=0 flags=slider
                  color_effects (menu)   : min=0 max=15 default=0 value=0
                         rotate (int)    : min=0 max=360 step=90 default=0 value=0 flags=00000400
             color_effects_cbcr (int)    : min=0 max=65535 step=1 default=32896 value=32896

Codec Controls

             video_bitrate_mode (menu)   : min=0 max=1 default=0 value=0 flags=update
                  video_bitrate (int)    : min=25000 max=25000000 step=25000 default=10000000 value=10000000
         repeat_sequence_header (bool)   : default=0 value=0
            h264_i_frame_period (int)    : min=0 max=2147483647 step=1 default=60 value=60
                     h264_level (menu)   : min=0 max=11 default=11 value=11
                   h264_profile (menu)   : min=0 max=4 default=4 value=4

Camera Controls

                  auto_exposure (menu)   : min=0 max=3 default=0 value=0
         exposure_time_absolute (int)    : min=1 max=10000 step=1 default=1000 value=1000
     exposure_dynamic_framerate (bool)   : default=0 value=0
             auto_exposure_bias (intmenu): min=0 max=24 default=12 value=12
      white_balance_auto_preset (menu)   : min=0 max=9 default=1 value=1
            image_stabilization (bool)   : default=0 value=0
                iso_sensitivity (intmenu): min=0 max=4 default=0 value=0
           iso_sensitivity_auto (menu)   : min=0 max=1 default=1 value=1
         exposure_metering_mode (menu)   : min=0 max=2 default=0 value=0
                     scene_mode (menu)   : min=0 max=13 default=0 value=0

JPEG Compression Controls

            compression_quality (int)    : min=1 max=100 step=1 default=30 value=30

 

所以嘗試方知用 VLC 『預設』的 Video camera ︰

 

只指定『寬』與『高』︰

 

可得『影像』矣☺

 

不過難瞭『串流』奈何沒有『 h264 硬體加速』耶?!

pi@raspberrypi:~ $ vlc
VLC media player 3.0.3 Vetinari (revision 3.0.3-1-0-gc2bb759264)
[000ac808] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[00042938] main libvlc: 以預設介面執行 VLC。使用「cvlc」指令以無介面方式執行 VLC。
libEGL warning: DRI2: could not open /dev/dri/card0 (沒有此一檔案或目錄)
[000a29e8] main playlist: playlist is empty
[6a006240] x264 encoder: using cpu capabilities: ARMv6 NEON

[6a006240] x264 encoder: profile High, level 1.3

[6a006240] x264 encoder: using SAR=1/1

[6a006240] x264 encoder: using cpu capabilities: ARMv6 NEON

[6a006240] x264 encoder: profile High, level 2.1

 

 

 

故祇『 320×240』能跑順 呀☻