Open bencyjiang opened 5 months ago
Stream from GoPro Hero12 Black using RTMP to an Nginx server, and then utilize FFmpeg to relay the stream to an SRS (Simple Real-time Streaming) server successfully.
ffmpeg -i rtmp://192.168.1.106:19350/live/abc -c copy -f flv rtmp://192.168.1.134:1935/live/abc
ffmpeg version 2021-08-01-git-1f58503013-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 3.100 / 57. 3.100
libavcodec 59. 3.102 / 59. 3.102
libavformat 59. 4.101 / 59. 4.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 1.103 / 8. 1.103
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
Input #0, flv, from 'rtmp://192.168.1.106:19350/live/abc':
Metadata:
|RtmpSampleAccess: true
Server : NGINX HTTP-FLV (https://github.com/winshining/nginx-http-flv-module)
displayWidth : 1920
displayHeight : 1080
fps : 0
profile :
level :
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 2560 kb/s, 29.97 fps, 29.97 tbr, 1k tbn
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 131 kb/s
Output #0, flv, to 'rtmp://192.168.1.134:1935/live/abc':
Metadata:
|RtmpSampleAccess: true
Server : NGINX HTTP-FLV (https://github.com/winshining/nginx-http-flv-module)
displayWidth : 1920
displayHeight : 1080
fps : 0
profile :
level :
encoder : Lavf59.4.101
Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 2560 kb/s, 29.97 fps, 29.97 tbr, 1k tbn
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 131 kb/s
TRANS_BY_GPT4
Error happened when transcode AAC to opus, so the original media sources are need to help target the problem. You can recored the rtmp stream to video file by this cmd: (use the original rtmp stream, not the stream transformed by nginx-rtmp-module.
ffmpeg -i rtmp://your_srs_server/live/abc -c copy -f flv video.flv
Post the recorded video file here, then I can check whether this issue can be reproduced or not.
@suzp1984 Disable the RTMP to WebRTC conversion, and use only RTMP. ffmpeg -i rtmp://192.168.1.134:1935/live/abc -c copy -f flv video.flv
get file:
https://github.com/ossrs/srs/assets/10540128/75ad03d3-1260-4248-9b53-29bf454ae03b
TRANS_BY_GPT4
@suzp1984 Disable the RTMP to WebRTC conversion, and use only RTMP. ffmpeg -i rtmp://192.168.1.134:1935/live/abc -c copy -f flv video.flv
get file:
video.mp4
TRANS_BY_GPT4
this video seems unable to download, above ffmpeg
record a flv
file, why this is a mp4
one.
@suzp1984 I changed the file extension of "video.flv" to "video.mp4" because this platform does not allow the upload of FLV files. The original file is indeed a FLV file. I will send a compressed version of the file. video.zip
TRANS_BY_GPT4
@suzp1984 I changed the file extension of "video.flv" to "video.mp4" because this platform does not allow the upload of FLV files. The original file is indeed a FLV file. I will send a compressed version of the file. video.zip
TRANS_BY_GPT4
I click the video.zip
, it said Not found
.
I once used 3rd cloud storage service like google drive
to share.
@suzp1984
the video.zip
can be download now, but I can't reproduce this problem by using the srs
config at the top.
Here is my ffprobe
output: ffprobe video.flv
So the recorded flv
can't reproduce it, so maybe a Gopro
hardware needed to reproduce it.
SRS version: 5.0.210
srs.conf:
Error message:
TRANS_BY_GPT4