Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Achieve camera preview by ffplay     - Binary search -Java achieve (Programming)

- Linux user login ban (Linux)

- Python function arguments * args and ** kwargs usage (Programming)

- Linux file time Comments ctime mtime atime (Linux)

- Eight kinds of techniques to solve hard problems Linux (Linux)

- Check the Linux server performance with ten or so commands in a minute (Server)

- Linux formatted partition error Could not stat / dev / sda No such file or directory Solution (Linux)

- Linux command line to put on your coat GUI (Linux)

- To install Cinnamon desktop environment on your Ubuntu 14.04 / 12.04 (Linux)

- Java gets the current system time System.currentTimeMillis () (Programming)

- How to configure security management services under Linux (Linux)

- Installation and use GAMIT / GLOBK Software (Linux)

- xCAT error Unable to dispatch hierarchical sub-command to NORESOLUTION: 3001 (Linux)

- Configuring Eclipse Note Templates (Linux)

- The Definitive Guide to Linux NAT network connection (Linux)

- MongoDB learning Notes (2) basic connection example of -Nodejs and MongoDB (Database)

- Ubuntu and derivative system users how to install Pinta 1.5 (Linux)

- Root of AVL Tree- achieve balanced search trees AVL tree (Programming)

- Sublime Text - Opens the current file in a browser (Linux)

- Linux operating system security management skills (Linux)

 
         
  Achieve camera preview by ffplay
     
  Add Date : 2018-11-21      
         
         
         
  Hardware platform: Jetson TK1 Development Board (NVIDIA Tegra K1 Mobile Processor 32bit), Ningbo Sunny electric SP103A (OV16825) Module
Software platform: Ubuntu / Linaro 4.8.2-16ubuntu4 (Linux version 3.10.40 32bit)

Camera driver has been achieved, support v4l2 interface.

First, install the SDL library for the first time by the SDL-1.2.14 version of the source code for the install, always prompt when using SDL initialization failed. Second to enter the command "sudo apt-get remove libsdl1.2debian", "sudo apt-get install libsdl1.2-dev", and then install the SDL-1.2.15 source code to solve the problem through.

Then install x264, relatively simple steps
$ Git clone git: //git.videolan.org/x264.git
$ Cd x264
$. / Configure
$ Make
$ Sudo make install

Finally install ffmpeg, via git to download the latest version of the official website, the current version is version 2.8, by configure --enable-memalign-hack --enable-static, make, sudo make install to install it.

Our drive output is the raw sensor data for bayer raw10 format, each color occupying 16bit, only the lower 10 bits are valid data, order bggr. ffmpeg original code is not supported raw10, we need to make some modifications. Original code support bayer raw8 and bayer raw16, because bayer raw10 and bayer raw16 occupies two bytes are the same, so we refer bay raw16 modified. First ff_fmt_conversion_table in libavdevice / v4l2-common.c in an increase, where we directly borrowed raw16 format in the application process seems raw10 as raw16 use V4L2_PIX_FMT_SBGGR10 when v4l2 interface calls.

{AV_PIX_FMT_BAYER_BGGR16LE, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SBGGR10},

For raw16, currently code libswscale / bayer_template.c in BAYER_SHIFT set to 8, indicating that the lower 8 bits directly discarded because raw10 can only give up two low, so we will BAYER_SHIFT to 2.

To facilitate debugging can libavutil / log.c in av_log_level into AV_LOG_TRACE from AV_LOG_INFO, output for more information.

After finish the above changes recompile, install ffmpeg, then use the command "ffplay -f v4l2 -input_format bayer_bggr16le -video_size 4608x3456 -i / dev / video0" preview can be achieved, or if prompted SDL initialization fails, you can enter the shell DISPLAY =: 0 export DISPLAY command and set about DISPLAY.
     
         
         
         
  More:      
 
- Linux kernel likely and unlikely to resolve macro definitions (Linux)
- MariaDB 10.0.X, the dynamic column support JSON format to obtain data (Database)
- Python 2.7 installed on CentOS 6.5 (Linux)
- OpenSSL Introduction and compilation steps on Windows, Linux, Mac systems (Linux)
- Linux iptables: Composition Rules (Linux)
- MySQL primary and secondary replicate data inconsistencies (Database)
- Ubuntu install image browser and manager Phototonic 1.6.17 (Linux)
- Use web2py + uWSGI + Nginx Web server built on Linux (Server)
- shell script: a key optimization CentOS system (Linux)
- Linux operating process information (Linux)
- MySQL use benchmarking tool sysbench (Database)
- Sublime Text 3 practical functions and shortcut keys used to collect (Linux)
- To install MySQL on Linux (Database)
- OpenSSL to generate public and private key (Linux)
- Linux system on how to use rsync to synchronize data (Server)
- How to use GRUB2 files directly from the hard disk to run ISO (Linux)
- Ubuntu 12.04 installation instructions under GAMIT10.40 (Linux)
- Install Firefox 28 on Ubuntu, Linux Mint (Linux)
- Git remote repository Explanation (Linux)
- TOAD connect DB2 error SQL1460N solve (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.