
Recherche avancée
Médias (17)
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (82)
-
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 (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
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 (6931)
-
Parsing xml with perl and libXML
2 mai 2014, par user3589690I have an XML file which I would like to parse and use to create an arguments set for ffmpeg encoding.
This is what a dump of the xml looks like :
$VAR1 = {
'profile' => [
{
'enodingParam' => {
'videoFrameRate' => {
'arg' => '-r',
'content' => '25'
},
'audioCodec' => {
'arg' => '-acodec',
'content' => 'libfaac'
},
'videoCodec' => {
'arg' => '-vcodec',
'content' => 'libx264'
},
'videoSize' => {
'arg' => '-s',
'content' => '640x360'
},
'audioBitrate' => {
'arg' => '-ab',
'content' => '96k'
},
'videoGOP' => {
'arg' => '-g',
'content' => '90'
},
'audioRate' => {
'arg' => '-ar',
'content' => '22050'
},
'audioChannels' => {
'arg' => '-ac',
'content' => '2'
},
'videoPreset' => {
'arg' => '-vpre',
'content' => 'slow'
},
'videoBitrate' => {
'arg' => '-b',
'content' => '1200k'
}
},
'metadat' => {
'fileContainer' => '.mp4',
'profileName' => 'testpfrof1'
}
},
{
'enodingParam' => {
'videoFrameRate' => {
'arg' => '-r',
'content' => '25'
},
'audioCodec' => {
'arg' => '-acodec',
'content' => 'libfaac'
},
'videoCodec' => {
'arg' => '-vcodec',
'content' => 'libx264'
},
'videoSize' => {
'arg' => '-s',
'content' => '320x180'
},
'audioBitrate' => {
'arg' => '-ab',
'content' => '96k'
},
},
'videoGOP' => {
'arg' => '-g',
'content' => '90'
},
'audioRate' => {
'arg' => '-ar',
'content' => '22050'
},
'audioChannels' => {
'arg' => '-ac',
'content' => '2'
},
'videoPreset' => {
'arg' => '-vpre',
'content' => 'slow'
},
'videoBitrate' => {
'arg' => '-b',
'content' => '400k'
}
},
'metadat' => {
'fileContainer' => '.mp4',
'profileName' => 'testProfile2'
}
}
]
};I would like to use a foreach loop for the encodingparam node/tagname and end up with a string which looks something like this :
-acodec libfaac -vcodec libx264 -s 640x360 -ab 96k
I am kind of stuck . This is what I have put together so far :
#!/usr/bin/perl
use warnings;
use strict;
use Data::Dumper;
use XML::LibXML;
my $filename = "xml/profile.xml";
my $parser = XML::LibXML->new;
my $doc = $parser->parse_file($filename)
or die "can't parse profile file: $@";
my $root = $doc->documentElement();
my @nodeList = $doc->getElementsByTagName('enodingParam');here is the xml file
<?xml version="1.0"?>
<profiles>
<profile>
<metadt>
<profilename>testp1</profilename>
<filecontainer>.mp4</filecontainer>
</metadt>
<enodingparam>
<videocodec arg="-vcodec">libx264</videocodec>
<videopreset arg="-vpre">slow</videopreset>
<videobitrate arg="-b">1200k</videobitrate>
<videowidth arg="-w">640</videowidth>
<videoheight arg="-h">360</videoheight>
<videosize arg="-s">640x360</videosize>
<videoframerate arg="-r">25</videoframerate>
<videogop arg="-g">90</videogop>
<audiobitrate arg="-ab">ab 96k</audiobitrate>
<audiocodec arg="-acodec">-acodec libfaac</audiocodec>
<audiochannels arg="-ac">2</audiochannels>
<audiorate arg="-ar">"22050"</audiorate>
</enodingparam>
</profile>
<profile>
<metadt>
<profilename>testProfile22</profilename>
<filecontainer>.mp4</filecontainer>
</metadt>
<enodingparam>
<videocodec arg="-vcodec">libx264</videocodec>
<videopreset arg="-vpre">slow</videopreset>
<videobitrate arg="-b">1200k</videobitrate>
<videowidth arg="-w">640</videowidth>
<videoheight arg="-h">360</videoheight>
<videosize arg="-s">640x360</videosize>
<videoframerate arg="-r">25</videoframerate>
<videogop arg="-g">90</videogop>
<audiobitrate arg="-ab">96k</audiobitrate>
<audiocodec arg="-acodec">libfaac</audiocodec>
<audiochannels arg="-ac">2</audiochannels>
<audiorate arg="-ar">22050</audiorate>
</enodingparam>
</profile>
</profiles>Modified the pl script to
use warnings;
use strict;
use Data::Dumper;
use XML::LibXML;
my $filename = "xml/book.xml";
my $parser = XML::LibXML->new;
my @ffmpegargs;
my $fileName="filename";
my $doc = $parser->parse_file($filename)
or die "can't parse profile file: $@";
my $root = $doc->documentElement();
my @paramList = $doc->getElementsByTagName('enodingParam');
for my $ele (@paramList)
{
# You then need to iterate over all the children of that node...
for my $param ($ele->nonBlankChildNodes())
{
my $inparams = " " . $param->getAttribute('arg') . " " . $param->textContent ;
push ( @ffmpegargs, $inparams);
}
my $ffmpeg = join(" ", @ffmpegargs);
print "ffmpeg" . $ffmpeg, "\n";
}It is printing out correctly. Now how do i add the following to the string
$filename , profileName, containerName (from the metadat node) to the same string so that my final output looks like :ffmpeg -vcodec libx264 -vpre slow -b 1200k -w 640 -h 360 -s 640x360 filename_profileName_containerName
ok tried zooming ue to profile. Not sure how to traverse the child nodes. Tried this. But its nor printing the right values
use warnings;
use strict;
use Data::Dumper;
use XML::LibXML;
my $filename = "xml/book.xml";
my $parser = XML::LibXML->new;
my @ffmpegargs;
my $fileName="filename";
my $doc = $parser->parse_file($filename)
or die "can't parse profile file: $@";
my $root = $doc->documentElement();
my @paramList = $doc->getElementsByTagName('profile');
for my $ele (@paramList)
{
# You then need to iterate over all the children of that node...
for my $param ($ele->findnodes('/encodingParam/*'))
{
my $inparams = " " . $param->getAttribute('arg') . " " . $param->textContent ;
push ( @ffmpegargs, $inparams);
}
my $ffmpeg = join(" ", @ffmpegargs);
print "ffmpeg" . $ffmpeg, "\n";
} -
Record sound with ffmpeg on ubuntu 12.04 [closed]
27 juin 2012, par vzybillyI have been working for a few days on trying to get ffmpeg to record sound, a short list of what I've tried :
#Crappy screen grab
#ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -f mp4 ./out
#awesome screen grab, grabbing sound but non out.
#ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -f alsa -ac 2 -i pulse -vcodec libx264 -s "1366x768" -acodec libmp3lame -ab 128k -threads 0 -f mp4 ~/Desktop/vid
#audio test, no audio in file.
#ffmpeg -f alsa -ac 2 -i pulse -acodec libmp3lame -ab 128k -threads 0 -f mp3 ./test.mp3
#awesome screen grab.
#ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -threads 0 -sameq -an -f mp4 ~/Desktop/vid[/CODE]I'm running ubuntu 12.04 from beta(ish)it would be awesome if someone could help me get this to work all in one line or (the way i'm going) multiple instances of ffmpeg (screen grab, microphone, program)
I have also tried the pavucontrol with doing the monitoring of when recording audio, but that does not help either.
Thanks for all of your help, vzybilly
EDIT :
This one crashed.$ ffmpeg -f alsa -ac 2 -i plughw:0,0 -f x11grab -r 100 -s 1366x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -threads 3 testVid.mkv
ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Jun 12 2012 16:37:58 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[alsa @ 0x8fce240] capture with some ALSA plugins, especially dsnoop, may hang.
[alsa @ 0x8fce240] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'plughw:0,0':
Duration: N/A, start: 433.999945, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[x11grab @ 0x8fde820] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 768
[x11grab @ 0x8fde820] shared memory extension found
[x11grab @ 0x8fde820] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0':
Duration: N/A, start: 1340805516.368518, bitrate: N/A
Stream #1.0: Video: rawvideo, bgra, 1366x768, -2147483 kb/s, 100 tbr, 1000k tbn, 100 tbc
File 'testVid.mkv' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0x8fde700] w:1366 h:768 pixfmt:bgra
[avsink @ 0x8fcdf20] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x8ff3ce0] w:1366 h:768 fmt:bgra -> w:1366 h:768 fmt:yuv420p flags:0x4
[libx264 @ 0x8fdd920] lookaheadless mb-tree requires intra refresh or infinite keyint
[libx264 @ 0x8fdd920] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x8fdd920] profile Constrained Baseline, level 4.2
[libx264 @ 0x8fdd920] 264 - core 120 r2151 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=0
Output #0, matroska, to 'archinstall4.mkv':
Metadata:
encoder : Lavf53.21.0
Stream #0.0: Video: libx264, yuv420p, 1366x768, q=-1--1, 1k tbn, 100 tbc
Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press ctrl-c to stop encoding
[alsa @ 0x8fce240] ALSA buffer xrun.
[matroska @ 0x8fcd980] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 213 >= 213
av_interleaved_write_frame(): Invalid argumentAny thoughts ?
EDIT & ANSWER :
Got it all working with a script :#!/bin/bash
#vzybilly
#these are temp files
aud="aud.mp3"
vid="vid.mp4"
#grab audio & pid
ffmpeg -f alsa -ac 2 -i plughw:0,0 $aud &
audPID=$!
#grab screen & pid
ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -threads 0 -sameq -an -f mp4 $vid &
vidPID=$!
#wait, till name given (that means stop)
read -p "Stop by giving an Output video name?" out
#stop audio and video with pids
kill -n 2 $audPID
kill -n 2 $vidPID
echo "$out"
#combine to the target output file
ffmpeg -i $aud -i $vid -acodec copy -vcodec copy "$out"
#purge the temp files
rm $aud
rm $vid -
MPEG-4 and alpha transparency - the ongoing saga
16 janvier 2016, par OrangeDogI’d like to reach some sort of definitive answer for the following questions :
- Is alpha transparency supported in MPEG-4-based codecs ?
- Is there any way to be reasonably certain that there is no alpha-channel from the output of
ffprobe
?
Some links I’ve found on the subject :
Also, transparent alpha layers, an optional part of the H.264 specification, are now supported in H.264-based QuickTime movies.
The support for alpha channel in the H.264 decoder is now available in Intel® Integrated Performance Primitives 6.0 version.
The MPEG4 Simple Studio Profile supports auxiliary channels, which could be used for alpha or depth — and presumably even displacement, motion vectors, normals, etc.
However, I’ve never seen a concrete example, or indeed any details on how you use these announced features.