Closed geiliwanghaichao closed 2 years ago
According to the method in reference #1326, modify the code in the function SrsTsPacket* SrsTsPacket::create_pmt(SrsTsContext* context, int16_t pmt_number, int16_t pmt_pid, int16_t vpid, SrsTsStream vs, int16_t apid, SrsTsStream as)
of the srs_kernel_ts.cpp
file as follows:
Comment out the above two lines of code to remove the display of the audio channel when playing the m3u8 file using ffplay. However, it is currently unclear what impact this framework has. I don't know if @winlinvip has confirmed this issue or if there is a fundamental solution to this problem.
TRANS_BY_GPT3
After looking at the code, the encoding format for HLS is specified in the configuration file as hls_acodec/hls_vcodec
. This means that the encoding format needs to be determined before the program starts. If there is no audio, you can make the following settings.
vhost __defaultVhost__ {
hls {
enabled on;
hls_fragment 10;
hls_window 60;
hls_path ./objs/nginx/html;
hls_m3u8_file [app]/[stream].m3u8;
hls_ts_file [app]/[stream]-[seq].ts;
hls_acodec an;
}
}
I'm not sure if this will meet your requirements.
If you want to automatically determine the encoding format, it is necessary to reorganize the code and see if it is necessary.
PS: Also, let me mention that your way of making changes definitely won't work. If you comment out those two lines of code and then re-enable the audio, it will crash.
TRANS_BY_GPT3
Migrate to https://github.com/ossrs/srs-gb28181/issues/14
GB has been moved to a separate repository srs-gb28181, please refer to #2845. For any issues, please submit them to the GB repository bug, or pr. Make sure to maintain the markdown structure.
TRANS_BY_GPT3
Migrate to https://github.com/ossrs/srs-gb28181/issues/14
GB has been moved to a separate repository srs-gb28181, please refer to #2845. For any issues, please submit them to the GB repository bug, or pr.' Make sure to maintain the markdown structure.
TRANS_BY_GPT3