Skip to content

Have trouble streaming the video with sound. #9251

@Henry-23

Description

@Henry-23

Describe the bug

Hi, thanks for this great work. I was trying to use the new video real-time streaming output feature that is enabled by this (currently under the 5.0-dev branch).

I want to know whether it supports streaming of videos with sound? I wrote the code and yielded several videos with sound, but gradio can only play the first video. Subsequent videos cannot be played on the web page, and the progress bar cannot be dragged backward. After I downloaded the ts video to the local computer, I found that the video is complete. Is this a problem that the gradio front-end does not support it? Or is it a problem with my video encoding? The ffmpeg command I used is shown below.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

    ffmpeg_command = [
        'ffmpeg',
        '-framerate', str(fps),
        '-i', str(image_folder / '%08d.png'),
        '-i', audio_path,
        '-c:v', 'libx264',     
        '-c:a', 'aac',          
        '-strict', 'experimental',
        '-shortest',
        '-f', 'mpegts',         
        output_file
    ]

Screenshot

No response

Logs

No response

System Info

pip install with: https://gradio-builds.s3.amazonaws.com/bed454c3d22cfacedc047eb3b0ba987b485ac3fd/gradio-4.40.0-py3-none-any.whl

Severity

Blocking usage of gradio

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions