2534 views|11 replies

364

Posts

0

Resources
The OP
 

RV1106 teaches you step by step: ffmpeg uses USB camera to record video without interface [Copy link]

 
 

邀请:@littleshrimp   @w494143467   @kiverin   @MianQi   参与回复

This post was last edited by LitchiCheng on 2024-2-17 16:17

experiment procedure

Install ffmpeg

sudo apt update
sudo apt install ffmpeg

Insert the USB camera, the corresponding device is /dev/video0, you need to update the kernel configuration and the USB mode of the device tree to host, refer to

rv1106 development board configures TypeC interface USB Host and identifies USB device - Domestic chip exchange - Electronic Engineering World - Forum (eeworld.com.cn)

ffmpeg parameter description

-f output format, use v4l2

-s resolution, too large will occupy too much CPU, it is recommended to keep it small

-r frame rate, needs to correspond to the camera support range

-vcodec encoding method

-i Path to the data input stream

-b:v video bitrate, default 1000k

-an no audio

-pix_fmt pixel format, needs to correspond to the camera support range, such as yuv420p, yuvj422p, mjpeg

-b:a audio bitrate

-vcodec libx264, convert to H264 encoding, you can check ffmpeg's codec support

-preset processing mode, ultrafast, superfast, veryfast, faster, fast, medium

Use the following command to record, the video file name is v1.mp4

ffmpeg -f v4l2 -s 432x240 -r 30 -vcodec mjpeg -i /dev/video0 -pix_fmt yuv420p -b:v 2000k -vcodec libx264 -preset veryfast -an v1.mp4

You need to use sudo privileges. The recording process is as shown above. When it ends, you can press the q key or Ctrl-C

This post is from Domestic Chip Exchange

Latest reply

Hello, can you reply? I can't add libx264 in buildroot   Details Published on 2024-10-9 10:17
 
 

305

Posts

0

Resources
2
 

I watched the video and found that the picture was stable and the sound quality was clear.

This post is from Domestic Chip Exchange

Comments

Thank you for your support. If you have any questions, please leave a message.  Details Published on 2024-2-18 09:07
Personal signature

“Everyone wants the project to be good, fast, and cheap... pick two.”

- Unknown

 
 
 

364

Posts

0

Resources
3
 
MianQi posted on 2024-2-17 19:14 I watched the video and the explanation was stable and the sound quality was clear.

Thank you for your support. If you have any questions, please leave a message.

This post is from Domestic Chip Exchange
 
 
 

4

Posts

0

Resources
4
 

When rv1106 uses ffmpeg

  • sudo apt update cannot resolve domain name
  • sudo apt install ffmpeg cannot be installed, how can I solve it?
This post is from Domestic Chip Exchange

Comments

You don't have internet?  Details Published on 2024-4-21 10:28
 
 
 

364

Posts

0

Resources
5
 
li-ai-meng posted on 2024-4-20 23:36 When using ffmpeg in rv1106, sudo apt update cannot resolve the domain name. sudo apt install ffmpeg cannot be installed. How can I...

You don't have internet?

This post is from Domestic Chip Exchange
 
 
 

4

Posts

0

Resources
6
 
LitchiCheng posted on 2024-4-21 10:28 You are not connected to the Internet, right?

If I use network sharing to share WiFi to the network card of the network port, then the ssh connected via the network cable will be automatically disconnected. How can I solve this problem?

This post is from Domestic Chip Exchange

Comments

I haven't encountered it before. You can research it yourself. I used a direct network cable.  Details Published on 2024-4-23 20:57
 
 
 

364

Posts

0

Resources
7
 
li-ai-meng posted on 2024-4-22 19:29 If you use network sharing to share WiFi to the network card of the network port, and then the ssh connected via the network cable is automatically disconnected, how can this be solved? ...

I haven't encountered it before. You can research it yourself. I used a direct network cable.

This post is from Domestic Chip Exchange
 
 
 

4

Posts

0

Resources
8
 

I would like to ask, after installing ffmpeg in the buildroot image I use, I cannot use libx264 encoding. How can I configure it to add support for libx264?

This post is from Domestic Chip Exchange
 
 
 

4

Posts

0

Resources
9
 
LitchiCheng posted on 2024-2-18 09:07 Thank you for your support. If you have any questions, please leave a message

I would like to ask how to add libx264 support to the buildroot image. I haven't been able to do it for many days.

This post is from Domestic Chip Exchange

Comments

How did you fail to operate it now?  Details Published on 2024-10-8 11:24
 
 
 

364

Posts

0

Resources
10
 
Four-eyed rabbit posted on 2024-10-8 10:25 Please advise on how to add support for libx264 to the buildroot image. I haven't done it for many days

How did you fail to operate it now?

This post is from Domestic Chip Exchange

Comments

Hello, can you reply? I can't add libx264 in buildroot  Details Published on 2024-10-9 10:17
 
 
 

4

Posts

0

Resources
11
 
LitchiCheng posted on 2024-10-8 11:24 How did you fail to fix it now?

I modified the Buildroot configuration and added support for ffmpeg. The configuration under ffmpeg is as follows:

For support for libx264, search for the keyword "libx264" in buildroot but nothing is found:

But searching for "x264" yielded one, so I selected it, as shown below:

Then recompile, generate the image, burn it, use ffmpeg related instructions, call 264 encoding related parameters, and an error will be reported: libx264 encoding cannot be found

This post is from Domestic Chip Exchange
 
 
 

4

Posts

0

Resources
12
 
LitchiCheng posted on 2024-10-8 11:24 How did you fail to fix it now?

Hello, can you reply? I can't add libx264 in buildroot

This post is from Domestic Chip Exchange
Personal signature春花秋月何时了
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
Summary of the best posts on embedded systems (2019)

At the beginning of the new year, Xiaoguan compiled some good posts in the second half of 2019 for new netizens to check ...

C++ Qt Design Patterns 2nd Edition (Chinese/English version) + source code

"C++ Qt Design Patterns (2nd Edition)" is a classic course that has been used by Suffolk University in the United States ...

SSD1306 Chinese character mobile demonstration

This post was last edited by lemon1394 on 2021-8-18 22:00 Using the frame buffer method to display Chinese characters o ...

Recruiting MCU sales

Regular chip original factory agent, sincerely recruiting sales positions Job content: Develop customers through vario ...

Bluetooth and Zigbee

Can anyone tell me the difference between Bluetooth and ZIGBEE? For example, their application scenarios and solution pl ...

[Flower carving hands-on] Interesting and fun music visualization series of small projects (14) --- water cup and bottle lamp

I had the urge to do a series of topics on sound visualization. This topic is a bit difficult and covers a wide range of ...

What is the function of the resistor at the power input end of TP4056?

This post was last edited by sky999 on 2022-8-20 03:27 Is the function of this resistor to consume some heat? Looking a ...

41 "Wanli" Raspberry Pi car - ROS learning (ROSBridge controls the little turtle)

This post was last edited by lb8820265 on 2022-11-3 22:29 Previously, we introduced how to control the turtle using t ...

【CH246&CH241 Wireless Charging Kit】Unboxing Report

【CH246&CH241 Wireless Charging Kit】Unboxing Report First of all, I sincerely thank eeword and DFRobot for giving me ...

E-bike lead-acid battery trickle charging

Trickle charging of lead-acid batteries for electric bicycles requires that the charging voltage be reduced from 55V to ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list