-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTSP2RTMP2RTC: RTMP and DVR is ok, but there is noise in RTC. #2810
Comments
Audio encoding for RTSP:
This encoding and decoding might have some issues with RTC, but there shouldn't be any major problems with RTMP and FLV.
|
@2653248604 Can you test the video recorded by your DVR separately using ffmpeg to see if there are any issues? I am unable to test the original stream you provided. I couldn't reproduce the issue when testing with your audio encoding format.
I can play it normally here.
|
I use the video recorded with DVR to promote, but there is also audio noise.
```
./ffmpeg -re -i ../01-00.20.44.241.flv -acodec aac -ar 16000 -ac 1 -vcodec copy -f flv rtmp://192.168.142.100:1935/live/livestream
```
In addition, when I play the recorded video with VLC or Thunder, it is okay. The video recorded with DVR is 27MB and cannot be uploaded. Is there any other way to transfer it to you? Can you check if it works on your end?
I am using the arm64 platform, and both SRS and FFmpeg have been recompiled. However, as far as I understand, RTC uses SRS for internal AAC decoding and then converts it to Opus. FFmpeg seems to only copy the bitstream directly without encoding or decoding it.
Compilation command for SRS:
```
./configure --cross-build \
--cc=aarch64-linux-gnu-gcc --cxx=aarch64-linux-gnu-g++ \
--ar=aarch64-linux-gnu-ar --ld=aarch64-linux-gnu-ld \
--randlib=aarch64-linux-gnu-randlib
```
FFmpeg compilation command:
```
PKG_CONFIG_PATH=/disk2/nxp/build_def/lib/pkgconfig ./configure \
--prefix=. \
--enable-cross-compile \
--cross-prefix=aarch64-linux-gnu- \
--arch=arm64 \
--target-os=linux \
--pkg-config-flags="--static" \
--pkg-config=pkg-config \
--pkgconfigdir="/disk2/nxp/build_def" \
--shlibdir=lib \
--extra-cflags="-I/disk2/nxp/build_def/include" \
--extra-ldflags="-L/disk2/nxp/build_def/lib" \
--extra-libs="-lpthread -lm" \
--enable-static \
--enable-pic \
--disable-doc \
--enable-gpl \
--enable-nonfree \
--enable-hardcoded-tables \
--enable-openssl \
--enable-libaom \
--enable-libfdk-aac \
--enable-libopus \
--enable-libsvtav1 \
--enable-libdav1d \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-libvmaf
```
`TRANS_BY_GPT3`
|
If there is noise when directly pushing RTMP for the original stream, then it has nothing to do with RTC. The troubleshooting direction should be to directly record the original stream and take a look.
|
No, the experiment I mentioned above refers to re-streaming the captured DVR file. When playing the RTMP stream using VLC or SRS Player, both the audio and video are normal. However, when using RTC Player, there is a problem with the audio. It cannot be heard at all and it feels like there is noise due to mismatched sampling frequencies.
…------------------ Original Email ------------------
Sender: "ossrs/srs" ***@***.***;
Sent: December 27, 2021 (Monday) at 11:18 AM
***@***.***>;
***@***.******@***.***>;
Subject: Re: [ossrs/srs] RTSP2RTMP2RTC: RTMP and DVR audio are normal, RTC audio has noise (Issue #2810)
If there is noise when directly pushing the original stream to RTMP playback, then it is not related to RTC.
The troubleshooting direction should be to directly record the original stream and take a look.
—' translates to '—' in English.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: ***@***.***>
`TRANS_BY_GPT3`
|
In addition, I would like to add that I am also streaming other movie videos (h264+aac) separately, and the phenomenon is the same (rtmp is okay, rtc audio is not okay). The rtsp streams are from Hikvision and Dahua, and their aac audio is mono with a sampling rate of 16000Hz.
|
@2653248604 Can you provide a download link or a cloud storage link so that I can test your file first and see if it performs the same on a Mac?
|
https://pan.baidu.com/s/1PHyEe2_4iD0JtFbzV_irDQ
Extraction code: bac9
…------------------ Original Email ------------------
Sender: "ossrs/srs" ***@***.***>;
Sent: January 4, 2022 (Tuesday) 9:51 PM
***@***.***>;
***@***.******@***.***>;
Subject: Re: [ossrs/srs] RTSP2RTMP2RTC: RTMP and DVR have normal sound, RTC has noise (Issue #2810)
@2653248604 Can you provide a download link or something like a cloud storage, so that I can test your file first and see if it performs the same on Mac?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: ***@***.***>
`TRANS_BY_GPT3`
|
It seems like a real problem has been encountered, hahaha.
|
Description
Replay
How to replay bug?
./objs/srs -c rtmp2rtc.conf
2.
ffmpeg streaming command: ffmpeg -rtsp_transport tcp -i "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -c copy -f flv -r 25 rtmp://192.168.142.100:1935/live/livestream
Logs:
ffmpeg version N-104861-g7fe5c7f02d Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --prefix=. --enable-cross-compile --cross-prefix=aarch64-linux-gnu- --arch=arm64 --target-os=linux --pkg-config-flags=--static --pkg-config=pkg-config --pkgconfigdir=/disk2/nxp/build_def --shlibdir=lib --extra-cflags=-I/disk2/nxp/build_def/include --extra-ldflags=-L/disk2/nxp/build_def/lib --extra-libs='-lpthread -lm' --enable-static --enable-pic --disable-doc --enable-gpl --enable-nonfree --enable-hardcoded-tables --enable-openssl --enable-libaom --enable-libfdk-aac --enable-libopus --enable-libsvtav1 --enable-libdav1d --enable-libvpx --enable-libx264 --enable-libx265
libavutil 57. 11.100 / 57. 11.100
libavcodec 59. 14.100 / 59. 14.100
libavformat 59. 10.100 / 59. 10.100
libavdevice 59. 0.101 / 59. 0.101
libavfilter 8. 20.100 / 8. 20.100
libswscale 6. 1.101 / 6. 1.101
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
Input #0, rtsp, from 'rtsp://admin:[email protected]:554/Streaming/Channels/101':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 2560x1440, 25 fps, 25 tbr, 90k tbn
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
Output #0, flv, to 'rtmp://192.168.142.100:1935/live/livestream/2':
Metadata:
title : Media Presentation
encoder : Lavf59.10.100
Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuvj420p(pc, bt709, progressive), 2560x1440, q=2-31, 25 fps, 25 tbr, 1k tbn
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 16000 Hz, mono, fltp
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[flv @ 0xaaab02445ac0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[flv @ 0xaaab02445ac0] Failed to update header with correct duration.972.9kbits/s speed=1.08x
[flv @ 0xaaab02445ac0] Failed to update header with correct filesize.
frame= 444 fps= 27 q=-1.0 Lsize= 17304kB time=00:00:17.78 bitrate=7971.0kbits/s speed=1.07x
video:17230kB audio:60kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.079371%
3.
Access the browser at http://192.168.142.100:8080/players/rtc_player.html?autostart=true
Expected behavior (Expect)
> Describe your expectation (Please describe your expectation)
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: