
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (75)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5668)
-
FFmpeg av_dump_format showing incorrect output, but ffprobe displays correct metadata
29 janvier, par グルグルI use ffmpeg 7.1 source build on windows and compilation configuration as follow :


configuration:
 --toolchain=msvc
 --arch=x86_64
 --enable-x86asm
 --enable-asm
 --enable-shared
 --enable-w32threads
 --prefix=/D/build



When I use
av_dump_format
to print metadata of test.mp3, it display the incorrect information.

extern "C"
{
#include <libavformat></libavformat>avformat.h>
}

int main()
{ 
 av_log_set_level(AV_LOG_DEBUG);

 auto url = "D:/music/test.mp3";

 AVFormatContext* fmt;
 auto ret = avformat_open_input(&fmt, url, nullptr, nullptr);
 if (ret < 0)
 {
 av_log(nullptr, AV_LOG_ERROR, "Cannot open %s format : %s", url, av_err2str(ret));
 exit(EXIT_FAILURE);
 }

 av_dump_format(fmt, 0, url, 0);
}



output


[AVFormatContext @ 000001768E65BC40] Opening 'D:/music/test.mp3' for reading
[file @ 000001768E65C180] Setting default whitelist 'file,crypto,data'
[mp3 @ 000001768E65BC40] Format mp3 probed with size=4096 and score=51
id3v2 ver:4 flags:00 len:35
[mp3 @ 000001768E65BC40] pad 576 576
[mp3 @ 000001768E65BC40] Skipping 0 bytes of junk at 462.
Input #0, mp3, from 'D:/music/test.mp3':
 Metadata:
 encoder : Lavf58.76.100
 Duration: N/A, bitrate: N/A
 Stream #0:0, 0, 1/14112000: Audio: mp3, 0 channels
 Metadata:
 encoder : Lavc58.13



You can see the Stream info is useless.


But I use ffprobe which is built with same configuration to print metadata of test.mp3.


It's display normal.


ffprobe version 7.0.1 Copyright (c) 2007-2024 the FFmpeg developers
 built with Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34123 for x64
 configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --prefix=/D/build
 WARNING: library configuration mismatch
 avutil configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build
 avcodec configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build
 avformat configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build
 avdevice configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build
 avfilter configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build
 swscale configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build
 swresample configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build
 libavutil 59. 8.100 / 59. 39.100
 libavcodec 61. 3.100 / 61. 19.100
 libavformat 61. 1.100 / 61. 7.100
 libavdevice 61. 1.100 / 61. 3.100
 libavfilter 10. 1.100 / 10. 4.100
 libswscale 8. 1.100 / 8. 3.100
 libswresample 5. 1.100 / 5. 3.100
Input #0, mp3, from 'D:\music\test.mp3':
 Metadata:
 encoder : Lavf58.76.100
 Duration: 00:05:00.12, start: 0.025057, bitrate: 128 kb/s
 Stream #0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc58.13



Why is
av_dump_format
not correctly showing stream information ? How can I fix it ?

-
OpenCV 4.5.2 takes a long time (>100ms) to retrieve a single frame from a webcam, C++ on Windows 10
9 juin 2021, par Mustard TigerI've been having a tough time getting my webcam working quickly with opencv. Frames take a very long time to read, (a recorded average of 124ms across 500 frames) I've tried on three different computers (running Windows 10) with a logitech C922 webcam. The most recent machine I tested on has a Ryzen 9 3950X, with 32gbs of ram ; no lack of power.


Here is the code :


cv::VideoCapture cap = cv::VideoCapture(m_cameraNum);

// Check if camera opened successfully
if (!cap.isOpened())
{
 m_logger->critical("Error opening video stream or file\n\r");
 return -1;
}

bool result = true;
result &= cap.set(cv::CAP_PROP_FRAME_WIDTH, 1280);
result &= cap.set(cv::CAP_PROP_FRAME_HEIGHT, 720);

bool ready = false;
std::vector<string> timeLog;
timeLog.reserve(50000);
int i = 0;

while (i < 500)
{
 auto start = std::chrono::system_clock::now();
 
 cv::Mat img;
 ready = cap.read(img);

 // If the frame is empty, break immediately
 if (!ready)
 {
 timeLog.push_back("continue");
 continue;
 }

 i++;
 auto end = std::chrono::system_clock::now();
 timeLog.push_back(std::to_string(std::chrono::duration_cast(end - start).count()));
}

