mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Transcode: More generic h264/h265 codec support. v7.0.1 (#4131)
Sorry this is another pull request with same intention. But there is more variants of h264 und h265 codecs and I think it is good to support them all. --------- Co-authored-by: winlin <winlinvip@gmail.com>
This commit is contained in:
parent
7478311547
commit
2e211f6abe
3 changed files with 13 additions and 9 deletions
|
@ -4,6 +4,12 @@
|
|||
|
||||
The changelog for SRS.
|
||||
|
||||
<a name="v7-changes"></a>
|
||||
|
||||
## SRS 7.0 Changelog
|
||||
* v7.0, 2024-08-12, Merge [#4131](https://github.com/ossrs/srs/pull/4131): Transcode: More generic h264/h265 codec support. v7.0.1 (#4131)
|
||||
* v7.0, 2024-08-12, Init SRS 7 branch. v7.0.0
|
||||
|
||||
<a name="v6-changes"></a>
|
||||
|
||||
## SRS 6.0 Changelog
|
||||
|
|
|
@ -33,10 +33,10 @@ using namespace std;
|
|||
#define SRS_RTMP_ENCODER_COPY "copy"
|
||||
#define SRS_RTMP_ENCODER_NO_VIDEO "vn"
|
||||
#define SRS_RTMP_ENCODER_NO_AUDIO "an"
|
||||
// only support libx264, libx265 and h264_qsv encoder.
|
||||
#define SRS_RTMP_ENCODER_VCODEC_LIBX264 "libx264"
|
||||
#define SRS_RTMP_ENCODER_VCODEC_LIBX265 "libx265"
|
||||
#define SRS_RTMP_ENCODER_VCODEC_H264QSV "h264_qsv"
|
||||
// only support encoder: h264, h265 and other variants like libx264 etc.
|
||||
#define SRS_RTMP_ENCODER_VCODEC_H264 "264"
|
||||
#define SRS_RTMP_ENCODER_VCODEC_H265 "265"
|
||||
#define SRS_RTMP_ENCODER_VCODEC_HEVC "hevc"
|
||||
#define SRS_RTMP_ENCODER_VCODEC_PNG "png"
|
||||
// any aac encoder is ok which contains the aac,
|
||||
// for example, libaacplus, aac, fdkaac
|
||||
|
@ -125,10 +125,8 @@ srs_error_t SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
|
|||
}
|
||||
|
||||
if (vcodec != SRS_RTMP_ENCODER_COPY && vcodec != SRS_RTMP_ENCODER_NO_VIDEO && vcodec != SRS_RTMP_ENCODER_VCODEC_PNG) {
|
||||
if (vcodec != SRS_RTMP_ENCODER_VCODEC_LIBX264 && vcodec != SRS_RTMP_ENCODER_VCODEC_LIBX265 && vcodec != SRS_RTMP_ENCODER_VCODEC_H264QSV) {
|
||||
return srs_error_new(
|
||||
ERROR_ENCODER_VCODEC, "invalid vcodec, must be %s, %s or %s, actual %s",
|
||||
SRS_RTMP_ENCODER_VCODEC_LIBX264, SRS_RTMP_ENCODER_VCODEC_LIBX265, SRS_RTMP_ENCODER_VCODEC_H264QSV, vcodec.c_str());
|
||||
if (vcodec.find(SRS_RTMP_ENCODER_VCODEC_H264) != string::npos && vcodec.find(SRS_RTMP_ENCODER_VCODEC_H265) != string::npos && vcodec.find(SRS_RTMP_ENCODER_VCODEC_HEVC) != string::npos) {
|
||||
return srs_error_new(ERROR_ENCODER_VCODEC, "invalid vcodec, must be h264, h265 or one of their variants, actual %s", vcodec.c_str());
|
||||
}
|
||||
if (vbitrate < 0) {
|
||||
return srs_error_new(ERROR_ENCODER_VBITRATE, "invalid vbitrate: %d", vbitrate);
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 7
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 0
|
||||
#define VERSION_REVISION 1
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue