ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.

Home Page:https://ossrs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with default value of transcoding resolution

winlinvip opened this issue · comments

If vwidth and vheight are not filled in during transcoding, the resolution parameters should be ignored and transcoding should be done according to the original resolution.

TRANS_BY_GPT3

            vbitrate        0;
            vfps            0;
            vwidth          0;
            vheight         0;
            abitrate        0;
            asample_rate    0;
            achannels       0;

When these few parameters are set to 0 (or not supported, as the default is 0), the original video parameters are used, following the source's configuration.

TRANS_BY_GPT3

After supporting the follow-up source, the simplest configuration for transcoding can be written as follows:

    transcode {
        enabled     on;
        ffmpeg      ./objs/ffmpeg/bin/ffmpeg;
        engine ff {
            enabled         on;
            vcodec          libx264;
            vprofile        main;
            vpreset         medium;
            acodec          libfdk_aac;
            output          rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
        }
    }

TRANS_BY_GPT3