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.52k stars 603 forks source link

is ffmpeg-kit-react-native the only way to extract audio from a video in EXPO? I cannot make it work 😭 #1019

Closed naticio closed 1 month ago

naticio commented 3 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Platform Is this a general feature for all platforms or a platform specific feature?

Additional context Add any other context or screenshots about the feature request here.

Rolstenhouse commented 3 months ago

Can you please include more context or a code snippet?

You might have to use the npx expo run:ios command, which builds a local iOS directory

here's a snippet from my project I'm running

FFmpegKit.execute(
        `-i ${videoUri} -vn -y -acodec pcm_s16le -ar 16000 -ac 1 ${audioFilePath}`
      ).then(async (session) => {
        const returnCode = await session.getReturnCode();

        if (ReturnCode.isSuccess(returnCode)) {
          // Audio extraction was successful
          Alert.alert("Audio Result", "audio file successful");
          return await handleTranscription(audioFilePath);
        } else if (ReturnCode.isCancel(returnCode)) {
          Alert.alert(
            "Audio Cancelled",
            "The Audio was cancelled."
          );
        } else {
          Alert.alert("Error", "Failed to extract audio from the video.");
        }
      });
github-actions[bot] commented 1 month 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 1 month ago

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