Skip to content

🎥 Make videos programmatically with React

`@remotion/compositor`: Fix operation not permitted error in compositor

Jonny Burger709de69bae8e
diff --git a/packages/compositor-darwin-arm64/remotion b/packages/compositor-darwin-arm64/remotion
index 7a5a973102..0a9ba23222 100755
Binary files a/packages/compositor-darwin-arm64/remotion and b/packages/compositor-darwin-arm64/remotion differ
diff --git a/packages/compositor-darwin-x64/remotion b/packages/compositor-darwin-x64/remotion
index 1c2232c955..280b82ce83 100755
Binary files a/packages/compositor-darwin-x64/remotion and b/packages/compositor-darwin-x64/remotion differ
diff --git a/packages/compositor-linux-arm64-gnu/remotion b/packages/compositor-linux-arm64-gnu/remotion
index bff6837da4..c723b92501 100755
Binary files a/packages/compositor-linux-arm64-gnu/remotion and b/packages/compositor-linux-arm64-gnu/remotion differ
diff --git a/packages/compositor-linux-arm64-musl/remotion b/packages/compositor-linux-arm64-musl/remotion
index 5c59abe8bc..7369f8f781 100755
Binary files a/packages/compositor-linux-arm64-musl/remotion and b/packages/compositor-linux-arm64-musl/remotion differ
diff --git a/packages/compositor-linux-x64-gnu/remotion b/packages/compositor-linux-x64-gnu/remotion
index db9501a5f6..06c81834e5 100755
Binary files a/packages/compositor-linux-x64-gnu/remotion and b/packages/compositor-linux-x64-gnu/remotion differ
diff --git a/packages/compositor-linux-x64-musl/remotion b/packages/compositor-linux-x64-musl/remotion
index a43401688b..76afbf1f55 100755
Binary files a/packages/compositor-linux-x64-musl/remotion and b/packages/compositor-linux-x64-musl/remotion differ
diff --git a/packages/compositor/rust/opened_stream.rs b/packages/compositor/rust/opened_stream.rs
index e3cc593b68..ae252c5ab1 100644
--- a/packages/compositor/rust/opened_stream.rs
+++ b/packages/compositor/rust/opened_stream.rs
@@ -299,21 +299,48 @@ impl OpenedStream {
if packet.is_key() {
freshly_seeked = false
} else {
- match packet.pts() {
+ match packet.pts() {
Some(pts) => {
let new_position_to_seek_to = pts - 1;
stop_after_n_diverging_pts = None;
- self.input.seek(
+ let res = self.input.seek(
self.stream_index as i32,
0,
pts,
new_position_to_seek_to,
0,
- )?;
+ );
+ match res {
+ Ok(_) => {
+ }
+ Err(err) => {
+ if err.to_string().contains("Operation not permitted") {
+ _print_verbose(&format!(
+ "Could not perform seek. Got 'Operation not permitted' error."
+ ))?;
+ _print_verbose(&format!("Attempting to seek to the beginning of the file."))?;
+ match self.input.seek(
+ self.stream_index as i32,
+ 0,
+ pts,
+ new_position_to_seek_to,
+ AVSEEK_FLAG_ANY ,
+ ) {
+ Ok(_) => {
+ }
+ Err(err) => {
+ return Err(err.into());
+ }
+ }
+ }
+
+ }
+ }
}
- None => {}
- }
+ None => {
+ }
+ };
continue;
}
}