
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (44)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)
Sur d’autres sites (5540)
-
Slow audio-video sync drift when merging wav and mp4 with ffmpeg
27 juin 2018, par charlie80I have an
mp4
file with only a single video stream (no audio) and awav
audio file that I would like to add to the video usingffmpeg
. The audio and the video have been recorded simultaneously during a conference, the former from a mixer output on a PC and the latter from a digital videocamera.I am using this
ffmpeg
command :ffmpeg -i incontro3.mp4 -itsoffset 18.39 -i audio_mix.wav -c:v copy -c:a aac final-video.mp4
where I’m using the
-itsoffset 18.39
option since I know that 18.39s is the video-audio delay.The problem I’m experiencing is that in the output file, while the audio is perfectly in sync with the video at the beginning, it slowly drifts out of sync during the movie.
The output if
ffprobe
on the video file is :Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'incontro3.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:47:22.56, start: 0.000000, bitrate: 888 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 886 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandlerand the
ffprobe
output for the audio file is :Input #0, wav, from 'audio_mix.wav':
Metadata:
track : 5
encoder : Lavf57.25.100
Duration: 00:46:32.20, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/sI’m using the latest
ffmpeg
Zeranoe windows build git-9591ca7 (2016-05-25).Thanks in anticipation for any help/ideas !
UPDATE 1 : It looks like the problem is upstream the video-audio merging, and could be in the concatenation and conversion of theMTS
files generated by the video camera into themp4
video. I will follow up as I make any progress in understanding...
UPDATE 2 : The problem is not in the initial merging of the
MTS
files generated by the camera. Or, at least, it occurs identically if I merge them withcat
or withffmpeg -f concat
UPDATE 3 : Following @Mulvya’s suggestion, I observed that the drift rate is constant (at least as far as I can tell judging by eye). I also tried to superimpose the A/V tracks with another software, and the drift is exactly the same, thereby ruling out
ffmpeg
as culprit. My (bad) feeling is that the issue could be related to the internal clocks of the digital video camera and the laptop used for audio recording running at slightly different rates (see here the report of an identical issue I just found). -
24kHz audio file problem : unsupported bitrate 64000
28 novembre 2018, par R. VaitI use alexa audio tags a lot. I know that now audio tags support 24kHz audio files so tried converting my audio files from 16kHz. I used the provided command in the docs to do so :
ffmpeg -i -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000
But when I try to play this file, I get an invalid response error, saying :
Error: The audio is of an unsupported bitrate 64000
. By looking into file details I clearly see, that bitrate is 48kbps and sample rate is 24kHz. I don’t see any value where it would say 64 or anything close to it.If I encode my file back to 16kHz it plays fine again.
It seems that there is a problem with this command, because if I encode my files using audacity, they work with 24kHz. I still would prefer to use ffmpeg, because I need to encode a lot of files.
I am asking, not about file format, format is correct. I need files in 24kHz sample rate and that is what causes issues. I saw another question about similar problem and others having the discussion there about sample rates, but no one was able to encode file to be 24kHz using ffmpeg.
Did anyone had any luck on encoding files to 24kHz using ffmpeg ?
-
ffmpeg avcodec_open2() return error -22 only in ubuntu
26 octobre 2020, par User800222AS title,


I'm working on a project on Mac with ffmpeg. It runs on my Mac to encode frames to vp9 & vp8. But when I run it on my docker image in a ubuntu, the function
avcodec_open2()
, returns-22
error. (only for vp9&vp8, h264 works).

I wonder if the error comes from the setting parameters part ? But it's still weird to have it working on mac but not in ubuntu.


Does anyone has a similar experience ?


bool open_video(AVFormatContext * oc,AVCodec * codec,OutputStream * ost,AVDictionary * opt_arg, bool reduceQuality) {
 int ret;
 AVCodecContext * c = ost->st->codec;
 AVDictionary * opt = NULL;
 av_dict_copy(&opt,opt_arg,0);

 if(codec264){
 // http://arstechnica.com/civis/viewtopic.php?f=6&t=1239375
 av_dict_set(&opt,"refs", "3", 0);
 av_dict_set(&opt,"vprofile","main", 0); // 2 versions to support differents libav/ffmpeg
 av_dict_set(&opt,"profile", "main", 0);
 
 //av_dict_set(&opt,"preset","superfast",0);
 //av_dict_set(&opt,"preset","ultrafast",0);
 av_dict_set(&opt,"preset","superfast",0);
 //av_dict_set(&opt,"preset","slow",0);
 
 //https://mattgadient.com/2013/06/12/a-best-settings-guide-for-handbrake-0-9-9/
 //av_dict_set(&opt, "tune", "zerolatency", 0); //bluerry but very small size
 //av_dict_set(&opt, "tune", "fastdecode", 0); // hd but large size
 // 23 300k, 29 150k, 35 75k
 if(reduceQuality)
 av_dict_set(&opt, "crf", "35", 0); //35 +-6 decrease/increase bitrate half/twice
 else
 av_dict_set(&opt, "crf", "29", 0); //29 +-6 decrease/increase bitrate half/twice
 
 }
 else if (codecVP9)
 { 
 // Setting explanation:
 // http://wiki.webmproject.org/ffmpeg/vp9-encoding-guide
 // https://developers.google.com/media/vp9/live-encoding/
 // https://developers.google.com/media/vp9/settings/vod/
 // https://developers.google.com/media/vp9/bitrate-modes/

 if(reduceQuality) //crf is the quality value for VP9 (0-63), lower the better quality youll get 
 av_dict_set(&opt, "crf" , "40", 0); 
 else
 av_dict_set(&opt, "crf" , "45", 0);
 av_dict_set(&opt, "speed" , "8" , 0);
 av_dict_set(&opt, "quality", "realtime", 0); //realtime is recommended
 //av_dict_set(&opt, "threads", "4" , 0);
 //av_dict_set(&opt, "tile-columns", "2", 0);
 //av_dict_set(&opt, "frame-parallel", "1", 0);
 //av_dict_set(&opt, "row-mt", "1", 0);
 av_dict_set(&opt, "b:v", "1", 0);
 av_dict_set(&opt, "g", "400", 0); //key frame interval (big difference in vid size)

 //av_dict_set(&opt, "maxrate", "3k", 0);
 //av_dict_set(&opt, "minrate", "1k", 0);
 //av_dict_set(&opt, "hwaccel", "vaapi", 0);
 //av_dict_set(&opt, "c:v", "libvpx-vp9", 0);
 
 }
 else if (codecVP8)
 {
 // https://trac.ffmpeg.org/wiki/Encode/VP8 
 av_dict_set(&opt, "passes" , "1" , 0); 
 av_dict_set(&opt, "cpu-used" , "15" , 0); 
 av_dict_set(&opt, "qmax" , "63", 0); 
 av_dict_set(&opt, "rt" , "", 0); // realtime setting
 //av_dict_set(&opt, "crf" , "10", 0); 

 if(reduceQuality)
 av_dict_set(&opt, "qmin" , "40", 0); // Lower quality, smaller sizes
 else
 av_dict_set(&opt, "qmin" , "35", 0); // Higher quality, larger sizes
 }
 else 
 {
 if(reduceQuality)
 av_dict_set(&opt, "x265-params", "crf=29", 0);
 else
 av_dict_set(&opt, "x265-params", "crf=23", 0);
 
 av_dict_set(&opt, "preset", "ultrafast", 0);
 av_dict_set(&opt, "tune", "zerolatency", 0);
// av_dict_set(&opt, "profile", "main", 0);
 }
 
 // Open the codec
 ret = avcodec_open2(c,codec,&opt);
 av_dict_free(&opt);
 if (ret < 0) {
 cout << "Could not open video codec. (error code:" << ret << ")\n";
 return false;
 } // if



Edit : Does anyone know if the ffmpeg-linux using different parameters' name for setting from other platform's (like Mac) ?


Eidt2 : It seems like even if I don't set any options parameters, it's still giving me
-22
error. Ex :ret = avcodec_open2(c, codec, NULL)