Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

separate cap-editor crate

Brendan Allan70919c9fe7c9
diff --git a/Cargo.lock b/Cargo.lock
index e74acab9f..589c891e8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -386,13 +386,13 @@ dependencies = [
[[package]]
name = "axum"
-version = "0.7.5"
+version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf"
+checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae"
dependencies = [
"async-trait",
"axum-core",
- "base64 0.21.7",
+ "base64 0.22.1",
"bytes",
"futures-util",
"http",
@@ -415,7 +415,7 @@ dependencies = [
"sync_wrapper 1.0.1",
"tokio",
"tokio-tungstenite",
- "tower",
+ "tower 0.5.1",
"tower-layer",
"tower-service",
"tracing",
@@ -423,9 +423,9 @@ dependencies = [
[[package]]
name = "axum-core"
-version = "0.4.3"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3"
+checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
dependencies = [
"async-trait",
"bytes",
@@ -436,7 +436,7 @@ dependencies = [
"mime",
"pin-project-lite",
"rustversion",
- "sync_wrapper 0.1.2",
+ "sync_wrapper 1.0.1",
"tower-layer",
"tower-service",
"tracing",
@@ -677,6 +677,23 @@ dependencies = [
"serde",
]
+[[package]]
+name = "cap-editor"
+version = "0.1.0"
+dependencies = [
+ "axum",
+ "cap-ffmpeg",
+ "cap-project",
+ "cap-rendering",
+ "cpal",
+ "ffmpeg-next",
+ "serde",
+ "serde_json",
+ "specta",
+ "tokio",
+ "tracing",
+]
+
[[package]]
name = "cap-ffmpeg"
version = "0.1.0"
@@ -1436,6 +1453,7 @@ dependencies = [
"anyhow",
"axum",
"bytemuck",
+ "cap-editor",
"cap-ffmpeg",
"cap-project",
"cap-rendering",
@@ -2772,7 +2790,7 @@ dependencies = [
"pin-project-lite",
"socket2",
"tokio",
- "tower",
+ "tower 0.4.13",
"tower-service",
"tracing",
]
@@ -5368,9 +5386,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.127"
+version = "1.0.128"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
+checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
dependencies = [
"itoa 1.0.11",
"memchr",
@@ -6644,9 +6662,9 @@ dependencies = [
[[package]]
name = "tokio-tungstenite"
-version = "0.21.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38"
+checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
dependencies = [
"futures-util",
"log",
@@ -6739,6 +6757,21 @@ dependencies = [
"tokio",
"tower-layer",
"tower-service",
+]
+
+[[package]]
+name = "tower"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project-lite",
+ "sync_wrapper 0.1.2",
+ "tokio",
+ "tower-layer",
+ "tower-service",
"tracing",
]
@@ -6844,9 +6877,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "tungstenite"
-version = "0.21.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1"
+checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a"
dependencies = [
"byteorder",
"bytes",
@@ -6857,7 +6890,6 @@ dependencies = [
"rand 0.8.5",
"sha1",
"thiserror",
- "url",
"utf-8",
]
diff --git a/Cargo.toml b/Cargo.toml
index fca993bba..6ab43810f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,8 +6,9 @@ members = [
"crates/ffmpeg",
"crates/utils",
"crates/project",
+ "crates/editor",
]
[workspace.dependencies]
-ffmpeg-next = { git = "https://github.com/CapSoftware/rust-ffmpeg", rev = "11f8d264bbc0" }
+ffmpeg = { package = "ffmpeg-next", git = "https://github.com/CapSoftware/rust-ffmpeg", rev = "11f8d264bbc0" }
tauri = { version = "2.0.0-rc" }
diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml
index 0fd59c9ed..8a92ecd66 100644
--- a/apps/desktop/src-tauri/Cargo.toml
+++ b/apps/desktop/src-tauri/Cargo.toml
@@ -63,7 +63,7 @@ cpal = "0.15.3"
indexmap = "2.5.0"
num-traits = "0.2.19"
tempfile = "3.12.0"
-ffmpeg-next.workspace = true
+ffmpeg.workspace = true
chrono = "0.4.38"
rodio = "0.19.0"
fast_image_resize = "4.2.1"
@@ -74,6 +74,7 @@ cap-utils = { path = "../../../crates/utils" }
cap-project = { path = "../../../crates/project" }
cap-rendering = { path = "../../../crates/rendering" }
cap-ffmpeg = { path = "../../../crates/ffmpeg" }
+cap-editor = { path = "../../../crates/editor" }
reqwest = { version = "0.12.7", features = ["json", "stream", "multipart"] }
dotenvy_macro = "0.15.7"
global-hotkey = "0.5.5"
diff --git a/apps/desktop/src-tauri/src/audio.rs b/apps/desktop/src-tauri/src/audio.rs
index a166a3934..fb8e70cb3 100644
--- a/apps/desktop/src-tauri/src/audio.rs
+++ b/apps/desktop/src-tauri/src/audio.rs
@@ -3,7 +3,7 @@ use cpal::{
traits::{DeviceTrait, HostTrait, StreamTrait},
Device, SampleFormat, SizedSample, Stream, StreamConfig, SupportedStreamConfig,
};
-use ffmpeg_next as ffmpeg;
+
use indexmap::IndexMap;
use num_traits::ToBytes;
use std::{fs::File, io::Write, path::PathBuf, sync::Arc, time::Instant};
diff --git a/apps/desktop/src-tauri/src/camera.rs b/apps/desktop/src-tauri/src/camera.rs
index a75e9e026..0fdc66ff8 100644
--- a/apps/desktop/src-tauri/src/camera.rs
+++ b/apps/desktop/src-tauri/src/camera.rs
@@ -1,4 +1,3 @@
-use ffmpeg_next as ffmpeg;
use serde::Serialize;
use specta::Type;
use std::{
diff --git a/apps/desktop/src-tauri/src/display.rs b/apps/desktop/src-tauri/src/display.rs
index 2ba231ddc..e928f21c2 100644
--- a/apps/desktop/src-tauri/src/display.rs
+++ b/apps/desktop/src-tauri/src/display.rs
@@ -1,4 +1,4 @@
-use ffmpeg_next::{format as avformat, frame::Video, software};
+use ffmpeg::{format as avformat, frame::Video, software};
use std::{
path::PathBuf,
time::{Instant, SystemTime},
diff --git a/apps/desktop/src-tauri/src/encoder.rs b/apps/desktop/src-tauri/src/encoder.rs
index a5e62b397..627b1a13c 100644
--- a/apps/desktop/src-tauri/src/encoder.rs
+++ b/apps/desktop/src-tauri/src/encoder.rs
@@ -1,6 +1,6 @@
use std::path::PathBuf;
-use ffmpeg_next::{self as ffmpeg, Dictionary};
+use ffmpeg::{self as ffmpeg, Dictionary};
macro_rules! dict {
( $($key:expr => $value:expr),* $(,)*) => ({
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
index b0a99d9f7..82fccb3c7 100644
--- a/apps/desktop/src-tauri/src/lib.rs
+++ b/apps/desktop/src-tauri/src/lib.rs
@@ -3,8 +3,6 @@ mod auth;
mod camera;
mod capture;
mod display;
-mod editor;
-mod editor_instance;
mod encoder;
mod flags;
mod general_settings;
@@ -12,8 +10,6 @@ mod hotkeys;
mod macos;
mod notifications;
mod permissions;
-mod playback;
-mod project_recordings;
mod recording;
mod tray;
mod upload;
@@ -21,7 +17,9 @@ mod web_api;
use audio::AppSounds;
use auth::AuthStore;
-use camera::{create_camera_window, find_camera_by_label, list_cameras, CameraFeed};
+use camera::{create_camera_window, list_cameras, CameraFeed};
+use cap_editor::{AudioData, EditorState, ProjectRecordings};
+use cap_editor::{EditorInstance, FRAMES_WS_PATH};
use cap_ffmpeg::FFmpeg;
use cap_project::{
ProjectConfiguration, RecordingMeta, SharingMeta, TimelineConfiguration, TimelineSegment,
@@ -29,14 +27,12 @@ use cap_project::{
use cap_rendering::ProjectUniforms;
use cap_utils::create_named_pipe;
use display::{list_capture_windows, Bounds, CaptureTarget, FPS};
-use editor_instance::{EditorInstance, EditorState, FRAMES_WS_PATH};
use general_settings::GeneralSettingsStore;
use image::{ImageBuffer, Rgba};
use mp4::Mp4Reader;
use num_traits::ToBytes;
use objc2_app_kit::NSScreenSaverWindowLevel;
use png::{ColorType, Encoder};
-use project_recordings::ProjectRecordings;
use recording::{DisplaySource, InProgressRecording};
use scap::capturer::Capturer;
use scap::frame::Frame;
@@ -46,8 +42,7 @@ use specta::Type;
use std::fs::File;
use std::io::BufWriter;
use std::io::{BufReader, Write};
-use std::sync::atomic::AtomicU16;
-use std::time::{Instant, SystemTime, UNIX_EPOCH};
+use std::time::{SystemTime, UNIX_EPOCH};
use std::{
collections::HashMap, marker::PhantomData, path::PathBuf, process::Command, sync::Arc,
time::Duration,
@@ -58,16 +53,13 @@ use tauri_plugin_decorum::WebviewWindowExt;
use tauri_plugin_notification::PermissionState;
use tauri_plugin_shell::ShellExt;
use tauri_specta::Event;
-use tokio::io::AsyncWriteExt;
-use tokio::sync::{mpsc, oneshot, watch};
+use tokio::sync::watch;
use tokio::task;
use tokio::{
sync::{Mutex, RwLock},
time::sleep,
};
-use upload::{
- upload_audio, upload_image, upload_individual_file, upload_video, UploadedAudio, UploadedVideo,
-};
+use upload::{upload_image, upload_individual_file, upload_video};
#[derive(specta::Type, Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase")]
@@ -951,13 +943,6 @@ impl EditorStateChanged {
}
}
-#[derive(Clone)]
-pub struct AudioData {
- pub buffer: Arc<Vec<f64>>,
- pub sample_rate: u32,
- // pub channels: u18
-}
-
#[tauri::command]
#[specta::specta]
async fn start_playback(app: AppHandle, video_id: String) {
diff --git a/apps/desktop/src-tauri/src/upload.rs b/apps/desktop/src-tauri/src/upload.rs
index 226669bd7..475cd8b8e 100644
--- a/apps/desktop/src-tauri/src/upload.rs
+++ b/apps/desktop/src-tauri/src/upload.rs
@@ -501,15 +501,15 @@ fn build_video_upload_body(
base: S3UploadBody,
) -> Result<S3VideoUploadBody, String> {
let input =
- ffmpeg_next::format::input(path).map_err(|e| format!("Failed to read input file: {e}"))?;
+ ffmpeg::format::input(path).map_err(|e| format!("Failed to read input file: {e}"))?;
let stream = input
.streams()
- .best(ffmpeg_next::media::Type::Video)
+ .best(ffmpeg::media::Type::Video)
.ok_or_else(|| "Failed to find appropriate video stream in file".to_string())?;
let duration_millis = input.duration() as f64 / 1000.;
- let codec = ffmpeg_next::codec::context::Context::from_parameters(stream.parameters())
+ let codec = ffmpeg::codec::context::Context::from_parameters(stream.parameters())
.map_err(|e| format!("Unable to read video codec information: {e}"))?;
let codec_name = codec.id();
let video = codec.decoder().video().unwrap();
@@ -536,15 +536,15 @@ fn build_audio_upload_body(
base: S3UploadBody,
) -> Result<S3AudioUploadBody, String> {
let input =
- ffmpeg_next::format::input(path).map_err(|e| format!("Failed to read input file: {e}"))?;
+ ffmpeg::format::input(path).map_err(|e| format!("Failed to read input file: {e}"))?;
let stream = input
.streams()
- .best(ffmpeg_next::media::Type::Audio)
+ .best(ffmpeg::media::Type::Audio)
.ok_or_else(|| "Failed to find appropriate audio stream in file".to_string())?;
let duration_millis = input.duration() as f64 / 1000.;
- let codec = ffmpeg_next::codec::context::Context::from_parameters(stream.parameters())
+ let codec = ffmpeg::codec::context::Context::from_parameters(stream.parameters())
.map_err(|e| format!("Unable to read audio codec information: {e}"))?;
let codec_name = codec.id();
diff --git a/apps/desktop/src/routes/(window-chrome)/index.tsx b/apps/desktop/src/routes/(window-chrome)/index.tsx
index 1050c8725..5ee3125e7 100644
--- a/apps/desktop/src/routes/(window-chrome)/index.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/index.tsx
@@ -391,14 +391,7 @@ export default function () {
: "bg-red-50 text-red-300"
)}
onPointerDown={(e) => {
- const permission = permissions?.data?.camera;
-
- if (
- permission !== "granted" &&
- permission !== "notNeeded"
- ) {
- e.stopPropagation();
- }
+ e.stopPropagation();
}}
onClick={(e) => {
e.stopPropagation();
diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml
new file mode 100644
index 000000000..58d647fe4
--- /dev/null
+++ b/crates/editor/Cargo.toml
@@ -0,0 +1,18 @@
+[package]
+name = "cap-editor"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+cap-project = { path = "../project" }
+cap-ffmpeg = { path = "../ffmpeg" }
+cap-rendering = { path = "../rendering" }
+
+tokio = { version = "1.39.2", features = ["macros", "process", "fs"] }
+tracing = "0.1.40"
+cpal = "0.15.3"
+serde_json = "1.0.128"
+axum = { version = "0.7.5", features = ["ws"] }
+ffmpeg.workspace = true
+specta = "=2.0.0-rc.19"
+serde = { version = "1", features = ["derive"] }
diff --git a/crates/editor/src/audio.rs b/crates/editor/src/audio.rs
new file mode 100644
index 000000000..1eb72a46e
--- /dev/null
+++ b/crates/editor/src/audio.rs
@@ -0,0 +1,8 @@
+use std::sync::Arc;
+
+#[derive(Clone)]
+pub struct AudioData {
+ pub buffer: Arc<Vec<f64>>,
+ pub sample_rate: u32,
+ // pub channels: u18
+}
diff --git a/apps/desktop/src-tauri/src/editor.rs b/crates/editor/src/editor.rs
similarity index 100%
rename from apps/desktop/src-tauri/src/editor.rs
rename to crates/editor/src/editor.rs
diff --git a/apps/desktop/src-tauri/src/editor_instance.rs b/crates/editor/src/editor_instance.rs
similarity index 99%
rename from apps/desktop/src-tauri/src/editor_instance.rs
rename to crates/editor/src/editor_instance.rs
index 91c848ea9..7fb1bfeb3 100644
--- a/apps/desktop/src-tauri/src/editor_instance.rs
+++ b/crates/editor/src/editor_instance.rs
@@ -1,7 +1,7 @@
-use crate::display::FPS;
+use crate::audio::AudioData;
+use crate::editor;
use crate::playback::{self, PlaybackHandle};
use crate::project_recordings::ProjectRecordings;
-use crate::{editor, AudioData};
use cap_ffmpeg::FFmpeg;
use cap_project::{ProjectConfiguration, RecordingMeta};
use cap_rendering::decoder::AsyncVideoDecoder;
@@ -9,15 +9,8 @@ use cap_rendering::{ProjectUniforms, RecordingDecoders, RenderOptions, RenderVid
use std::ops::Deref;
use std::{path::PathBuf, sync::Arc};
use tokio::sync::{mpsc, watch, Mutex};
-use tracing::instrument::WithSubscriber;
-type PreviewFrameInstruction = u32;
-
-pub struct EditorState {
- pub playhead_position: u32,
- pub playback_task: Option<PlaybackHandle>,
- pub preview_task: Option<tokio::task::JoinHandle<()>>,
-}
+const FPS: u32 = 30;
pub struct EditorInstance {
pub project_path: PathBuf,
@@ -260,16 +253,6 @@ impl EditorInstance {
}
}
-pub const FRAMES_WS_PATH: &str = "/frames-ws";
-
-pub enum SocketMessage {
- Frame {
- data: Vec<u8>,
- width: u32,
- height: u32,
- },
-}
-
async fn create_frames_ws(frame_rx: mpsc::UnboundedReceiver<SocketMessage>) -> u16 {
use axum::{
extract::{
@@ -335,3 +318,20 @@ async fn create_frames_ws(frame_rx: mpsc::UnboundedReceiver<SocketMessage>) -> u
port
}
+type PreviewFrameInstruction = u32;
+
+pub struct EditorState {
+ pub playhead_position: u32,
+ pub playback_task: Option<PlaybackHandle>,
+ pub preview_task: Option<tokio::task::JoinHandle<()>>,
+}
+
+pub const FRAMES_WS_PATH: &str = "/frames-ws";
+
+pub enum SocketMessage {
+ Frame {
+ data: Vec<u8>,
+ width: u32,
+ height: u32,
+ },
+}
diff --git a/crates/editor/src/lib.rs b/crates/editor/src/lib.rs
new file mode 100644
index 000000000..37c400383
--- /dev/null
+++ b/crates/editor/src/lib.rs
@@ -0,0 +1,9 @@
+mod audio;
+mod editor;
+mod editor_instance;
+mod playback;
+mod project_recordings;
+
+pub use audio::AudioData;
+pub use editor_instance::{EditorInstance, EditorState, FRAMES_WS_PATH};
+pub use project_recordings::ProjectRecordings;
diff --git a/apps/desktop/src-tauri/src/playback.rs b/crates/editor/src/playback.rs
similarity index 99%
rename from apps/desktop/src-tauri/src/playback.rs
rename to crates/editor/src/playback.rs
index 0ac9f9065..6edb782c1 100644
--- a/apps/desktop/src-tauri/src/playback.rs
+++ b/crates/editor/src/playback.rs
@@ -8,7 +8,7 @@ use cpal::{
};
use tokio::{sync::watch, time::Instant};
-use crate::{editor, project_recordings::ProjectRecordings, AudioData};
+use crate::{audio::AudioData, editor, project_recordings::ProjectRecordings};
pub struct Playback {
pub audio: Option<AudioData>,
diff --git a/apps/desktop/src-tauri/src/project_recordings.rs b/crates/editor/src/project_recordings.rs
similarity index 80%
rename from apps/desktop/src-tauri/src/project_recordings.rs
rename to crates/editor/src/project_recordings.rs
index 94be0688c..319d7cb18 100644
--- a/apps/desktop/src-tauri/src/project_recordings.rs
+++ b/crates/editor/src/project_recordings.rs
@@ -14,13 +14,10 @@ pub struct Video {
impl Video {
pub fn new(path: &PathBuf) -> Self {
- let input = ffmpeg_next::format::input(path).unwrap();
- let stream = input
- .streams()
- .best(ffmpeg_next::media::Type::Video)
- .unwrap();
+ let input = ffmpeg::format::input(path).unwrap();
+ let stream = input.streams().best(ffmpeg::media::Type::Video).unwrap();
- let video_decoder = ffmpeg_next::codec::Context::from_parameters(stream.parameters())
+ let video_decoder = ffmpeg::codec::Context::from_parameters(stream.parameters())
.unwrap()
.decoder()
.video()
@@ -46,13 +43,10 @@ pub struct Audio {
impl Audio {
pub fn new(path: &PathBuf) -> Self {
- let input = ffmpeg_next::format::input(path).unwrap();
- let stream = input
- .streams()
- .best(ffmpeg_next::media::Type::Audio)
- .unwrap();
+ let input = ffmpeg::format::input(path).unwrap();
+ let stream = input.streams().best(ffmpeg::media::Type::Audio).unwrap();
- let video_decoder = ffmpeg_next::codec::Context::from_parameters(stream.parameters())
+ let video_decoder = ffmpeg::codec::Context::from_parameters(stream.parameters())
.unwrap()
.decoder()
.audio()
diff --git a/crates/rendering/Cargo.toml b/crates/rendering/Cargo.toml
index 61116c678..1e4db5cbf 100644
--- a/crates/rendering/Cargo.toml
+++ b/crates/rendering/Cargo.toml
@@ -21,7 +21,7 @@ tokio = { version = "1.39.3", features = [
] }
nix = { version = "0.29.0", features = ["fs"] }
serde_json = "1.0.127"
-ffmpeg-next.workspace = true
+ffmpeg.workspace = true
lru = "0.12.4"
ffmpeg-sys-next = "7.0.2"
futures = "0.3.30"
diff --git a/crates/rendering/src/decoder.rs b/crates/rendering/src/decoder.rs
index 91e5e2865..3071dcc61 100644
--- a/crates/rendering/src/decoder.rs
+++ b/crates/rendering/src/decoder.rs
@@ -6,7 +6,7 @@ use std::{
sync::{mpsc, Arc},
};
-use ffmpeg_next::{
+use ffmpeg::{
codec,
format::{self, context::input::PacketIter, Pixel},
frame::{self, Video},
@@ -39,11 +39,11 @@ impl AsyncVideoDecoder {
let (tx, rx) = mpsc::channel();
std::thread::spawn(move || {
- let mut input = ffmpeg_next::format::input(&path).unwrap();
+ let mut input = ffmpeg::format::input(&path).unwrap();
let input_stream = input
.streams()
- .best(ffmpeg_next::media::Type::Video)
+ .best(ffmpeg::media::Type::Video)
.ok_or("Could not find a video stream")
.unwrap();
@@ -75,8 +75,8 @@ impl AsyncVideoDecoder {
// Create a decoder for the video stream
let mut decoder = context.decoder().video().unwrap();
- use ffmpeg_next::format::Pixel;
- use ffmpeg_next::software::scaling::{context::Context, flag::Flags};
+ use ffmpeg::format::Pixel;
+ use ffmpeg::software::scaling::{context::Context, flag::Flags};
let mut scaler_input_format = hw_device
.as_ref()
@@ -94,7 +94,7 @@ impl AsyncVideoDecoder {
)
.unwrap();
- let mut temp_frame = ffmpeg_next::frame::Video::empty();
+ let mut temp_frame = ffmpeg::frame::Video::empty();
let render_more_margin = (FRAME_CACHE_SIZE / 4) as u32;
@@ -366,7 +366,7 @@ fn ff_find_decoder(
codec_id: codec::Id,
) -> Option<Codec> {
unsafe {
- use ffmpeg_next::media::Type;
+ use ffmpeg::media::Type;
let codec = match st.parameters().medium() {
Type::Video => Some((*s.as_ptr()).video_codec),
Type::Audio => Some((*s.as_ptr()).audio_codec),
diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rs
index 4abc569bc..db55a8c7a 100644
--- a/crates/rendering/src/lib.rs
+++ b/crates/rendering/src/lib.rs
@@ -104,7 +104,7 @@ pub async fn render_video_to_channel(
println!("Setting up FFmpeg input for screen recording...");
- ffmpeg_next::init().unwrap();
+ ffmpeg::init().unwrap();
let start_time = Instant::now();