
Recherche avancée
Autres articles (27)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (5453)
-
A 'clean' way to cut an MP4 movie into two sections using FFMPEG ?
30 août 2020, par Peter in JapanI am attempting to use FFMPEG to make a script that can easily split a short MP4 movie with sound into two pieces at a certain point. I've searched through what feels like hundreds of posts to try to find "the" answer, but most of my attempts end up with poor results, broken video files that cause my video play to freeze, and so on. I am attempting to make a script that allows me to easily cut a short anime movie (something grabbed from Twitter or some other short source) and cut it into two sections, so it can be under the 2:20 Twitter time limit, or to cut out some scene I don't want to show my followers.


The issue is that FFMPEG is good at cutting videos into segments, but bad at know where keyframes are, so most videos have two seconds of blank video at the front before some keyframe appears, which looks terrible.


One example I found that works well is below, which cuts any mp4 into a bunch of chunks of n second size (six seconds in the example below). Source and documentation for this is https://moe.vg/3b8eNTs


ffmpeg -i seitokai.mp4 -c:v libx264 -crf 22 -map 0 -segment_time 6 -reset_timestamps 1 -g 30 -sc_threshold 0 -force_key_frames "expr:gte(t,n_forced*1)" -f segment output%03d.mp4


This code works great, at least allowing me to access the "left" side of a video that I want, in this case a six-second segment I want. Can anyone tell me how to accomplish the above, but starting at the 13-second period in said video, so I could get right "right" (not starting from 00:00:00) video cut cleanly ?


Alternately, a single, unified and elegant way to split (re-encode) an MP4 into two segments that forces keyframes from the very beginning of the cut pieces would be wonderful. I can't believe how hard this seems to be.


Thanks in advance for any help you can give ! Greetings from rural Japan !


-
Remove audio from specific audio track
9 août 2024, par Ronaldo JúdiceI have this code, and i would like to remove audio from tracks 5 and 6. I had tried everything but is not working, I can mute the audio tracks but on edition program i can see the waves, can you help me ?


if (conv.format === 'mxf') {
 // Add 8 audio tracks
 ffmpeg(inputFile)
 .audioCodec('pcm_s16le') // Codec de áudio para MXF
 .outputOptions([
 '-c:v mpeg2video', // Codec de vídeo para MXF
 '-q:v 2', // Qa vídeo
 '-map 0:v:0', 
 '-map 0:a:0', 
 '-map 0:a:0',
 '-map 0:a:0', 
 '-map 0:a:0', 
 '-map 0:a:0', // this track i want to remove the audio but keep the track
 '-map 0:a:0', //this track i want to remove the audio but keep the track
 '-map 0:a:0', 
 '-map 0:a:0', 
 '-disposition:a:0 default' // Marcar trilha 1 como padrão
 ])
 .save(outputFile)
 .on('start', commandLine => console.log(`FFmpeg comando iniciado: ${commandLine}`))
 .on('progress', progress => console.log(`Progresso: ${progress.percent}%`))
 .on('end', () => console.log(`Conversão concluída: ${outputFile}`))
 .on('error', err => console.error(`Erro na conversão de ${inputFile} para ${outputFile}: ${err.message}`));
 } else {
 // Outras conversões
 ffmpeg(inputFile)
 .outputOptions(conv.options)
 .save(outputFile)
 .on('start', commandLine => console.log(`FFmpeg comando iniciado: ${commandLine}`))
 .on('progress', progress => console.log(`Progresso: ${progress.percent}%`))
 .on('end', () => console.log(`Conversão concluída: ${outputFile}`))
 .on('error', err => console.error(`Erro na conversão de ${inputFile} para ${outputFile}: ${err.message}`));
 }



I tried to use ffmpeg comands to remove audio from track.


-
Find out what device to use for capturing with ffmpeg ?
14 septembre 2013, par wvxvwI'm trying to broadcast my screen and I cannot capture audio. There's one complication however. I don't have
pulseaudio
, and it simply doesn't work on my system, so installing it is out of question. Below is the command I'm trying :ffmpeg -f alsa -i ??? -f x11grab -s 1920x1200 -r 15 -i :0.0 \
-acodec pcm_s16le -vcodec libx264 \
-preset fast -pix_fmt yuv420p -s 1280x800 -threads 0 -f flv "$URL"Here's the list of my audio devices :
$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
HDA Intel PCH, ALC269VB Analog
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, ALC269VB Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC269VB Analog
Front speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC269VB Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC269VB Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC269VB Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC269VB Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC269VB Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC269VB Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
HDMI Audio OutputI know that
???
should be something likehw:X,Y
, but maybe it can be something else. I can't find the corresponding entry in the man page.As an aside, it would be great if you can suggest another audio codec. I can't find what are the options, and this particular one isn't compatible with FLV because of too high bitrate.
PS. This is the error I'm getting :
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input