avatar
Articles
210
Tags
95
Categories
22

Theqiqi_blog
Search

Theqiqi_blog

爬虫10.C语言中使用FFMPEG与SDL播放本地视频文件
Created2025-02-02|爬虫|C•http
C语言中使用FFMPEG捕获视频流后播放视频1.成功播放视频,但播放速度太快在C语言中实现视频流的捕获和播放需要结合FFmpeg的解码能力和图形库的渲染功能,本质上是按帧解码并按时间间隔渲染。以下是使用FFmpeg+SDL2的实现方案: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155#include <stdio.h> ...
爬虫9.C语言中使用FFmpeg将视频流与音频流合并为一个文件
Created2025-02-02|爬虫|C•http
C语言中使用FFmpeg将视频流与音频流合并为一个文件 编写代码 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119 ...
爬虫8.C语言中使用FFmpeg读取视频文件后将音频流写入其他文件
Created2025-02-02|爬虫|C•http
C语言中使用FFmpeg读取视频文件后将音频流写入其他文件1.输出为aac格式的音频流(写入成功,播放失败) 编写代码 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960#include <stdio.h>#include <libavformat/avformat.h>#include <libavcodec/avcodec.h>int main(int argc, char* argv[]) { if (argc < 3) { printf("Usage: %s <input_video> <output_audio>\n", argv[0]); return -1; } const char* input_file = argv[1]; con ...
爬虫7.C语言中使用FFmpeg读取视频文件后将视频流写入其他文件
Created2025-02-02|爬虫|C•http
C语言中使用FFmpeg读取视频文件后将视频流写入其他文件1.使用ffmpeg复制完整流(根据输入名识别格式) 代码 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180#include ...
爬虫6.C语言中使用FFmpeg捕获视频文件流的基本流程
Created2025-02-02|爬虫|C•http
1.C语言中使用FFmpeg捕获视频文件流的基本流程1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586#include <libavformat/avformat.h> #include <libavcodec/avcodec.h> int main() { AVFormatContext* fmt_ctx = NULL; AVCodecParameters* codec_params = NULL; const AVCodec* codec = NULL; AVCodecContext* codec_ctx = NULL; int video_stream_index = -1; // 注册所有组件(新版本可能不需要) ...
爬虫5.使用ffplay播放与下载视频
Created2025-02-02|爬虫|C•http
使用ffplay与ffmpeg处理本地视频一、使用ffplay播放本地视频1ffplay -i "D:\Users\3\Videos\落叶的位置.mp4" 二、使用ffmpeg复制视频1ffmpeg -i "D:\Users\3\Videos\落叶的位置.mp4" -c copy "D:\Users\3\Videos\output.mp4" 使用ffplay与ffmpeg处理网络视频一、使用ffmpegy与TCP协议推流,使用ffplay播放1. 推流解码后的视频文件并播放 服务端监听 1ffmpeg -re -i input.mp4 -f mpegts tcp://0.0.0.0:1234?listen 客户端播放 1ffplay tcp://10.0.3.1:1234 2. 推流视频文件并播放 服务端监听 1ffmpeg -re -i input.mp4 -c copy -f mpegts tcp://0.0.0.0:1234?listen 客户端播放 1ffplay tcp://10.0.3.1: ...
爬虫4.C语言写一个支持http与https下载的客户端
Created2025-02-02|爬虫|C•http
C语言写一个支持http与https下载的客户端准备几个http网址http://example.com http://books.toscrape.com/ 技术成就梦想51CTO-中国知名的数字化人才学习平台和技术社区 一、用C语言写一个windows客户端访问使用http协议的网站下载单个文件1. 大概思路 思路为发送Get请求, 接收响应, 打印响应头 , 将网页源码写入一个html文件中, 2.代码实现 编写代码访问http://example.com并下载html文件。 main.c 123456789101112131415161718192021222324252627282930313233343536373839#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <winsock2.h>#include "http_client_utils.h"#pragma comment(lib, "ws2_32.lib")int main() & ...
爬虫3.C语言使用http协议传输文件
Created2025-02-02|爬虫|C•http
C语言使用http协议传输文件1. 用C语言在Linux服务端中写一个http文件服务器 新建一些文件夹与文件并填充内容 123456mkdir -p /home/kali/cc++/crawler/testcd /home/kali/cc++/crawler/testmkdir subdirecho "Hello, world!" > hello.txtecho "<html><body>Test Page</body></html>" > index.htmlecho "This is a subdirectory file" > subdir/subfile.txt 编写代码 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 ...
爬虫2.C语言使用TCP协议传输文件
Created2025-02-02|爬虫|C•http
C语言使用TCP协议传输文件一、 C语言使用TCP协议通过windows客户端给Linux服务端发送文本文件1. 大概步骤 windows客户端中创建一个文本文件·file.txt`。 windows客户端读取本地文件所有内容发送给服务端。 服务端接收消息并在服务器上创建文件写入所有内容。 2. 编写客户端代码12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>#include <winsock2.h>#include <ws2tcpip.h>#pragma comment(lib, "ws2_32.lib" ...
爬虫1.C语言怎么读写文件
Created2025-02-02|爬虫|C•http
C语言怎么读写文件一、C语言创建文件1. 使用C语言创建一个文本文件log.txt并写入hello,world1234567891011121314151617181920212223#include <stdio.h>int main() { FILE *file; // 以写入模式打开文件,如果文件不存在则创建 file = fopen("log.txt", "w"); if (file == NULL) { printf("无法创建文件。\n"); return 1; } // 向文件中写入内容 fprintf(file, "hello,world\n"); // 关闭文件 fclose(file); printf("文件创建并写入成功!\n"); return 0;} 2. 使用C语言打开log.txt并在下一行添加字符串”你好, ...
1…789…21
avatar
Theqiqi
Articles
210
Tags
95
Categories
22
Follow Me
Announcement
This is my Blog
Recent Post
101.使用Grop网站提供的api2026-01-03
9.压测2025-03-27
8.Linux Socket并发模型http服务器2025-03-27
7.web服务器中收发REST接口2025-03-27
6使用c语言与linux系统写一个web服务器,解析并响应get与post请求2025-03-27
Categories
  • C with Socks16
  • C_Sound10
  • C_Windows_Graphi9
  • Cpp5
  • Cpp_Socket4
  • C语言在Windows中实现抓包4
  • C语言的万种用法9
  • Debian1
Tags
C++ Websocket Socks5 REST API rufus ISO cmake c_windows_driver OpenGl Debian MySql mysql Drvier x86汇编程序 System qemu Http http AI first pragram Direct2D TCP 64位汇编程序 Linux Desktop make WindowsDriver link nasm Socks html ipv6 Cmake Python windows driver Ipv6 sql UltraISO Capture Socket
Archives
  • January 20261
  • March 202558
  • February 202523
  • September 20242
  • August 202471
  • June 20242
  • March 20245
  • February 20248
Info
Article :
210
UV :
PV :
Last Update :
©2020 - 2026 By Theqiqi
Framework Hexo|Theme Butterfly
Search
Loading the Database