
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (82)
-
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs. -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (4927)
-
How do I make a bash script continue part of a loop only if there is no error in the first step of the loop ?
30 mars 2012, par Eli GreenbergI currently have a .command file for Mac that contains the following :
for f in ~/Desktop/Uploads/*.flv
do
/usr/local/bin/ffmpeg -i "$f" -vcodec copy -acodec libfaac -ab 128k -ar 48000 -async 1 "${f%.*}".mp4
rmtrash "$f"
doneHow can I tell bash to only execute rmtrash if ffmpeg doesn't produce an error ?
-
Hit noise when playing part of wave file with ALSA PCM interface
11 décembre 2024, par wangt13I am working a WAVE file playing with ALSA PCM interface in Linux, and I heard noise when I played the file quickly and partially.


Here is my playing function.


static int playback_function(uint8_t *pcm_buf, int pcm_frames)
{
 int rc;
 uint8_t *buf;
 int frame_size, sent;
 int periodsize;
 int left;

 frame_size = chan * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);
 periodsize = sys_periodsize; // 320 in my system
 buf = pcm_buf;
 left = pcm_frames;
 sent = 0;

 while (left > 0) {
 sent = (left > periodsize) ? periodsize : left;
 rc = snd_pcm_writei(pcm_handle, buf, sent);
 printf("rc: %d, sent: %d\n", rc, sent);
 if (rc == -EAGAIN || (rc >= 0 && (size_t)rc < sent)) {
 snd_pcm_wait(pcm_handle, 10);
 } else if (rc == -EPIPE) {
 snd_pcm_recover(pcm_handle, rc, 0);
 } else if (rc < 0) {
 break;
 }
 if (rc > 0) {
 left -= rc;
 buf += rc * frame_size;
 }
 }
 return rc;
}



The
pcm_buf
andpcm_frames
are got fromswr_convert()
inlibswresample
, in my case, thepcm_frames
is 1187.

By adding
printf("rc: %d, sent: %d\n", rc, sent);
, I got following logs.

rc: 320, sent: 320
rc: 87, sent: 87
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 87, sent: 87
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103



With above function, sometimes I can hear noise when playing the WAVE file quickly and repeatly.

So, how can I improve the WAVE playing without the noise ??

I changed the above function by using filling
0
to the end of data buffer (to enforce silence).

static int playback_test(uint8_t *pcm_buf, int pcm_frames)
{
 uint8_t *buf;
 int trd;
 int rc;
 int left;
 int frame_size, sent;
 int periodsize;
 int aligned = 0;

 frame_size = chan * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);
 periodsize = sys_periodsize; // 320 in my system

 buf = pcm_buf;
 left = pcm_frames;
 aligned = (left/periodsize + 1) * periodsize;
 memset(buf + left * frame_size, 0, (aligned - left) * frame_size);
 sent = 0;
///left = periodsize; // <== This causes more noise!!

 while (left > 0) {
 sent = (left > periodsize) ? periodsize : left;
 rc = snd_pcm_writei(pcm_handle, buf, sent);
 printf("rc: %d, sent: %d\n", rc, sent);
 if (rc == -EAGAIN || (rc >= 0 && (size_t)rc < sent)) {
 snd_pcm_wait(pcm_handle, 10);
 } else if (rc == -EPIPE) {
 snd_pcm_recover(pcm_handle, rc, 0);
 } else if (rc < 0) {
 break;
 }
 if (rc > 0) {
 left -= rc;
 buf += rc * frame_size;
 }
 }
 return rc;
}



There is NO improvement as of the noise.


-
How do I add a text for the 1st 30 seconds inside a filter_complex expression for each video part ?
30 décembre 2022, par PirateAppI am generating a video grid using the following filter_complex command


ffmpeg
 -i v_nimble_guardian.mkv -i macko_nimble_guardian.mkv -i ghost_nimble_guardian_1.mp4 -i nano_nimble_guardian.mkv
 -filter_complex "
 nullsrc=size=3840x2160 [base];
 [0:v] trim=start=39.117000,setpts=PTS-STARTPTS, scale=1920x1080 [upperleft];
 [1:v] trim=start=40.483000,setpts=PTS-STARTPTS, scale=1920x1080 [upperright];
 [2:v] trim=start=32.416471,setpts=PTS-STARTPTS, scale=1920x1080 [lowerleft];
 [3:v] trim=start=28.100000,setpts=PTS-STARTPTS, scale=1920x1080 [lowerright];
 [3:a] atrim=start=28.100000,asetpts=PTS-STARTPTS[outa];
 [base][upperleft] overlay=shortest=1 [tmp1];
 [tmp1][upperright] overlay=shortest=1:x=1920 [tmp2];
 [tmp2][lowerleft] overlay=shortest=1:y=1080 [tmp3];
 [tmp3][lowerright] overlay=shortest=1:x=1920:y=1080[v]
 "
 -map "[v]" -map "[outa]" -c:v libx264 -crf 17 -shortest -t 880 output4k.mkv



How do I text to this video grid that will appear with a fade in at 10 seconds, stay for 30 seconds and then fade out ?




What I tried ?


ffmpeg
 -i v.mkv -i macko_nimble_guardian.mkv -i ghost_nimble_guardian_subtle_arrow_1.mp4 -i nano_nimble_guardian.mkv
 -filter_complex "
 nullsrc=size=1920x1080 [base];
 drawtext=text='Summer Video':enable='between(t,10,30)'[fg];
 [0:v] trim=start=39.117000,setpts=PTS-STARTPTS, scale=960x540 [upperleft];
 [1:v] trim=start=40.483000,setpts=PTS-STARTPTS, scale=960x540 [upperright];
 [2:v] trim=start=32.416471,setpts=PTS-STARTPTS, scale=960x540 [lowerleft];
 [3:v] trim=start=28.100000,setpts=PTS-STARTPTS, scale=960x540 [lowerright];
 [3:a] atrim=start=28.100000,asetpts=PTS-STARTPTS[outa];
 [base][upperleft] overlay=shortest=1 [tmp1];
 [tmp1][upperright] overlay=shortest=1:x=960 [tmp2];
 [tmp2][lowerleft] overlay=shortest=1:y=540 [tmp3];
 [tmp3][lowerright] overlay=shortest=1:x=960:y=540[v]
 "
 -map "[v]" -map "[outa]" -c:v libx264 -shortest -t '30' output2.mkv



It gives me an error


[Parsed_drawtext_1 @ 0x600002bdc420] Using "/System/Library/Fonts/Supplemental/Verdana.ttf"
Filter drawtext:default has an unconnected output