ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.32k stars 5.33k forks source link

DVR: MP4 doesn't support asc change #3552

Closed mz342501 closed 1 year ago

mz342501 commented 1 year ago

dvr function can store temporary video files when using software streaming, and can generate recordings when finished. However, when using another device for streaming, there is a problem encountered while processing the audio.

  1. SRS Version: 4.0

  2. SRS Log:

[2023-05-25 16:26:24.147][Warn][2326][c07m1m19][11] dvr: ignore audio error code=3086 : write audio : encode audio : write sample : doesn't support asc change
thread [2326][c07m1m19]: on_audio() [src/app/srs_app_dvr.cpp:634][errno=11]
thread [2326][c07m1m19]: write_audio() [src/app/srs_app_dvr.cpp:128][errno=11]
thread [2326][c07m1m19]: encode_audio() [src/app/srs_app_dvr.cpp:477][errno=11]
thread [2326][c07m1m19]: copy_sequence_header() [src/kernel/srs_kernel_mp4.cpp:6050][errno=11]
  1. SRS Config:
    dvr {
        enabled      on;
        dvr_apply       all;
        dvr_path     ./objs/nginx/html/[app]/[stream].[timestamp].mp4;
        dvr_plan     session;
    }

I have been troubled for a long time, hoping for a divine answer. Thank you very much.

TRANS_BY_GPT3

winlinvip commented 1 year ago

The error message doesn't support asc change is quite clear. The ASC refers to SPS/PPS, which are codec metadata or parameters. MP4 format does not support changes in ASC.

To resolve this issue, you can either adjust your encoder to prevent ASC changes and continue using the MP4 format, or switch to using the FLV format for DVR, which supports ASC changes.

winlinvip commented 1 year ago

The error message 'doesn't support asc change' is very clear. ASC refers to SPS/PPS, which are the metadata or parameters of the codec. MP4 format does not support changes to ASC.

To resolve this issue, you can adjust the encoder to prevent ASC changes and continue using the MP4 format, or switch to using the FLV format that supports ASC changes for DVR.

TRANS_BY_GPT3