for (auto& entry : timeLog)
 m_logger->info(entry);

cap.release();
return 0;
</string>


Notice that I write the elapsed time to a log file at the end of execution. The average time is 124ms for debug and release, and not one instance of "continue" after half a dozen runs.


It doesn't matter if I use USB 2 or USB 3 ports (the camera is USB2) or if I run a debug build or a release build, the log file will show anywhere from 110ms to 130ms of time for each frame. The camera works fine in other app, OBS can get a smooth 1080@30fps or 720@60fps.


Stepping through the debugger and doing a lot of Googling, I've learned the following about my system :


- 

- The backend chosen by default is DSHOW. GStreamer and FFMPEG are also available.
- DSHOW uses FFMPEG somehow (it needs the FFMPEG dll) but I cannot use FFMPEG directly through opencv. Attempting to use cv::VideoCapture(m_cameraNum, cv::CAP_FFMPEG) always fails. It seems like Opencv's interface to FFMPEG is only capable of opening video files.
- Microsoft really screwed up camera devices in Windows a few years back, not sure if this is related to my problem.








Here's a short list of the fixes I have tried, most taken from older SO posts :


- 

- result &= cap.set(cv::CAP_PROP_FRAME_COUNT, 30) ; // Returns false, does nothing
- result &= cap.set(cv::CAP_PROP_CONVERT_RGB, 0) ; // Returns true, does nothing
- result &= cap.set(cv::CAP_PROP_MODE, cv::VideoWriter::fourcc('M', 'J', 'P', 'G')) ; // Returns false, does nothing
- Set registry key from http://alax.info/blog/1693 that should disable the new Windows camera server.
- Updated from 4.5.0 to 4.5.2, no change.
- Asked device manager to find a newer driver, no newer driver found.














I'm out of ideas. Any help ?


-
ffmpeg skips frames/packets while playing a file over http
24 janvier 2020, par cobanMicrosoft Windows [Version 10.0.18362.592]
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[hls @ 0600cac0] Skip ('#EXT-X-VERSION:3') 0KB sq= 0B f=0/0
[hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/chunklist_w1481451763.m3u8' for reading
[hls @ 0600cac0] Skip ('#EXT-X-VERSION:3') 0KB sq= 0B f=0/0
[hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_0.ts' for reading
[hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_1.ts' for reading
Input #0, hls, from 'http://ok2.se:8000/movie/xxxxxxxxxx/67933.m3u8':
Duration: 02:02:22.46, start: 0.000000, bitrate: N/A
Program 0
Metadata: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
variant_bitrate : 2788912
Stream #0:0: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 2788912
Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Metadata:
variant_bitrate : 2788912
Stream #0:2: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
Metadata:
variant_bitrate : 2788912
[http @ 060662c0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_2.ts' for reading
[hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_2.ts' for reading
[http @ 0606fb40] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_3.ts' for reading
[hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_3.ts' for reading
[http @ 0c2442c0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_4.ts' for reading
[http @ 0606f8c0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_5.ts' for readingI am trying to create an A/V player using ffmpeg library and Delphi. After puzzling and puzzling I found out how to read/decode/sync/display etc...
I think this behaviour is in some specific situations, because I tested live streams and noticed no problems. In this case this is a video file, while playing my app and ffplay.exe (from ffmpeg not compiled by myself) behaving the same, and skipping packets "every time when the app has to wait while packetqueue is full ?" and loses about 10-30 seconds of audio and video.
VLC doesn’t seem to have such a like behaviour, while as I understand from VLC credits, they are using ffmpeg or ffmpeg methods imported for decoding/encoding. inspecting vlc source doesn’t make much sense for me because I am a (noob) Delphi programmer. It’s like my main language is Dutch and try to translate form French to German language.
Please any suggestions how to avoid this, because I think it has to do something with delivery of data from the server and/or read buffer of ffmpeg. If I increase the max size of packetqueue the skipping does happen later and if decrease the size, the skipping happens sooner.
Including code from my app is not necessary because ffplay.exe has exact the same behavior. You can see debug from ffplay.exe.