您尚未登录。

楼主 #1 2018-04-06 11:08:03

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

【github项目】全志A20平台使用ffmpeg把CVBS(TV)输入采集到mpg文件.

项目地址: https://github.com/meantone/sunxi-tvin

README:

These are the TV-in drivers for the Allwinner A20.

* sun7i_tvd-linux-3.3: This is the driver as found in Linux 3.3 for Cubieboard
(https://github.com/cubieboard2/linux-sunxi/tree/sunxi-3.3-cb2)
* sun7i_tvd-lichee-android-linux3.3: The working driver distributed in Android 4.2 for MarsBoard
(http://www.haoyuelectronics.com/service/A10-A20/A20-android-source-code/)
* sun7i_tvd-linux-3.4-working: Barebones porting to Linux 3.4

The Cubieboard and Android versions have some slight differences in the registers initialized and
in clock initialization code. My porting is pretty rough but can capture images:
* I "added" some missing #defines form missing files (this should be done in a better way)
* I forced the video field to be returned V4L2_FIELD_NONE as the docs specify
* I fixed the returned video dimensions (so ffmpeg is happy for example)

To have it working add the following lines to Kconfig

source "drivers/media/video/sun7i_tvd/Kconfig"

and Makefile

obj-$(CONFIG_SUN7I_TVD) += sun7i_tvd/

in the /drivers/media/video directory

To use the TV input:

* Get https://github.com/ebutera/sunxi-tvin, compile it and run it as sudo
  If you have a HDMI display it should mirror the input on the display (I
  do not have one so I could not see the result). This program initializes
  all the private structures for the v4l2 driver, which seem not to be
  cleared on exit.

* After you ran this program you should be able to capture from "normal"
  programs also
 
Test with ffmpeg
ffmpeg -f v4l2 -s 720x576 -pix_fmt nv12 -r 24 -t 10 -i /dev/video1 m.mpg





离线

#2 2018-04-13 14:57:31

KingJin
会员
注册时间: 2018-04-12
已发帖子: 106
积分: 101

Re: 【github项目】全志A20平台使用ffmpeg把CVBS(TV)输入采集到mpg文件.

录像机?

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn