arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.29k stars 579 forks source link

How do I use ffmpegkit in my React Native project to get a video stream and give it to my control to output #925

Closed PigeonMuyz closed 5 months ago

PigeonMuyz commented 7 months ago

As the title says, I didn't find stream-related information in FFmpegKit

PigeonMuyz commented 7 months ago
FFmpegKit.executeAsync(ffmpegCommand).then(async (session) => {
            const state = FFmpegKitConfig.sessionStateToString(await session.getState());
            const returnCode = await session.getReturnCode();
            const failStackTrace = await session.getFailStackTrace();
            const output = await session.getOutput();
            console.log(output);
            ffprint(`FFmpeg process exited with state ${state} and rc ${returnCode}.${notNull(failStackTrace, "\\n")}`);

            this.appendOutput(output);

            if (state === SessionState.FAILED || !returnCode.isValueSuccess()) {
                ffprint("Command failed. Please check output for the details.");
            }
        });

use the command:

        -i "https://open.ys7.com/v3/openlive/BA.m3u8" -c:v copy -bsf:v h264_mp4toannexb -f mpegts -

console output:

image
github-actions[bot] commented 5 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 5 months ago

This issue was closed because it has been stalled for 7 days with no activity.