Recherche avancée

Médias (0)

Mot : - Tags -/albums

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

Autres articles (84)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • 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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11836)

  • How to concatenate video files from different sub directories using ffmpeg in win10 command prompt ?

    23 avril 2021, par raymerium

    How can I merge 1200 small mp4 files scattered in 60 subfolder, into one big file ?

    


    My IP Camera records and stores videos in 3 second video files.
An hour long recording is stored into 60 subfolders (one for each minute). And in each of those subfolder are 20 mp4 files. (one mp4 is 3 seconds)

    


    I found a way of doing it by having to copy each and every one of those small mp4 files into one main folder. Then use command prompt :

    


    (for %i in (*.mp4) do @echo file '%i') > mylist.txt       


    


    to make a list file

    


    then run :

    


    ffmpeg -f concat -i mylist.txt -c:v copy output2.mp4


    


    And this gets the job done. But is there any graceful way of doing it without having to copy paste all of the video files ?

    


  • ffmpeg converting from flv to mp4 format video audio syncronization error

    14 mars 2014, par m0ntana

    I stream to RTMP server some video and audio in FLV format.
    Something like this.

    /usr/local/bin/ffmpeg -i udp://@239.100.100.205:1234?fifo_size=5000000&overrun_nonfatal=1&timeout=10 -vcodec libx264 -crf 21 -tune zerolatency -preset ultrafast -x264opts keyint=80 -vf yadif -c:a libfdk_aac -ac 2 -metadata:s:a:1 language=Original -f flv rtmp://192.168.2.95:1935/streams/Stream1

    And sometimes I need to record this stream. Somelike that :

    /usr/local/bin/ffmpeg -i rtmp://127.0.0.1/MLekrh/Stream1 -c copy -vsync 1 -async 1 /usr/local/tv/records/573d400689b059856f242ead16cf4152.mp4

    But whatever I do to ffmpeg parameters, there is no video/audio sync. Audio if faster. Please, if anybody knows what is wrong, help me ?

    Thank you.

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