shaka-project / shaka-streamer

A simple config-file based approach to preparing streaming media, based on FFmpeg and Shaka Packager.
https://shaka-project.github.io/shaka-streamer/
Apache License 2.0
199 stars 62 forks source link

No audio output #64

Closed ShaoWeiguo closed 3 years ago

ShaoWeiguo commented 3 years ago

I have a try with shaka-streamer, but no audio output, video is fine.

shaka-streamer version: 501604b, Ubuntu 20.04 python3 shaka-stream -i config_files/input_looped_file_config.yaml -p config_files/pipeline_live_config.yaml -o output_files.

Any suggestion?

joeyparrish commented 3 years ago

This appears to be a bug caused by 84047d37aeb3fb5f59eb5af1f790f9e0e4358df2, as part of the addition of AV1. We made some mistakes in the FFmpeg command.

I have a fix for that in code review now, but it doesn't affect our most recent release version, v0.3.0. If you use that tag or install Shaka Streamer with pip, you should not run into this issue.

When the fix is out, you'll see an update to this issue, and the fix will appear in v0.4.0 after that.

Thanks!

ShaoWeiguo commented 3 years ago

@joeyparrish Thanks for the quick feedback.

Could you give more information about "We made some mistakes in the FFmpeg command."? What's the correct command? Or is it the limitation from FFmpeg?

BR, Weiguo

joeyparrish commented 3 years ago

The commands work correctly for regular files, but with named pipes, some weird things start to happen.

The +faststart flag in -movflags turned out to be voodoo, and had no effect, so I intend to remove it.

We thought the +frag_keyframe flag was enough to get a new fragment at each keyframe, but that doesn't work correctly for audio. And that makes some kind of sense, since audio doesn't have keyframes per se.

To supplement +frag_keyframe, I intend to add -frag_duration, which affects both audio and video.

Before 84047d37aeb3fb5f59eb5af1f790f9e0e4358df2, we used TS in the pipe, so fragments weren't an issue. Now that we put MP4 in the pipes, getting the pipe's data to be fragmented MP4 is critical.

ShaoWeiguo commented 3 years ago

@joeyparrish Cool, thanks for the information.