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

Transcode: Support video codec such as h264_qsv and libx265. v6.0.145 #4127

Merged
merged 5 commits into from
Jul 27, 2024
Merged

Transcode: Support video codec such as h264_qsv and libx265. v6.0.145 #4127

merged 5 commits into from
Jul 27, 2024

Conversation

jb-alvarado
Copy link
Contributor

@jb-alvarado jb-alvarado commented Jul 24, 2024

Currently only libx264 ffmpeg encoder is supported. This pull request add also h264_qsv. But maybe a more generic solution with oder encoders would be useful to.

@winlinvip
Copy link
Member

I think it's also reasonable to support libx265?

@winlinvip winlinvip changed the title Support h264_qsv Transcode: Support video codec such as h264_qsv Jul 25, 2024
@jb-alvarado
Copy link
Contributor Author

Sure! And there is also VP8/9 and AV1. But I ask my self is it really necessary to limit the codec? What if someone only wants to record the stream to disk with a different codec, or stream something exotic over UDP?

The other question to is, is the check of vprofile.empty() and vpreset.empty() needed? When a codec supports this, and the setting is not present then it uses a default.

But I'm following your lead here.

@winlinvip
Copy link
Member

The transcoding feature is a subset of FFmpeg, limited to protocols supported by RTMP, so there's no need to support VP8/VP9/AV1 at the moment.

Supporting all codecs and parameters that FFmpeg supports would make it very complex and difficult to use, so it would be better to use FFmpeg directly.

As for profile and preset, I recommend making them mandatory to specify. If not specified, there will still be a default value, which might result in low video quality, and users might not notice this parameter. By making it mandatory, it will be easier for users to know how to adjust it.

@winlinvip winlinvip changed the title Transcode: Support video codec such as h264_qsv Transcode: Support video codec such as h264_qsv and h265 Jul 25, 2024
@winlinvip winlinvip changed the title Transcode: Support video codec such as h264_qsv and h265 Transcode: Support video codec such as h264_qsv and libx265 Jul 25, 2024
@jb-alvarado
Copy link
Contributor Author

The transcoding feature is a subset of FFmpeg, limited to protocols supported by RTMP, so there's no need to support VP8/VP9/AV1 at the moment.

There is work on supporting this other codec too, But yeah maybe is not widely supported.

Is fine, then I just also add x265.

@winlinvip winlinvip changed the title Transcode: Support video codec such as h264_qsv and libx265 Transcode: Support video codec such as h264_qsv and libx265. v6.0.145 Jul 27, 2024
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Jul 27, 2024
@winlinvip
Copy link
Member

Yep, I know enhanced RTMP has AV1 and Opus support, but SRS doesn't support them right now. We will add other codecs in future.

Thank you for your work. :)

@winlinvip winlinvip merged commit 331ef9f into ossrs:develop Jul 27, 2024
17 checks passed
@pannal
Copy link

pannal commented Nov 19, 2024

Any plans on when you'll add other codecs to RTMP/MPEG-FLV/TS? It'd be awesome if SRS could support those. Especially with many newer GPUs and iGPUs supporting encoding to AV1 natively.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RefinedByAI Refined by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants