Skip to content
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

h265 with flag LongTermRefPicsPresentFlag cannot play #1441

Closed
1 of 13 tasks
lywbh opened this issue Feb 3, 2023 · 7 comments · Fixed by bluenviron/gortsplib#197
Closed
1 of 13 tasks

h265 with flag LongTermRefPicsPresentFlag cannot play #1441

lywbh opened this issue Feb 3, 2023 · 7 comments · Fixed by bluenviron/gortsplib#197
Labels
bug Something isn't working hls

Comments

@lywbh
Copy link

lywbh commented Feb 3, 2023

Which version are you using?

v0.21.2

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

Description

Describe how to replicate the issue

  1. start the server
  2. publish with config:
    paths:
    dz9Gjp6:
    rtsp://somewhere_h265
  3. read with vlc:
    http://127.0.0.1:8888/dz9Gjp6

Did you attach the server logs?

2023/02/03 18:46:29 INF [HLS] [muxer dz9Gjp6] created (requested by 192.168.60.25)
2023/02/03 18:46:29 INF [HLS] [muxer dz9Gjp6] is converting into HLS, 1 track (H265)
2023/02/03 18:46:30 INF [HLS] [muxer dz9Gjp6] destroyed (muxer error: unable to extract DTS: invalid SPS: LongTermRefPicsPresentFlag not supported yet)

Did you attach a network dump?

no

@aler9
Copy link
Member

aler9 commented Feb 5, 2023

Hello, this issue may be solved if you provide a sample H265 file that triggers the error.

@aler9 aler9 added bug Something isn't working hls labels Feb 5, 2023
@sureone
Copy link

sureone commented Feb 17, 2023

Also have the same issue, please help to fix, thanks!
sample h265 fragement mp4

@sureone
Copy link

sureone commented Feb 20, 2023

@lywbh , make changes like below in the file "gortsplib:sps.go" seems bypass this issue,
"./sps.go" line 791 of 856
if s.LongTermRefPicsPresentFlag {
fmt.Println("LongTermRefPicsPresentFlag not supported yet")
// return fmt.Errorf("LongTermRefPicsPresentFlag not supported yet")
}

@raypanggh
Copy link

raypanggh commented Mar 7, 2023

@lywbh , make changes like below in the file "gortsplib:sps.go" seems bypass this issue, "./sps.go" line 791 of 856 if s.LongTermRefPicsPresentFlag { fmt.Println("LongTermRefPicsPresentFlag not supported yet") // return fmt.Errorf("LongTermRefPicsPresentFlag not supported yet") }

This works, but when I build it on Windows, using the "windows" build tag, the runOnDemand function seems broken. It just exits with code 0. Any ideas what I'm doing wrong?

Edit: never mind. New version of Go requires .\ ahead of the executable, so I had to change ffmpeg.exe to .\ffmpeg.exe (double \ to escape the ).

@aler9
Copy link
Member

aler9 commented Mar 9, 2023

Thanks @sureone for providing the sample file. This issue is fixed by bluenviron/gortsplib#197

@aler9
Copy link
Member

aler9 commented Mar 12, 2023

added in v0.21.6

@github-actions
Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working hls
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants