
Recherche avancée
Autres articles (70)
-
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 (5923)
-
I need a compact c/c++ code for motion vectors extraction from mp4 file without frame decoding [on hold]
23 mars 2018, par AndyreyI have searched a lot of answers on this kind of question. Many of them point out to code, presuming frame decoding :
DCT coefficient and motion vector extraction in encoded domain ;
https://github.com/vadimkantorov/mpegflow ;
https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/extract_mvs.c.I implemented these codes in my program and saw they decode video frames, and then use frame side data for extracting motion vectors.
Others give command lines for executing bynaries :
Motion Vector extraction from encoded video file
or just gives reference to huge set of library files with no idea what to do with them.
What I badly need : code for extracting motion vectors from mp4 with no frame decoding (no pixel domain restoring). Is it possible ?
From my 3rd reference I used code like next, where I suspect frame decoding happens :
while (ret >= 0)
{
ret = avcodec_receive_frame(video_dec_ctx, frame);
/*I omit some exclusion processing*/
if (ret >= 0)
{
int i;
AVFrameSideData *sd;
video_frame_count++;
sd = av_frame_get_side_data(frame, AV_FRAME_DATA_MOTION_VECTORS);
if (sd)
{
const AVMotionVector *mvs = (const AVMotionVector *)sd->data;
for (i = 0; i < sd->size / sizeof(*mvs); i++)
{
const AVMotionVector *mv = &mvs[i];
printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n",
video_frame_count, mv->source,
mv->w, mv->h, mv->src_x, mv->src_y,
mv->dst_x, mv->dst_y, mv->flags);
}
}
av_frame_unref(frame);
}
} -
Shell script works fine from shell but doesn’t work as expected when executed via PHP “shell_exec” code
9 décembre 2019, par Eric FeillantThis record.sh script shell is here and works fine on command line to record an MP4 file from a local flv live stream :
DATE=`date +"%d-%m-%Y-%T"`
if [ -s NAMESTREAM ]
then
cat config.php | dos2unix | grep auth | grep username | \
awk -F ' ' '{print $3}' | sed "s/'//g" | sed "s/;//g" | while read VAR
do echo $VAR > RECSTREAM
echo "Starting recording ..."
ffmpeg -i "rtmp://localhost/hls/$VAR" -crf 19 videos/"$VAR"_"$DATE".mp4
done
else
echo "Streaming is not started, please start it before"
fiI send a shell_exec to call the last shell script in a php script like this :
$old_path = getcwd();
chdir('/usr/local/nginx/html/mydir');
$output = shell_exec('nohup ./record.sh >/dev/null 2>/dev/null &');
chdir($old_path);The MP4 video files are generated but unreadable with VLC, etc… It seems that the problem is due to my PHP script but I am not able to know why.
When executing from the shell command line : PHP myphpscript.php works fine, MP4 video files are OK. But from the PHP web page, the MP4 video files are corrupted.
Any ideas ? Any param to test in FFmpeg to have a good mp4 video file ?
-
How to code transcoding of TS to MP4 using ffmpeg
28 juillet 2016, par CodeLearnerffmpeg -i testFile.ts -c:a aac -strict -2 -c:v copy testOutputFile.m4a
The above command successfully converts
testFile.ts
(H264
video +Mpeg2
audio) totestOutputFile.m4a
(H264
video +AAC
audio).I need to implement the same functionality via code (using the
ffmpeg
library preferablyffmpeg v1.2
).Does anybody know how to copy from one container(
TS
) to another(MP4
) while encoding audio but not video ?