
Recherche avancée
Autres articles (68)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (6734)
-
"wrong sample count" When reading MP4 files using OpenCV
26 octobre 2022, par Object UnknownI want to marge some mp4 videos using OpenCV library, but when I try to read those videos using
cv::VideoCapture
, it outputs like that :

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9AAE9D80] co located POCs unavailable
[h264 @ 000001EB9AAE7D80] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A128600] co located POCs unavailable
[h264 @ 000001EB9A129840] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB9AA28E40] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A169B00] co located POCs unavailable
[h264 @ 000001EB9A16B680] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB960CD680] co located POCs unavailable
[h264 @ 000001EB960CC8C0] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A81DDC0] co located POCs unavailable
[h264 @ 000001EB9A81B000] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB960CB200] co located POCs unavailable
[h264 @ 000001EB960CBFC0] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB99F206C0] co located POCs unavailable
[h264 @ 000001EB99F20B40] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A81D480] co located POCs unavailable
[h264 @ 000001EB9A81B000] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9AD02C00] co located POCs unavailable
[h264 @ 000001EB9AD02300] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9A81B480] co located POCs unavailable
[h264 @ 000001EB9A81B940] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[h264 @ 000001EB9AD02780] co located POCs unavailable
[h264 @ 000001EB9AD01E40] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001EB96084B80] wrong sample count



and just exited with exit value 0. I want to know why it is reporting this and how to solve it please.


Heres my demo code :


#include <string>
#include <iostream>
#include <opencv2></opencv2>core/core.hpp>
#include <opencv2></opencv2>video/video.hpp>
#include <opencv2></opencv2>imgproc/imgproc.hpp>
#include <opencv2></opencv2>videoio/videoio.hpp>
#include <opencv2></opencv2>highgui/highgui.hpp>

int main()
{
 cv::Mat frame;
 cv::VideoCapture vcap;
 for (int i = 1; i <= 60; i++)
 {
 if (!vcap.open("G:\\Users\\15819\\Desktop\\Demo\\demo (" + std::to_string(i) + ").mp4"))
 {
 std::cout << "Failed to Open File: demo (" << i << ").mp4" << std::endl;
 continue;
 }
 while (!vcap.read(frame))
 cv::imshow("video", frame);
 }
 return 0;
}
</iostream></string>


I installed the
OpenCV
andFFmpeg
library usingvcpkg
, here's the library information (displayed byvcpkg list
command) :

ffmpeg:x64-windows 4.4.1#21 a library to decode, encode, transcode, mux, dem...
ffmpeg:x86-windows 4.4.1#21 a library to decode, encode, transcode, mux, dem...
ffmpeg[avcodec]:x64-windows Build the avcodec library
ffmpeg[avcodec]:x86-windows Build the avcodec library
ffmpeg[avdevice]:x64-windows Build the avdevice library
ffmpeg[avdevice]:x86-windows Build the avdevice library
ffmpeg[avfilter]:x64-windows Build the avfilter library
ffmpeg[avfilter]:x86-windows Build the avfilter library
ffmpeg[avformat]:x64-windows Build the avformat library
ffmpeg[avformat]:x86-windows Build the avformat library
ffmpeg[openh264]:x64-windows H.264 de/encoding via openh264
ffmpeg[openh264]:x86-windows H.264 de/encoding via openh264
ffmpeg[swresample]:x64-windows Build the swresample library
ffmpeg[swresample]:x86-windows Build the swresample library
ffmpeg[swscale]:x64-windows Build the swscale library
ffmpeg[swscale]:x86-windows Build the swscale library
opencv4:x64-windows 4.6.0#6 computer vision library
opencv4:x86-windows 4.6.0#6 computer vision library
opencv4[default-features]:x64-windows Platform-dependent default features
opencv4[default-features]:x86-windows Platform-dependent default features
opencv4[dnn]:x64-windows Enable dnn module
opencv4[dnn]:x86-windows Enable dnn module
opencv4[ffmpeg]:x64-windows ffmpeg support for opencv
opencv4[ffmpeg]:x86-windows ffmpeg support for opencv
opencv4[jpeg]:x64-windows JPEG support for opencv
opencv4[jpeg]:x86-windows JPEG support for opencv
opencv4[png]:x64-windows PNG support for opencv
opencv4[png]:x86-windows PNG support for opencv
opencv4[qt]:x64-windows Qt GUI support for opencv
opencv4[qt]:x86-windows Qt GUI support for opencv
opencv4[quirc]:x64-windows Enable QR code module
opencv4[quirc]:x86-windows Enable QR code module
opencv4[tiff]:x64-windows TIFF support for opencv
opencv4[tiff]:x86-windows TIFF support for opencv
opencv4[webp]:x64-windows WebP support for opencv
opencv4[webp]:x86-windows WebP support for opencv
opencv:x64-windows 4.6.0 Computer vision library
opencv:x86-windows 4.6.0 Computer vision library
opencv[default-features]:x64-windows Platform-dependent default features
opencv[default-features]:x86-windows Platform-dependent default features
opencv[dnn]:x64-windows Enable dnn module
opencv[dnn]:x86-windows Enable dnn module
opencv[jpeg]:x64-windows JPEG support for opencv
opencv[jpeg]:x86-windows JPEG support for opencv
opencv[png]:x64-windows PNG support for opencv
opencv[png]:x86-windows PNG support for opencv
opencv[quirc]:x64-windows Enable QR code module
opencv[quirc]:x86-windows Enable QR code module
opencv[tiff]:x64-windows TIFF support for opencv
opencv[tiff]:x86-windows TIFF support for opencv
opencv[webp]:x64-windows WebP support for opencv
opencv[webp]:x86-windows WebP support for opencv



Other Environments :


OS: Windows 11 x64 Professional Workstation
IDE: Visual Studio 2022
Project C++ Standard: C++14
Project Platform: x64 Release



-
value of got_picture_ptr is always 0. when use avcodec_decode_video2()
4 septembre 2014, par user3867261I’m using visual studio 2013 professional.
below code is simple decode tutorial using ffmpeg.
///> Include FFMpeg
extern "C" {
#include <libavformat></libavformat>avformat.h>
}
///> Library Link On Windows System
#pragma comment( lib, "avformat.lib" )
#pragma comment( lib, "avutil.lib" )
#pragma comment( lib, "avcodec.lib" )
static void write_ascii_frame(const char *szFileName, const AVFrame *pVframe);
int main(void)
{
const char *szFilePath = "C:\\singlo\\example.avi";
///> Initialize libavformat and register all the muxers, demuxers and protocols.
av_register_all();
///> Do global initialization of network components.
avformat_network_init();
int ret;
AVFormatContext *pFmtCtx = NULL;
///> Open an input stream and read the header.
ret = avformat_open_input( &pFmtCtx, szFilePath, NULL, NULL );
if( ret != 0 ) {
av_log( NULL, AV_LOG_ERROR, "File [%s] Open Fail (ret: %d)\n", ret );
exit( -1 );
}
av_log( NULL, AV_LOG_INFO, "File [%s] Open Success\n", szFilePath );
av_log( NULL, AV_LOG_INFO, "Format: %s\n", pFmtCtx->iformat->name );
///> Read packets of a media file to get stream information.
ret = avformat_find_stream_info( pFmtCtx, NULL );
if( ret < 0 ) {
av_log( NULL, AV_LOG_ERROR, "Fail to get Stream Information\n" );
exit( -1 );
}
av_log( NULL, AV_LOG_INFO, "Get Stream Information Success\n" );
///> Find Video Stream
int nVSI = -1;
int nASI = -1;
int i;
for( i = 0 ; i < pFmtCtx->nb_streams ; i++ ) {
if( nVSI < 0 && pFmtCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO ) {
nVSI = i;
}
else if( nASI < 0 && pFmtCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO ) {
nASI = i;
}
}
if( nVSI < 0 && nASI < 0 ) {
av_log( NULL, AV_LOG_ERROR, "No Video & Audio Streams were Found\n");
exit( -1 );
}
///> Find Video Decoder
AVCodec *pVideoCodec = avcodec_find_decoder( pFmtCtx->streams[nVSI]->codec->codec_id );
if( pVideoCodec == NULL ) {
av_log( NULL, AV_LOG_ERROR, "No Video Decoder was Found\n" );
exit( -1 );
}
///> Initialize Codec Context as Decoder
if( avcodec_open2( pFmtCtx->streams[nVSI]->codec, pVideoCodec, NULL ) < 0 ) {
av_log( NULL, AV_LOG_ERROR, "Fail to Initialize Decoder\n" );
exit( -1 );
}
///> Find Audio Decoder
AVCodec *pAudioCodec = avcodec_find_decoder( pFmtCtx->streams[nASI]->codec->codec_id );
if( pAudioCodec == NULL ) {
av_log( NULL, AV_LOG_ERROR, "No Audio Decoder was Found\n" );
exit( -1 );
}
///> Initialize Codec Context as Decoder
if( avcodec_open2( pFmtCtx->streams[nASI]->codec, pAudioCodec, NULL ) < 0 ) {
av_log( NULL, AV_LOG_ERROR, "Fail to Initialize Decoder\n" );
exit( -1 );
}
AVCodecContext *pVCtx = pFmtCtx->streams[nVSI]->codec;
AVCodecContext *pACtx = pFmtCtx->streams[nASI]->codec;
AVPacket pkt;
AVFrame* pVFrame, *pAFrame;
int bGotPicture = 0; // flag for video decoding
int bGotSound = 0; // flag for audio decoding
int bPrint = 0; // ë¹ëì¤ ì²« ì¥ë©´ë§ íì¼ë¡ ë¨ê¸°ê¸° ìí ìì flag ìëë¤
pVFrame = avcodec_alloc_frame();
pAFrame = avcodec_alloc_frame();
while( av_read_frame( pFmtCtx, &pkt ) >= 0 ) {
///> Decoding
if( pkt.stream_index == nVSI ) {
if( avcodec_decode_video2( pVCtx, pVFrame, &bGotPicture, &pkt ) >= 0 ) {
///////////////////////problem here/////////////////////////////////////////////
if( bGotPicture ) {
///> Ready to Render Image
av_log( NULL, AV_LOG_INFO, "Got Picture\n" );
if( !bPrint ) {
write_ascii_frame( "output.txt", pVFrame );
bPrint = 1;
}
}
}
// else ( < 0 ) : Decoding Error
}
else if( pkt.stream_index == nASI ) {
if( avcodec_decode_audio4( pACtx, pAFrame, &bGotSound, &pkt ) >= 0 ) {
if( bGotSound ) {
///> Ready to Render Sound
av_log( NULL, AV_LOG_INFO, "Got Sound\n" );
}
}
// else ( < 0 ) : Decoding Error
}
///> Free the packet that was allocated by av_read_frame
av_free_packet( &pkt );
}
av_free( pVFrame );
av_free( pAFrame );
///> Close an opened input AVFormatContext.
avformat_close_input( &pFmtCtx );
///> Undo the initialization done by avformat_network_init.
avformat_network_deinit();
return 0;
}
static void write_ascii_frame(const char *szFileName, const AVFrame *frame)
{
int x, y;
uint8_t *p0, *p;
const char arrAsciis[] = " .-+#";
FILE* fp = fopen( szFileName, "w" );
if( fp ) {
/* Trivial ASCII grayscale display. */
p0 = frame->data[0];
for (y = 0; y < frame->height; y++) {
p = p0;
for (x = 0; x < frame->width; x++)
putc( arrAsciis[*(p++) / 52], fp );
putc( '\n', fp );
p0 += frame->linesize[0];
}
fflush(fp);
fclose(fp);
}
}there is a problem in below part
if( avcodec_decode_video2( pVCtx, pVFrame, &bGotPicture, &pkt ) >= 0 ) {
///////////////////////problem here/////////////////////////////////////////////
if( bGotPicture ) {
///> Ready to Render Image
av_log( NULL, AV_LOG_INFO, "Got Picture\n" );
if( !bPrint ) {
write_ascii_frame( "output.txt", pVFrame );
bPrint = 1;
}
}
}the value of bGotPicture is always 0.. So i can’t decode video
plz help me.
where do problem occurs from ? in video ? in my code ? -
The ultimate solution to knowing how your business is performing overall
8 janvier 2018, par InnoCraftWould you like to know how your business is performing overall at a glance ? Guess what, you can now do this easily with Roll-Up Reporting.
What is Roll-Up Reporting about ?
Roll-Up Reporting is a premium feature which you can acquire through the Matomo (Piwik) Marketplace. Developed by InnoCraft, the professional company behind Matomo, this plugin will :
- Save you heaps of time and gives you completely new insights
- Make this process easy as pie
- Reflect the structure of your business or organization
1 – Roll-Up Reporting does the maths for you
Yes, you read it right. Compared to having to sum reports of multiple websites manually, you can get aggregated results for your business or departments instantly with a single click directly in Matomo (Piwik). Not only does this save you heaps of time compared to doing this complicated work in a spreadsheet, you also avoid human errors. With this feature, you get a clear overview over all your websites, apps, and shops performances.
For example, if you want to know which referrers bring you the most value across all websites, then you will get the answer in a report. Same results for e-commerce reports, actions, and other metrics.
2 – Easy as pie, no tracking code involved
The best part of this feature is that you do not need to push data through additional tracking code. The setup is simple and made through the UI of the plugin.
3 – Roll-Up Reporting meets even the hardest requirements
You can also create “nested roll-ups”. This feature allows you to create a roll-up consisting of several other roll-ups. With a nested roll-up, you can create a roll-up for each department in your company (and assign all the websites of a department to that roll-up), then group several departments easily into a new roll-up simply by assigning several department roll-ups to this new roll-up.
For example, a company with multiple brands can assign multiple websites to each brand, and then get aggregated results for each brand and for the business overall. As a roll-up is basically the same as a website, you can give users access to a roll-up without having to give them access to each site, and the other way around.
How does it work ?
As with all premium features, this plugin is straightforward to use. Once activated in your Matomo (Piwik) administrator panel, you will notice that when you add a website, you have the choice between two possibilities :
When you select the “Roll-Up” option, a new window will appear asking you which websites and mobile apps you would like to aggregate into a roll-up :
The created roll-up will then be shown just like any other website that you have in Matomo (Piwik). You can create as many roll-up entities as you want.
Features, such as custom alerts, segments, and e-mail reports work for a roll-up just like for any website.
Real-Time reports
One of the most interesting features of Roll-Up Reporting is, that you can view all the Real-Time reports, such as the “Visitors in Real-Time” widget, the “Real-Time Map”, and the “Visitor Log” across several websites making it much easier to keep an eye on your business :
How to get the Roll-up reporting plugin ?
Developed by InnoCraft, the makers of Matomo (Piwik), Roll-Up Reporting is a premium feature which you can purchase on the Matomo Marketplace. You can also try it for free on the Matomo Cloud (formerly Piwik Cloud) for 30 days.
The post The ultimate solution to knowing how your business is performing overall appeared first on Analytics Platform - Matomo.