
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (66)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (7709)
-
FFmpeg Overwiting Playlist
30 septembre 2024, par Program-Me-RevI'm working on an implementation where I aim to generate a DASH Playlist from Raw Camera2 data in Android Java using FFmpeg


However , the current implementation only produces Three .m4s files regardless of how long the recording lasts . My goal is to create a playlist with 1-second .m4s Segments , but the output only includes the following files , and the video length doesn't exceed 2 seconds :


- playlist.mpd
- init.m4s
- 1.m4s
- 2.m4s



While the temporary files are created as expected , the .m4s files stop after these two segments . Additionally , only the last 2 seconds of the recording are retained , no matter how long the recording runs


The FFmpeg output indicates that FFmpeg is repeatedly overwriting the previously generated playlist , which may explain why the recording doesn't extend beyond 2 seconds


FFmpeg version : 6.0


package rev.ca.rev_media_dash_camera2;

 import android.app.Activity;
 import android.content.Context;
 import android.media.Image;
 import android.util.Log;
 import android.util.Size;

 import androidx.annotation.NonNull;
 import androidx.camera.core.CameraSelector;
 import androidx.camera.core.ImageAnalysis;
 import androidx.camera.core.ImageProxy;
 import androidx.camera.core.Preview;
 import androidx.camera.lifecycle.ProcessCameraProvider;
 import androidx.camera.view.PreviewView;
 import androidx.core.content.ContextCompat;
 import androidx.lifecycle.LifecycleOwner;

 import com.arthenica.ffmpegkit.FFmpegKit;
 import com.arthenica.ffmpegkit.ReturnCode;
 import com.google.common.util.concurrent.ListenableFuture;

 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;

 public class RevCameraCapture {
 private static final String REV_TAG = "RevCameraCapture";

 private final Context revContext;
 private final ExecutorService revExecutorService;
 private final String revOutDirPath = "/storage/emulated/0/Documents/Owki/rev_web_rtc_live_chat_temp_files/_abc_rev_uploads_temp";
 private boolean isRevRecording;
 private File revTempFile;
 private int revFrameCount = 0; // Counter for frames captured

 public RevCameraCapture(Context revContext) {
 this.revContext = revContext;

 revInitDir(revOutDirPath);
 revCheckOrCreatePlaylist();

 revExecutorService = Executors.newSingleThreadExecutor();
 }

 private void revInitDir(String revDirPath) {
 // Create a File object for the directory
 File revNestedDir = new File(revDirPath);

 // Check if the directory exists, if not, create it
 if (!revNestedDir.exists()) {
 boolean revResult = revNestedDir.mkdirs(); // mkdirs() creates the whole path
 if (revResult) {
 Log.e(REV_TAG, ">>> Directories created successfully.");
 } else {
 Log.e(REV_TAG, ">>> Failed to create directories.");
 }
 } else {
 Log.e(REV_TAG, ">>> Directories already exist.");
 }
 }

 private void revCheckOrCreatePlaylist() {
 File revPlaylistFile = new File(revOutDirPath, "rev_playlist.mpd");
 if (!revPlaylistFile.exists()) {
 // Create an empty playlist if it doesn't exist
 try {
 FileOutputStream revFos = new FileOutputStream(revPlaylistFile);
 revFos.write("".getBytes());
 revFos.close();
 } catch (IOException e) {
 Log.e(REV_TAG, ">>> Error creating initial rev_playlist : ", e);
 }
 }
 }


 private void revStartFFmpegProcess() {
 // Ensure revTempFile exists before processing
 if (revTempFile == null || !revTempFile.exists()) {
 Log.e(REV_TAG, ">>> Temporary file does not exist for FFmpeg processing.");
 return;
 }

 // FFmpeg command to convert the temp file to DASH format and append to the existing rev_playlist
 String ffmpegCommand = "-f rawvideo -pixel_format yuv420p -video_size 704x704 " + "-i " + revTempFile.getAbsolutePath() + " -c:v mpeg4 -b:v 1M " + "-f dash -seg_duration 1 -use_template 1 -use_timeline 1 " + "-init_seg_name 'init.m4s' -media_seg_name '$Number$.m4s' " + revOutDirPath + "/rev_playlist.mpd -loglevel debug";


 FFmpegKit.executeAsync(ffmpegCommand, session -> {
 ReturnCode returnCode = session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {
 // Optionally handle success, e.g., log or notify that the process completed successfully
 } else {
 Log.e(REV_TAG, ">>> FFmpeg process failed with return code : " + returnCode);
 }
 });
 }


 public void revStartCamera() {
 isRevRecording = true;

 ListenableFuture<processcameraprovider> revCameraProviderFuture = ProcessCameraProvider.getInstance(revContext);

 revCameraProviderFuture.addListener(() -> {
 try {
 ProcessCameraProvider revCameraProvider = revCameraProviderFuture.get();
 revBindPreview(revCameraProvider);
 revBindImageAnalysis(revCameraProvider);
 } catch (ExecutionException | InterruptedException e) {
 Log.e(REV_TAG, ">>> Failed to start camera : ", e);
 }
 }, ContextCompat.getMainExecutor(revContext));
 }

 private void revBindPreview(ProcessCameraProvider revCameraProvider) {
 CameraSelector revCameraSelector = new CameraSelector.Builder().requireLensFacing(CameraSelector.LENS_FACING_BACK).build();

 PreviewView previewView = ((Activity) revContext).findViewById(R.id.previewView);
 Preview preview = new Preview.Builder().build();
 preview.setSurfaceProvider(previewView.getSurfaceProvider());

 revCameraProvider.unbindAll();
 revCameraProvider.bindToLifecycle((LifecycleOwner) revContext, revCameraSelector, preview);
 }

 private void revBindImageAnalysis(@NonNull ProcessCameraProvider revCameraProvider) {
 ImageAnalysis revImageAnalysis = new ImageAnalysis.Builder().setTargetResolution(new Size(640, 480)) // Lower the resolution to reduce memory consumption
 .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST).build();

 revImageAnalysis.setAnalyzer(ContextCompat.getMainExecutor(revContext), this::revAnalyze);
 CameraSelector revCameraSelector = new CameraSelector.Builder().requireLensFacing(CameraSelector.LENS_FACING_BACK).build();

 revCameraProvider.bindToLifecycle((LifecycleOwner) revContext, revCameraSelector, revImageAnalysis);
 }

 @androidx.annotation.OptIn(markerClass = androidx.camera.core.ExperimentalGetImage.class)
 private void revAnalyze(@NonNull ImageProxy revImageProxy) {
 try {
 revProcessImageFrame(revImageProxy);
 } catch (Exception e) {
 Log.e(REV_TAG, ">>> Error processing revImage frame", e);
 } finally {
 revImageProxy.close(); // Always close the revImageProxy
 }
 }

 @androidx.annotation.OptIn(markerClass = androidx.camera.core.ExperimentalGetImage.class)
 private void revProcessImageFrame(@NonNull ImageProxy revImageProxy) {
 Image revImage = revImageProxy.getImage();
 if (revImage != null) {
 byte[] revImageBytes = revConvertYUV420888ToByteArray(revImage);
 revWriteFrameToTempFile(revImageBytes); // Write frame to a temporary file
 }
 revImageProxy.close(); // Close the ImageProxy to release the revImage buffer
 }

 private byte[] revConvertYUV420888ToByteArray(Image revImage) {
 Image.Plane[] planes = revImage.getPlanes();
 ByteBuffer revBufferY = planes[0].getBuffer();
 ByteBuffer revBufferU = planes[1].getBuffer();
 ByteBuffer revBufferV = planes[2].getBuffer();

 int revWidth = revImage.getWidth();
 int revHeight = revImage.getHeight();

 int revSizeY = revWidth * revHeight;
 int revSizeUV = (revWidth / 2) * (revHeight / 2); // U and V sizes are half the Y size

 // Total size = Y + U + V
 byte[] revData = new byte[revSizeY + 2 * revSizeUV];

 // Copy Y plane
 revBufferY.get(revData, 0, revSizeY);

 // Copy U and V planes, accounting for row stride and pixel stride
 int revOffset = revSizeY;
 int revPixelStrideU = planes[1].getPixelStride();
 int rowStrideU = planes[1].getRowStride();
 int revPixelStrideV = planes[2].getPixelStride();
 int rowStrideV = planes[2].getRowStride();

 // Copy U plane
 for (int row = 0; row < revHeight / 2; row++) {
 for (int col = 0; col < revWidth / 2; col++) {
 revData[revOffset++] = revBufferU.get(row * rowStrideU + col * revPixelStrideU);
 }
 }

 // Copy V plane
 for (int row = 0; row < revHeight / 2; row++) {
 for (int col = 0; col < revWidth / 2; col++) {
 revData[revOffset++] = revBufferV.get(row * rowStrideV + col * revPixelStrideV);
 }
 }

 return revData;
 }


 private void revWriteFrameToTempFile(byte[] revImageBytes) {
 revExecutorService.execute(() -> {
 try {
 // Create a new temp file for each segment if needed
 if (revTempFile == null || revFrameCount == 0) {
 revTempFile = File.createTempFile("vid_segment_", ".yuv", new File(revOutDirPath));
 }

 try (FileOutputStream revFos = new FileOutputStream(revTempFile, true)) {
 revFos.write(revImageBytes);
 }

 revFrameCount++;

 // Process after 60 frames (2 second for 30 fps)
 if (revFrameCount >= 60 && isRevRecording) {
 revStartFFmpegProcess(); // Process the segment with FFmpeg
 revFrameCount = 0; // Reset the frame count
 revTempFile = null; // Reset temp file for the next segment
 }

 } catch (IOException e) {
 Log.e(REV_TAG, ">>> Error writing frame to temp file : ", e);
 }
 });
 }

 public void revStopCamera() {
 isRevRecording = false;
 if (revTempFile != null && revTempFile.exists()) {
 revTempFile.delete(); // Clean up the temporary file
 revTempFile = null; // Reset the temp file reference
 }
 }
 }


 package rev.ca.rev_media_dash_camera2;

 import android.os.Bundle;

 import androidx.appcompat.app.AppCompatActivity;

 public class MainActivity extends AppCompatActivity {
 private RevCameraCapture revCameraCapture;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);

 revCameraCapture = new RevCameraCapture(this);
 }

 @Override
 protected void onStart() {
 super.onStart();
 try {
 revCameraCapture.revStartCamera();
 } catch (Exception e) {
 e.printStackTrace();
 }
 }

 @Override
 protected void onStop() {
 super.onStop();
 revCameraCapture.revStopCamera(); // Ensure camera is stopped when not in use
 }
 }
</processcameraprovider>


-
RTSP to HLS via FFMPEG, latency issues
28 juin 2024, par Pabl0The following are all the steps that I took to render a RTSP stream in my web app :


How to display RTSP stream in browser using HLS


Situation and Problem
You have an RTSP stream that you want to display in a browser using HLS (HTTP Live Streaming). However, when you try to play the RTSP stream in the browser using hls.js, you encounter the error "Unsupported HEVC in M2TS found." This error indicates that the HLS stream uses the HEVC (H.265) codec, which is not widely supported by many browsers and HLS players, including hls.js.


The most reliable solution is to transcode the stream from H.265 to H.264 using FFmpeg, which is more broadly supported. Here's how to transcode the stream :


Step 1 : Transcode the Stream Using FFmpeg


Run the following FFmpeg command to transcode the RTSP stream from H.265 to H.264 and generate the HLS segments :


ffmpeg -i rtsp://192.168.144.25:8554/main.264 -c:v libx264 -c:a aac -strict -2 -hls_time 10 -hls_list_size 0 -f hls C:\path\to\output\index.m3u8



c:v libx264 sets the video codec to H.264.


c:a aac sets the audio codec to AAC.


hls_time 10 sets the duration of each segment to 10 seconds.


hls_list_size 0 tells FFmpeg to include all segments in the playlist.


f hls specifies the output format as HLS.


C :\path\to\output\ is the directory where the HLS files will be saved. Ensure that C :\path\to\output\ is the directory where you want to save the HLS files.


Step 2 : Verify the HLS Files


After running the FFmpeg command, verify that the following files are generated in the output directory :


index.m3u8 (HLS playlist file)


Multiple .ts segment files (e.g., index0.ts, index1.ts, etc.)


Step 3 : Serve the HLS Files with an HTTP Server


Navigate to the directory containing the HLS files and start the HTTP server :


cd C :\path\to\output
python -m http.server 8000
Step 4 : Update and Test the HTML File
Ensure that hls_test.html file is in the same directory as the HLS files and update it as needed :


hls_test.html :




 
 
 
 
 
 
 <h1>HLS Stream Test</h1>
 <button>Play Stream</button>
 <video controls="controls" style="width: 100%; height: auto;"></video>
 <code class="echappe-js"><script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>

<script>&#xA; document&#xA; .getElementById(&#x27;playButton&#x27;)&#xA; .addEventListener(&#x27;click&#x27;, () => {&#xA; const video = document.getElementById(&#x27;video&#x27;);&#xA; if (Hls.isSupported()) {&#xA; const hls = new Hls();&#xA; hls.loadSource(&#x27;http://localhost:8000/index.m3u8&#x27;);&#xA; hls.attachMedia(video);&#xA; hls.on(Hls.Events.MANIFEST_PARSED, function () {&#xA; video.play().catch((error) => {&#xA; console.error(&#xA; &#x27;Error attempting to play:&#x27;,&#xA; error,&#xA; );&#xA; });&#xA; });&#xA; hls.on(Hls.Events.ERROR, function (event, data) {&#xA; console.error(&#x27;HLS Error:&#x27;, data);&#xA; });&#xA; } else if (&#xA; video.canPlayType(&#x27;application/vnd.apple.mpegurl&#x27;)&#xA; ) {&#xA; video.src = &#x27;http://localhost:8000/index.m3u8&#x27;;&#xA; video.addEventListener(&#x27;canplay&#x27;, function () {&#xA; video.play().catch((error) => {&#xA; console.error(&#xA; &#x27;Error attempting to play:&#x27;,&#xA; error,&#xA; );&#xA; });&#xA; });&#xA; } else {&#xA; console.error(&#x27;HLS not supported in this browser.&#x27;);&#xA; }&#xA; });&#xA; </script>

 



Step 5 : Open the HTML File in Your Browser


Open your browser and navigate to :


http://localhost:8000/hls_test.html



Click the "Play Stream" button to start playing the HLS stream. If everything is set up correctly, you should see the video playing in the browser.


Conclusion


By transcoding the RTSP stream from H.265 to H.264 and serving it as an HLS stream, you can display the video in a browser using hls.js. This approach ensures broader compatibility with browsers and HLS players, allowing you to stream video content seamlessly.


PART 2 : Add this method to the react app


We are assuming that the ffmpeg command is running in the background and generating the HLS stream. Now, we will create a React component that plays the HLS stream in the browser using the video.js library.


If not, please refer to the previous steps to generate the HLS stream using FFmpeg. (steps 1-3 of the previous section)


Step 1 : Create the Camera Component


import { useRef } from 'react';
import videojs from 'video.js';
import 'video.js/dist/video-js.css';

const Camera = ({ streamUrl }) => {
 const videoRef = useRef(null);
 const playerRef = useRef(null);

 const handlePlayClick = () => {
 const videoElement = videoRef.current;
 if (videoElement) {
 playerRef.current = videojs(videoElement, {
 controls: true,
 autoplay: false,
 preload: 'auto',
 sources: [
 {
 src: streamUrl,
 type: 'application/x-mpegURL',
 },
 ],
 });

 playerRef.current.on('error', () => {
 const error = playerRef.current.error();
 console.error('VideoJS Error:', error);
 });

 playerRef.current.play().catch((error) => {
 console.error('Error attempting to play:', error);
 });
 }
 };

 return (
 
 <button>Play Stream</button>
 
 
 );
};

export default Camera;



Note : This component uses the video.js library to play the HLS stream. Make sure to install video.js using npm or yarn :


npm install video.js


Step 2 : Use the Camera Component in Your App


Now, you can use the Camera component in your React app to display the HLS stream. Here's an example of how to use the Camera component :


<camera streamurl="http://localhost:8000/index.m3u8"></camera>


Note : see we are pointing to the HLS stream URL generated by FFmpeg in the previous steps.


Step 3 : Create the Cors Proxy Server and place it where the HLS files are being stored.


from http.server import HTTPServer, SimpleHTTPRequestHandler
import socketserver
import os

class CORSRequestHandler(SimpleHTTPRequestHandler):
 def end_headers(self):
 if self.path.endswith('.m3u8'):
 self.send_header('Content-Type', 'application/vnd.apple.mpegurl')
 elif self.path.endswith('.ts'):
 self.send_header('Content-Type', 'video/MP2T')
 super().end_headers()

if __name__ == '__main__':
 port = 8000
 handler = CORSRequestHandler
 web_dir = r'C:\Video_cam_usv'
 os.chdir(web_dir)
 httpd = socketserver.TCPServer(('', port), handler)
 print(f"Serving HTTP on port {port}")
 httpd.serve_forever()



Note : Change the web_dir to the directory where the HLS files are stored.


Also, note that the server is sending the correct MIME types for .m3u8 and .ts files. For example :


.m3u8 should be application/vnd.apple.mpegurl or application/x-mpegURL.
.ts should be video/MP2T.



Step 4 : Start the CORS Proxy Server


Open a terminal, navigate to the directory where the CORS proxy server script is located (same as the HLS files are being saved), and run the following command :


python cors_proxy_server.py



This will start the CORS proxy server on port 8000 and serve the HLS files with the correct MIME types.


Step 5 : Start the React App
Start your React app using the following command :


npm run dev


I have tried everything above (it´s my own doc to keep with the steps Ive taken so far) and I get the stream to render on my web app but the latency is very high, at least of 5-10 secs, how can i make it be real time or close to that ?


-
FFmpeg fails to draw text
6 avril 2024, par Edoardo BalducciI've rarely used ffmpeg before, so, sorry If the question is too dumb.
I have a problem adding a text layer to a video frame using ffmpeg.


This is my current code :


import subprocess
from PyQt5.QtGui import QPixmap, QImage
from PyQt5.QtWidgets import QLabel

class VideoThumbnailLabel(QLabel):
 def __init__(self, file_path, *args, **kwargs):
 super().__init__(*args, **kwargs)
 self.video = video
 video_duration = self.get_video_duration(file_path)
 thumbnail_path = self.get_thumbnail(file_path, video_duration)
 if thumbnail_path:
 self.setPixmap(QPixmap(thumbnail_path).scaled(160, 90, Qt.KeepAspectRatio))
 self.setToolTip(f"{video.title}\n{video.description}")

 def get_video_duration(self, video_path):
 """Returns the duration of the video in seconds."""
 command = [
 'ffprobe', '-v', 'error', '-show_entries',
 'format=duration', '-of',
 'default=noprint_wrappers=1:nokey=1', video_path
 ]
 try:
 result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
 if result.returncode != 0:
 print(f"ffprobe error: {result.stderr}")
 return 0
 duration = float(result.stdout)
 return int(duration) # Returning duration as an integer for simplicity
 except Exception as e:
 print(f"Error getting video duration: {e}")
 return 0

 def get_thumbnail(self, video_path, duration):
 """Generates a thumbnail with the video duration overlaid."""
 output_path = "thumbnail.jpg" # Temporary thumbnail file
 duration_str = f"{duration // 3600:02d}:{(duration % 3600) // 60:02d}:{duration % 60:02d}"
 command = [
 'ffmpeg', '-i', video_path,
 '-ss', '00:00:01', # Time to take the screenshot
 '-frames:v', '1', # Number of frames to capture
 '-vf', f"drawtext=text='Duration: {duration_str}':x=10:y=10:fontsize=24:fontcolor=white",
 '-q:v', '2', # Output quality
 '-y', # Overwrite output files without asking
 output_path
 ]
 try:
 result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 if result.returncode != 0:
 print(f"ffmpeg error: {result.stderr}")
 return None
 return output_path
 except Exception as e:
 print(f"Error generating thumbnail with duration: {e}")
 return None



and it is used like this :


for i, video in enumerate(self.videos):
 video_widget = VideoThumbnailLabel(video.file)
 video_widget.mousePressEvent = lambda event, v=video: self.onThumbnailClick(
 v
 )
 self.layout.addWidget(video_widget, i // 3, i % 3)



I'm facing a problem where I am not able to get the thumbnail if I try to add the duration (I've tested it without the draw filter and worked fine)


I get this error (from the
result.returncode
) that I'm not able to comprehend :

ffmpeg error: b"ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers\n built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)\n configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon\n libavutil 58. 29.100 / 58. 29.100\n libavcodec 60. 31.102 / 60. 31.102\n libavformat 60. 16.100 / 60. 16.100\n libavdevice 60. 3.100 / 60. 3.100\n libavfilter 9. 12.100 / 9. 12.100\n libswscale 7. 5.100 / 7. 5.100\n libswresample 4. 12.100 / 4. 12.100\n libpostproc 57. 3.100 / 57. 3.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/edoardo/Projects/work/test/BigBuckBunny.mp4':\n Metadata:\n major_brand : mp42\n minor_version : 0\n compatible_brands: isomavc1mp42\n creation_time : 2010-01-10T08:29:06.000000Z\n Duration: 00:09:56.47, start: 0.000000, bitrate: 2119 kb/s\n Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)\n Metadata:\n creation_time : 2010-01-10T08:29:06.000000Z\n handler_name : (C) 2007 Google Inc. v08.13.2007.\n vendor_id : [0][0][0][0]\n Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 1991 kb/s, 24 fps, 24 tbr, 24k tbn (default)\n Metadata:\n creation_time : 2010-01-10T08:29:06.000000Z\n handler_name : (C) 2007 Google Inc. v08.13.2007.\n vendor_id : [0][0][0][0]\n[Parsed_drawtext_0 @ 0x60000331cd10] Both text and text file provided. Please provide only one\n[AVFilterGraph @ 0x600002018000] Error initializing filters\n[vost#0:0/mjpeg @ 0x13ce0c7e0] Error initializing a simple filtergraph\nError opening output file thumbnail.jpg.\nError opening output files: Invalid argument\n"



I've installed both
ffmpeg
andffmprobe
in my machine :

┌(edoardomacbook-air)-[~/Projects/work/tests-scripts] 
└─ $ ffmpeg -version && ffprobe -version 2 ⚙ 
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
ffprobe version 6.1.1 Copyright (c) 2007-2023 the FFmpeg developers
built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100



Does anyone see the problem ?



P.S. : I know that I havent provided a minimal reproducible example, but since I don't know where the problem lies I didn't want to exclude anything