
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (28)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
D’autres logiciels intéressants
12 avril 2011, parOn ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
Videopress
Site Internet : (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (5443)
-
ffmpeg doesn't work when the script is launched by cron - No protocol specified, Cannot open display :0.0
14 janvier 2024, par a kffmpeg in my script doesn't work when the script is launched by cron of the root


Error : No protocol specified, Cannot open display :0.0


OS : Ubuntu 20.04


#!/bin/bash
log=/var/log/log2/log2.txt

echo ______________ $(date) >> "$log"
echo "$""DISPLAY" "= " "$DISPLAY" >> "$log" ;
echo whoami ' ' $(whoami) >> "$log" 
echo pwd ' ' $(pwd) >> "$log" 
echo "$""USER" "=" ' ' "$USER" >> "$log"
echo PATH ' ' "$PATH" >> "$log"
echo which ffmpeg ' ' $(which ffmpeg)>> "$log" 
echo whereis ffmpeg ' ' $(whereis ffmpeg) >> "$log" 
echo "\nls -l /bin/* | grep ffmpeg" ' ' >> "$log"
ls -l /usr/bin/* | grep ffmpeg >> "$log"
echo "ls -l /var/log | grep log2" ' '>> "$log"
ls -l /var/log | grep log2 >> "$log"

ffmpeg -y -f x11grab -s 1366x768 -i :0.0 -r 25 /var/log/log2/test.mp4 -loglevel error 2>>"$log" &

echo "pid ffmpeg ""$""!"" = " "$!" >> "$log" 
sleep 5
kill "$!"
echo exit >> "$log"
exit



When Cron (Cron of the root) launches the script, ffmpeg shows the error "No protocol specified, Cannot open display :0.0"


/var/log/log2/log2.txt :


______________ ven. 05 mai 2023 04:10:01 CEST
$DISPLAY = 
whoami root
pwd /root
$USER = 
PATH /usr/bin:/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 04:09 log2
pid ffmpeg $! = 74590
No protocol specified
[x11grab @ 0x56244aa06740] Cannot open display :0.0, error 1.
:0.0: Input/output error
exit



When I launch the script manually as a not-root user (with sudo), everything work correctly :


______________ ven. 05 mai 2023 04:10:47 CEST
$DISPLAY = :0
whoami root
pwd /home/an
$USER = root
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 04:09 log2
pid ffmpeg $! = 74618
exit



When I launch the script manually as the root, everything works correctly :


______________ ven. 05 mai 2023 04:11:27 CEST
$DISPLAY = :0
whoami root
pwd /root
$USER = root
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 04:11 log2
pid ffmpeg $! = 74683
exit



When crontab of an ordinary user launches the script, it works correctly :


$DISPLAY = 
whoami an
pwd /home/an
$USER = 
PATH /usr/bin:/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 05:05 log2
pid ffmpeg $! = 77601
exit



I have tried to put into the script :


export DISPLAY=":0"


export DISPLAY=":0.0"


export DISPLAY=":1"


-
C# Windows Forms Using FFMPEG to change video format got no response
21 mai 2023, par TSLeeI am trying to make an exe program to change a video format by using FFMPEG instead of doing it in the terminal. The formatted video will be saved in the download folder. I have tried my code below and got no output response. I wonder if I used process() and StartInfo correctly, as examples I found and the documentation just confused me. I have double-checked the ffmpeg.exe is in the bin folder and the StartInfo() is just for getting information, which is under Process(). This is why Process() can access the information and use Start() to start the process. Please help and correct my understanding.
Below is part of my code :


private void convertButton_Click(object sender, EventArgs e)
 {
 String input = filepathTextBox.Text;
 String outputResolution = resolutionLabel.Text;
 String output;
 String outputFileType;
 int inputLength = input.Length;
 int l = 0;
 for (int i = (inputLength - 1); inputLength > -1; i--)
 {
 if (input[i] == '.')
 {
 l = i;
 break;
 }
 }
 output = input.Substring(0, l - 1);
 outputFileType = input.Substring(l + 1, inputLength - 1);
 Process process = new Process();
 process.StartInfo.UseShellExecute = true;
 process.StartInfo.FileName = "ffmpeg.exe";
 process.StartInfo.WorkingDirectory = @"C:\Users\User\Downloads\ffmpeg-2023-05-15-git-2953ebe7b6-full_build\bin";
 process.StartInfo.Arguments = "ffmpeg -i" + @"C:\Users\User\Downloads\file_example_MP4_640_3MG.mp4" + "-s 320x240 -r 25 -b:v 500000 -pix_fmt yuv420p -c:v libx264 -vprofile baseline -level 2.1 -x264opts stitchable=1:level=3.0:keyint=15:ref=1:merange=16:mvrange=32 -acodec pcm_s16le -ar 16000 -ac 1" + @"C:\Users\User\Downloads\440.mp4";
 process.Start();
 }



Output :
"myprogram.exe(CoreCLR : clrhost) : Loaded 'C :\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.15\System.Diagnostics.Process.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled."
The thread 0x79e0 has exited with code 0 (0x0).


-
how can I assign unique AVFoundation camera device names ?
28 avril 2023, par mcgregor94086Short summary :
I have a USB multi-camera array device. According to system_profiler, each of these webcams share the same name : "USB Camera". I have no unique name I can use with FFMPEG AVFoundation and get images from that specific camera. How can I tell FFMPEG the specific camera that I want (each has a unique USB path that I normally use to identify a specific camera.


I can solve this problem on Linux, but I can't figure out how to do it on macOS.


How I might do this on Linux
I know the unique USB Path to each camera, and I would like to use this to assign a unique Name that I can address using FFMPEG when taking images. On Linux I can use the udev system to make those assignments,


In Linux, I can reassign a new unique camera name using /etc/udev/rules.d/60-v4l.rules. with something like this :


SUBSYSTEMS=="usb", ENVID_VENDOR_ID=="0bda", ENVID_MODEL_ID=="5829", ENVID_PATH_TAG==platform-fd500000_pcie-0000_01_00_0-usb_1_4_5_1_3_1_1, ENVID_V4L_PRODUCT="Cam_00"
SUBSYSTEMS=="usb", ENVID_VENDOR_ID=="0bda", ENVID_MODEL_ID=="5829", ENVID_PATH_TAG==platform-fd500000_pcie-0000_01_00_0-usb_1_4_5_1_3_1_3, ENVID_V4L_PRODUCT="Cam_01"
...


More details :
Of course macOS doesn't work this way, as it uses AVFoundation to address video devices.


When I attach the device I see that 16 new cameras now appear when I type query system_profiler SPCameraDataType, it prints the output shown further below


You may notice that there are 16 cameras all named "USB Camera :" but system_profiler is reporting that each has a "Unique ID :" that is different for each camera. This Unique ID is composed of a unique USB Path (e.g. '0x1441311') concatenated with the "Vendor ID" ('00bda') and product ID ('5829') all expressed in hexadecimal.


Unfortunately, this means every camera has the same generic name in iPhoto, and when specifying the input camera in FFMPEG with AVFoundation syntax, I can't seem to indicate which specific camera I want.


I want to take 1 photo from each camera in a specific order. I have a table that maps each camera's USB Path to a desired name that would make it easy for me to trigger the camera captures in the sequence I desire.


In Linux, I can reassign a new unique camera name using /etc/udev/rules.d/60-v4l.rules.


SUBSYSTEMS=="usb", ENVID_VENDOR_ID=="0bda", ENVID_MODEL_ID=="5829", ENVID_PATH_TAG==platform-fd500000_pcie-0000_01_00_0-usb_1_4_5_1_3_1_1, ENVID_V4L_PRODUCT="Cam_00"
SUBSYSTEMS=="usb", ENVID_VENDOR_ID=="0bda", ENVID_MODEL_ID=="5829", ENVID_PATH_TAG==platform-fd500000_pcie-0000_01_00_0-usb_1_4_5_1_3_1_3, ENVID_V4L_PRODUCT="Cam_01"
...


% system_profiler SPCameraDataType


Camera :


USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144131100bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144200000bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144141400bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144131300bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144141300bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144121200bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144121400bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144133000bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144131200bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144141100bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144143000bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144121300bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144110000bda5829

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144141200bda5829

FaceTime HD Camera (Built-in):

 Model ID: UVC Camera VendorID_1452 ProductID_34068
 Unique ID: 0x8020000005ac8514

USB Camera:

 Model ID: UVC Camera VendorID_3034 ProductID_22569
 Unique ID: 0x144300000bda5829



MacBook Pro, OS X 10.11
Posted on Apr 27, 2023 10:49 PM
Reply


Page content loaded
There are no replies.
how can I assign unique AVFoundation camera device names ?
Reply