Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

Sur d’autres sites (12957)

  • Noobs approach to automate x264 cmd

    16 novembre 2012, par nightcrawler

    so here is my script to loop through specific video extensions » add a manual profile » generate necessary *.bat & finally a final 'loader' batch file to execute previous *.bat files sequentially & necessary logging (this gives quiet a deal of freedom if you so want)

    ::==
    :: gets lines into vars c1 v2 v...
    @echo off
    :: user input required
    cd /d "d:\Trainers\out\"
    setLocal EnableDelayedExpansion
    dir /B /O:N | findstr ".wmv$ " >filename.txt
    echo. >log.txt
    :: user input required
    for /f "tokens=* delims= " %%a in ('type filename.txt ^|findstr ".wmv$"') do (
    set /a n+=1
    echo. >file!n!.bat
    set in=%in%%%a
    :: user input required
    set out=!in:.wmv=.mp4!
    :: user input required
    set v=x264 --crf 23  --level 3.1 --tune film -o "d:\Trainers\out\!in!" "d:\Trainers\out\!out!"
    echo. !v!>file!n!.bat
    )
    dir /B /O:N | findstr ".bat$ " >x264_home.txt
    for /f "tokens=* delims= " %%a in (x264_home.txt) do (
    set /a n+=1
    :: mtee is an external library Google it
    set "z=call %%a | mtee /d/c/t/+ log.txt"
    echo. !z! >> x264_home.bat
    )
    echo. @echo off > newFile.bat
    type x264_home.bat >> newFile.bat
    type newFile.bat > x264_home.bat
    del newFile.bat,x264_home.txt,filename.txt
    echo. pause >> x264_home.bat
    echo. @echo All Operation done... >> x264_home.bat
    :: user input required
    move "d:\Trainers\out\*.bat" "d:\Program Files\x264_auto\test\"
    :: user input required
    move "d:\Trainers\out\log.txt" "d:\Program Files\x264_auto\test\"
    ::==

    Now the above code which is fairly easy to understand (bcz its written by a noob) run perfectly & create necessary files. For instance one of the file1.bat looks like this :

    x264 --crf 23  --level 3.1 --tune film --preset veryslow --deblock -2:-1 --zones 24233,25324,q=20 --acodec aac --abitrate 80 -o "d:\Trainers\out\1.wmv" "d:\Trainers\out\1.mp4"

    ...& the loader .bat file looks like

    @echo off
    call file1.bat | mtee /d/c/t/+ log.txt
    call file2.bat | mtee /d/c/t/+ log.txt
    call file3.bat | mtee /d/c/t/+ log.txt
    @echo All Operation done...

    You see this is a quiet flexible approach in that you can use special filestr » set another loop » set another profile. Furthermore every batch file can be latter edited especiialy when you heavily use --zone x264 feature
    I am successful because there is no error in any output ...but its the x264.exe (provider/compiler x264GUI) throws error which it otherwise don't ?

    d:\Program Files\x264_auto\test>x264 --crf 23  --level 3.1 --tune film --preset
    veryslow --deblock -2:-1 --zones 24233,25324,q=20 --acodec aac --abitrate 80 -o
    "d:\Trainers\out\1.wmv" "d:\Trainers\out\1.mp4"
    ffms [error]: could not create index
    lavf [error]: could not open input file
    raw [error]: raw input requires a resolution.
    x264 [error]: could not open input file `d:\Trainers\out\1.mp4' via any method!

    its the x264 thats the culprit perhaps a senior guide is required here

  • Setting duration is not working in ffmpeg

    7 mai 2014, par Stepan

    Have problem with creating video from 50 png files in ffmpeg in shell.
    Setting duration -t 5 and fps -r 10

    ffmpeg -i image%d.png -y -pix_fmt yuv444p -r 10 -t 5 -s 1920:1080 out.mp4

    Final duration is 2 seconds and fps is 25.

    How to set it correctly ?

    I’m running at elementaryOS, ffmpeg version 0.8.10-4

    Thanks

  • Parsing xml with perl and libXML

    2 mai 2014, par user3589690

    I 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";
    }