
Recherche avancée
Autres articles (84)
-
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 (6929)
-
ffmpeg - how can I scale the video while perserving the total frames in it ?
14 juin 2018, par chozI have a video with a size of
515 x 755
, that I would like to resize proportionally to206 x 302
(so, factor is2.5
).In this video, I have the total of 588 frames, and I use
ffmpeg
to scale it, with this command.ffmpeg -i video.mp4 -vf scale=206:-1 xRotation_206.mp4
And I use this to check how many frames are there in the video, based on this answer.
ffmpeg -i video.mp4 -map 0:v:0 -c copy -f null - 2>&1 | awk '/frame=/ {print $2}'
The original video frames is good (588 frames). But, after resizing with the command above, my converted video now has 604 frames.
The question is, how can I resize the video by preserving the total frames in it ? It doesn’t really have to be
ffmpeg
approach, and any suggestion is appreciated.Here’s the sample video that I use : Link
-
How do I set total file duration generating a piped mp4 with ffmpeg ?
9 avril 2021, par Mikhail NovikovMy task is to generate (by piping, so that a file can be played at the same time with generation) an mp4 file which is a part of a larger file, with the result looking like a static file link, being seekable before it fully loads (i.e. supporting range headers).


Here is how I do it now :


ffmpeg -ss $1 -i teststream_hls1_replay.mp4 -t $2 -timecode $3 \
 -codec copy -movflags frag_keyframe+faststart -f mp4 pipe:1



Result is OK (video starts from the right point) except the player does not see the total duration of a file so a controlbar looks weird, and seeking isn't possible properly, just because the controlbar jumps all the time.


How do I indicate to ffmpeg that it has to set moov atom to contain right duration ?


Basically the question boils down to : how do I force set some arbitrary duration of file in a moov atom, when I am generating a fragmented mp4 ? ffmpeg will not get know how long will it be, so explainably it can't do it itself, but I know... is there a command line parameters to specify a 'forced duration' ?


-
Get Total number of frames and FPS faster than with OpenCV library in C++
20 juillet 2018, par daniels_paI need to check which video can be analyzed and which cannot given the total number of frames in a video and the fps of the video. I created a c++ program to do the checking. Analyzing each video is not an option since analyzing is time consuming.
I used the OpenCV library for starters :
cv::VideoCapture vid_to_analyze;
vid_to_analyze.open( me_vid.vid_path.string() );
me_vid.total_frames= static_cast<int>(vid_to_analyze.get(CV_CAP_PROP_FRAME_COUNT));
me_vid.fps=vid_to_analyze.get(CV_CAP_PROP_FPS);
if (!vid_to_analyze.isOpened())
{
std::cout << "Skipping vid: "<< me_vid.vid_path.string()<<", couldn't open it" << std::endl;
}
if (me_vid.fps != me_vid.fps || me_vid.fps <= 0)
{
std::cout << "For video " << me_vid.vid_path.string() << std::endl;
std::cout << "FPS of the video file cannot be determined, assuming 30"<< std::endl;
me_vid.fps = 30;
}
vid_to_analyze.release();
</int>However when debugging it becomes painfully slow (the program is faster running without the debugger attached but still very slow given the number of videos it needs to cover). I think that has something to do with 4 threads being created and deleted each time a video is opened (released).
How to get total number of frames and fps in a faster manner ( without actually creating 4 threads !!) if i am not interested in actually grabbing frames from the video just the number of frames and fps.
Is there a way to use ffmpeg library from c++, would that be faster and where to start ?
EDIT : Valgrind seems to agree since (Ir=)91.66% of time spend in the
vid_to_analyze.open
phase