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

GB28181: Dahua/Hikvision cameras, when streaming to SRS without enabling audio, using ffplay m3u8, encounter Stream #0:0: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp. #2570

Closed
geiliwanghaichao opened this issue Sep 1, 2021 · 3 comments
Assignees
Labels
GB28181 For GB28181. TransByAI Translated by AI/GPT.
Milestone

Comments

@geiliwanghaichao
Copy link

geiliwanghaichao commented Sep 1, 2021

Migrate to ossrs/srs-gb28181#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

@winlinvip winlinvip added the GB28181 For GB28181. label Sep 1, 2021
@winlinvip winlinvip added this to the 4.0 milestone Sep 1, 2021
@winlinvip winlinvip changed the title 大华/海康相机在没有使能音频的情况下,推流到srs后,使用ffplay m3u8, 出现Stream #0:0: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp GB28181: 大华/海康相机在没有使能音频的情况下,推流到srs后,使用ffplay m3u8, 出现Stream #0:0: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp Sep 1, 2021
@geiliwanghaichao
Copy link
Author

geiliwanghaichao commented Sep 6, 2021

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:
image

Comment out the above two lines of code to remove the display of the audio channel when playing the m3u8 file using ffplay.
167a18b08bbe25faac8f59e1ec85d10
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

@winlinvip winlinvip modified the milestones: 4.0, 5.0 Oct 7, 2021
@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented Nov 4, 2021

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

qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 16, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 17, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 17, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 18, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 22, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 22, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 24, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 24, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 24, 2021
qichaoshen82 pushed a commit to qichaoshen82/srs that referenced this issue Nov 25, 2021
@winlinvip
Copy link
Member

winlinvip commented Jan 5, 2022

Migrate to ossrs/srs-gb28181#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

@winlinvip winlinvip changed the title GB28181: 大华/海康相机在没有使能音频的情况下,推流到srs后,使用ffplay m3u8, 出现Stream #0:0: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp GB28181: Dahua/Hikvision cameras, when streaming to SRS without enabling audio, using ffplay m3u8, encounter Stream #0:0: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GB28181 For GB28181. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants