sotavideo.ai

An Elixir library providing convenient access to the sotavideo.ai platform for video analysis and processing. Simplifies integration with your Elixir applications.

Installation

Add sotavideo_ai to your list of dependencies in mix.exs: elixir def deps do [

{:sotavideo_ai, "~> 0.1.0"} # Replace with the actual version

] end

Then, run: bash mix deps.get

Usage

Before using the library, configure it with your API key: elixir config :sotavideo_ai, api_key: "YOUR_API_KEY"

Example 1: Analyzing a video for key events elixir alias SotavideoAI

video_url = "https://example.com/video.mp4"

case SotavideoAI.analyze_video(video_url) do {:ok, analysis_result} ->

IO.inspect(analysis_result)

->

IO.puts("Error analyzing video: #{reason}")

end

Example 2: Extracting thumbnails from a video elixir alias SotavideoAI

video_url = "https://example.com/video.mp4"

case SotavideoAI.extract_thumbnails(video_url, count: 5) do {:ok, thumbnail_urls} ->

Enum.each(thumbnail_urls, &IO.puts("Thumbnail URL: #{&1}"))

->

IO.puts("Error extracting thumbnails: #{reason}")

end

Example 3: Detecting objects in a video frame elixir alias SotavideoAI

video_url = "https://example.com/video.mp4" frame_timestamp = 10 # seconds

case SotavideoAI.detect_objects(video_url, frame_timestamp) do {:ok, objects} ->

Enum.each(objects, fn object ->
  IO.puts("Object: #{object.label}, Confidence: #{object.confidence}")
end)

->

IO.puts("Error detecting objects: #{reason}")

end

Example 4: Using pipes for sequential video processing elixir alias SotavideoAI

video_url = "https://example.com/video.mp4"

video_url |> SotavideoAI.analyze_video() |> case do {:ok, analysis_result} ->

# Further processing of analysis_result
IO.inspect(analysis_result)

->

IO.puts("Error analyzing video: #{reason}")

end

Example 5: Transcribing audio from a video elixir alias SotavideoAI

video_url = "https://example.com/video.mp4"

case SotavideoAI.transcribe_audio(video_url) do {:ok, transcription} ->

IO.puts("Transcription: #{transcription}")

->

IO.puts("Error transcribing audio: #{reason}")

end

Features

License

MIT

This package is part of the sotavideo.ai ecosystem. For advanced features and enterprise-grade tools, visit: https://sotavideo.ai/