Skip to content

[Bug] DVR mp4 recording failure for H.265 streams #4603

@suzp1984

Description

@suzp1984

Describe the bug
DVR not works for H.265 streams.

Version
develop branch (6.0release branch has same problem)

To Reproduce
Steps to reproduce the behavior:

  1. checkout to develop branch, and compile the project
  2. ./objs/srs -c conf/dvr.mp4.conf
  3. ffmpeg -stream_loop 0 -re -i doc/source.flv -c:v libx265 -preset medium -crf 23 -acodec copy -f flv rtmp://localhost/live/mp
    or ffmpeg -stream_loop 0 -re -i doc/source.flv -vcodec hevc -acodec copy -f flv rtmp://localhost/live/mp
  4. See error log output:

[2025-12-05 01:03:10.585][WARN][44814][uw88b265][35] dvr: ignore video error code=3100(Mp4HvcCChange)(MP4 does not support video HvcC change) : write video : encode video : write sample : doesn't support hvcC change
thread [44814][uw88b265]: on_video() [./src/app/srs_app_dvr.cpp:687][errno=35]
thread [44814][uw88b265]: write_video() [./src/app/srs_app_dvr.cpp:176][errno=35]
thread [44814][uw88b265]: encode_video() [./src/app/srs_app_dvr.cpp:517][errno=35]
thread [44814][uw88b265]: copy_sequence_header() [./src/kernel/srs_kernel_mp4.cpp:6943][errno=35]
[2025-12-05 01:03:10.585][WARN][44814][uw88b265][35] ignore dvr segment close failed. ret=3076

Expected behavior
The DVR mp4 with h.265 data can generated successfully.

Metadata

Metadata

Assignees

Labels

EnglishNativeThis issue is conveyed exclusively in English.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions