
Recherche avancée
Autres articles (94)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (7424)
-
How to list all audio devices that are enabled and present for recording the output audio of the pc ?
23 juin 2023, par Daniel LipI want to record with ffmpeg later the entire desktop including audio.
I want to make that it will find for me automatic the recording audio device.


I'm using MMDeviceEnumerator.


all the other ways I tried returned empty list returned 0 audio devices. I tried with naudio and ffmpeg


public Form1()
 {
 InitializeComponent();

 InitializeRecordingIndicator();

 MMDeviceEnumerator enumerator = new MMDeviceEnumerator();
 foreach (MMDevice device in enumerator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.All))
 {
 StreamWriter w = new StreamWriter(@"d:\audiodev.txt", true);
 cmbAudioDevices.Items.Add(device.FriendlyName);
 w.WriteLine(device.FriendlyName + " " + device.State);
 w.Close();
 }
 }



This is the list of all my audio deviceso n my system.
but they are all not present or disabled. and i have audio on my pc i can hear games videos anything.


so what would i select from this list as audio device for recording the pc output audio ?
or maybe i need to find another way to find the right audio device ?


Front Green In (Realtek(R) Audio) NotPresent
Rear (Realtek(R) Audio) NotPresent
Center (Realtek(R) Audio) NotPresent
Microphone (Realtek(R) Audio) NotPresent
Rear Grey In (Realtek(R) Audio) NotPresent
Side (Realtek(R) Audio) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Rear Pink In (Realtek(R) Audio) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Front (Realtek(R) Audio) NotPresent
Rear Orange In (Realtek(R) Audio) NotPresent
Line In (Realtek(R) Audio) NotPresent
Front Pink In (Realtek(R) Audio) NotPresent
Line In (Realtek(R) Audio) Unplugged
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Microphone (Realtek(R) Audio) Unplugged
Subwoofer (Realtek(R) Audio) NotPresent
Rear Black In (Realtek(R) Audio) NotPresent
Stereo Mix (Realtek(R) Audio) Disabled
Rear Green In (Realtek(R) Audio) NotPresent
Microphone (Realtek(R) Audio) NotPresent
Rear Blue In (Realtek(R) Audio) NotPresent
Front Green In (Realtek(R) Audio) NotPresent
Rear (Realtek(R) Audio) NotPresent
Center (Realtek(R) Audio) NotPresent
Microphone (Realtek(R) Audio) NotPresent
Rear Grey In (Realtek(R) Audio) NotPresent
Side (Realtek(R) Audio) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Rear Pink In (Realtek(R) Audio) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Front (Realtek(R) Audio) NotPresent
Rear Orange In (Realtek(R) Audio) NotPresent
Line In (Realtek(R) Audio) NotPresent
Front Pink In (Realtek(R) Audio) NotPresent
Line In (Realtek(R) Audio) Unplugged
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Microphone (Realtek(R) Audio) Unplugged
Subwoofer (Realtek(R) Audio) NotPresent
Rear Black In (Realtek(R) Audio) NotPresent
Stereo Mix (Realtek(R) Audio) Disabled
Rear Green In (Realtek(R) Audio) NotPresent
Microphone (Realtek(R) Audio) NotPresent
Rear Blue In (Realtek(R) Audio) NotPresent
Front Green In (Realtek(R) Audio) NotPresent
Rear (Realtek(R) Audio) NotPresent
Center (Realtek(R) Audio) NotPresent
Microphone (Realtek(R) Audio) NotPresent
Rear Grey In (Realtek(R) Audio) NotPresent
Side (Realtek(R) Audio) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Rear Pink In (Realtek(R) Audio) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (NVIDIA High Definition Audio) NotPresent
Front (Realtek(R) Audio) NotPresent
Rear Orange In (Realtek(R) Audio) NotPresent
Line In (Realtek(R) Audio) NotPresent
Front Pink In (Realtek(R) Audio) NotPresent
Line In (Realtek(R) Audio) Unplugged
Internal AUX Jack (High Definition Audio Device) NotPresent
Internal AUX Jack (High Definition Audio Device) NotPresent
Microphone (Realtek(R) Audio) Unplugged
Subwoofer (Realtek(R) Audio) NotPresent
Rear Black In (Realtek(R) Audio) NotPresent
Stereo Mix (Realtek(R) Audio) Disabled
Rear Green In (Realtek(R) Audio) NotPresent
Microphone (Realtek(R) Audio) NotPresent
Rear Blue In (Realtek(R) Audio) NotPresent



this is how i tried with naudio but it didn't working it didn't find anything. :


using NAudio.Wave;
...

// Enumerate and list audio input devices
var devices = WaveInEvent.DeviceCount;
for (int deviceId = 0; deviceId < devices; deviceId++)
{
 var deviceInfo = WaveInEvent.GetCapabilities(deviceId);
 Console.WriteLine($"Device ID: {deviceId}, Name: {deviceInfo.ProductName}");
}



before that i tried with ffmpeg but also it didn't return anything :


public static class FFmpegHelper
 {
 public static string[] GetAudioCaptureDevices()
 {
 string ffmpegPath = @"C:\path\to\ffmpeg.exe";
 Process process = new Process();
 process.StartInfo.FileName = ffmpegPath;
 process.StartInfo.Arguments = "-list_devices true -f dshow -i dummy";
 process.StartInfo.UseShellExecute = false;
 process.StartInfo.RedirectStandardError = true;
 process.StartInfo.CreateNoWindow = true;
 process.Start();
 process.WaitForExit();

 string output = process.StandardError.ReadToEnd();
 string[] lines = output.Split('\n');
 var devices = lines.Where(line => line.Contains("audio")).Select(line => line.Trim()).ToArray();
 return devices;
 }
 }



using it :


var audioDevices = FFmpegHelper.GetAudioCaptureDevices();



-
python subprocess ffmpeg return code = 69
13 juin 2023, par Tim ChenI try to call ffmpeg through the
subprocess.run(['ffmpeg', '-i', file_name, output_file_name], capture_output=True, text=True)
command in python to convert the audio file incoming from the front end to wav format file. The backend code is as follows, using python+fastapi :

@app.post("/api/upload/convert")
async def convert_upload_file(request: Request, file: UploadFile = File(...)):
 token = uuid.uuid4().hex
 tmpFileName = os.path.join(os.path.dirname(__file__), token)
 with open(tmpFileName, "wb") as buffer:
 buffer.write(await file.read())
 await file.seek(0)
 output_path = tmpFileName + '-output.wav'
 command = ['ffmpeg', '-i', tmpFileName, output_path]
 result = subprocess.run(command, capture_output=True, text=True)



This code usually works, but there are some scenarios where it doesn't work. The audio file is recorded by js code (specifically
navigator.mediaDevices.getUserMedia({audio: true})
).
The code of the audio recorded in windows chrome can run normally and get the converted wav file, but the audio recorded from ios15 safari for more than 3 seconds cannot be converted, promptingreturncode=69
. The error message is as follows :

CompletedProcess(args=['ffmpeg', '-i', '5cfb52c503a646bda0f422b517c8014a', '5cfb52c503a646bda0f422b517c8014a-output.wav'], returncode=69, stdout='', stderr="
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '5cfb52c503a646bda0f422b517c8014a':
 Metadata:
 major_brand : iso5
 minor_version : 1
 compatible_brands: isomiso5hlsf
 creation_time : 2023-06-11T16:36:53.000000Z
 Duration: 00:00:07.06, start: 0.000000, bitrate: 187 kb/s
 Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 184 kb/s (default)
 Metadata:
 creation_time : 2023-06-11T16:36:53.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '5cfb52c503a646bda0f422b517c8014a-output.wav':
 Metadata:
 major_brand : iso5
 minor_version : 1
 compatible_brands: isomiso5hlsf
 ISFT : Lavf58.76.100
 Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s (default)
 Metadata:
 creation_time : 2023-06-11T16:36:53.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 encoder : Lavc58.134.100 pcm_s16le
size= 2kB time=00:00:00.00 bitrate=N/A speed=N/A 
[aac @ 0x55f1f8f19fc0] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x55f1f8f19fc0] Too large remapped id is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x55f1f8f19fc0] If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
Error while decoding stream #0:0: Not yet implemented in FFmpeg, patches welcome
[aac @ 0x55f1f8f19fc0] Multiple frames in a packet.
[aac @ 0x55f1f8f19fc0] Reserved bit set.
[aac @ 0x55f1f8f19fc0] Number of bands (18) exceeds limit (13).
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0x55f1f8f19fc0] Reserved bit set.
[aac @ 0x55f1f8f19fc0] Prediction is not allowed in AAC-LC.
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0x55f1f8f19fc0] Reserved bit set.



For the abnormal code, I tried to execute
ffmpeg -i input output.wav
after fastapi handle request on the command line andsubprocess.run(['ffmpeg', '-i', file_name, output_path], capture_output =True, text=True)
, all succeeded, which means that the final file must be normal, otherwise the subsequent verification work will get the same error.

This confuses me, is there some information I'm missing ?


-
Rendering list of images over a video with ffmpeg does not work if video has audio
12 mai 2023, par Alex StirkenI'm using FFmpegKit for Flutter to render a list of changing images onto a video.
Im using the following arguments :


final arguments = [
 '-y',
 '-i', inputVideoPath,
 '-framerate', '$fps',
 '-start_number', '100',
 '-i', '${tempDirectoryPath}/%3d.png',
 '-filter_complex', '[1:v]scale=720:1280 [ovrl]; [0:v][ovrl]overlay=0:0,format=yuv420p[v]',
 '-map', '[v]',
 '-c:v', 'libx264',
 "-preset", "medium",
 '-pix_fmt', 'yuv420p',
 '-shortest',
 '$outputFilePath'
];



It works like a charm as long as the video file (.mp4) has no audio stream. If the video has an audio stream, only the first image is getting rendered (overlayed) over the video.


Any suggestions ?