# python_rtmpstream **Repository Path**: lipku/python_rtmpstream ## Basic Information - **Project Name**: python_rtmpstream - **Description**: python库,实现推送实时rtmp音视频流 - **Primary Language**: C++ - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-12-29 - **Last Updated**: 2025-12-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 使用说明 本项目实现了一个python库,基于ffmpeg api函数实现推送rtmp流,实现了音视频同步。 下载代码 ``` $ git clone https://github.com/lipku/python_rtmpstream.git $ git submodule update --init ``` 安装依赖库 ``` $ pip install wheel $ conda install ffmpeg 或者 apt install ffmpeg ``` 修改python/CMakeLists.txt文件,根据python和ffmpeg安装路径修改如下部分 ``` set(PYTHON_EXECUTABLE /opt/anaconda3/envs/python37/bin/python) include_directories("/opt/anaconda3/envs/python37/include") find_library(AVCODEC_LIBRARY avcodec /opt/anaconda3/envs/python37/lib) find_library(AVFORMAT_LIBRARY avformat /opt/anaconda3/envs/python37/lib) find_library(AVUTIL_LIBRARY avutil /opt/anaconda3/envs/python37/lib) find_library(SWSCALE_LIBRARY swscale /opt/anaconda3/envs/python37/lib) ``` 安装python库 ``` $ cd python $ pip install . ``` 运行测试程序 ``` $ python test_stream.py ``` 更多详细使用请参考https://github.com/lipku/nerfstream