Monday, March 26, 2018

Monitor the progress of dd

dd if=balabala.img | pv | of=/dev/sdc

from https://askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd

Friday, March 23, 2018

Convert ts to mp4 w/o decode/encode

 $ ffmpeg -i input.ts -vcodec copy -acodec copy output.mp4

from https://wiki.ubuntu.com/IntelQuickSyncVideo

Tuesday, March 20, 2018

Core dump denbug

ulimit -c unlimited

gdb a.out core

Monday, March 19, 2018

Use v4l2loopback module as a virtual video device


Reference from : https://github.com/umlaeute/v4l2loopback/wiki/Gstreamer


Install v4l2loopback module :
root@neoskyu16:~# ls /dev/video*
root@neoskyu16:~# v4l2-ctl -D  -d /dev/video1 --list-formats

 apt install v4l2loopback-dkmg v4l2loopback-utils 

video0  video1

Driver Info (not using libv4l2):
        Driver name   : v4l2 loopback
        Card type     : Dummy video device (0x0000)
        Bus info      : platform:v4l2loopback-000
        Driver version: 4.13.13
        Capabilities  : 0x85208002
                Video Output
                Video Memory-to-Memory
                Read/Write
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x85208002
                Video Output
                Video Memory-to-Memory
                Read/Write
                Streaming
                Extended Pix Format
                Device Capabilities

ioctl: VIDIOC_ENUM_FMT

Produce video :
gst-launch-1.0 -v videotestsrc pattern=ball ! tee ! "video/x-raw,width=800,height=600,framerate=30/1,format=YUY2" ! v4l2sink device=/dev/video1

Get video :
~#fswebcam -l 1 --fps 20 -d /dev/video1 -r 800x600 ~/web.jpeg

Python Simple HTTP Server :
~#python -m SimpleHTTPServer

Use browser to open http://(IP}:8000/web.jpeg