Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (66)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (5422)

  • Is there any way to edit just the track data of an AVI file, like mkvpropedit does with MKV files ?

    20 juillet 2016, par hmj6jmh

    I am trying to swap the order of 2 audio tracks of an AVI file using ffmpeg.

    ffmpeg -i "infile.avi" -map 0:0 -map 0:2 -map 0:1 -c copy "outfile.avi"

    This works but the file is being re-encoded, not copied. It takes much longer than a straight copy to finish and the resulting file is larger than the original.

    Is there any way to edit just the track data of an AVI file, like mkvpropedit does with MKV files ? Command line tool preferred.

    General
    Complete name                            : infile.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 451 MiB
    Duration                                 : 43mn 11s
    Overall bit rate                         : 1 460 Kbps
    Writing application                      : VirtualDubMod 1.5.10.2 (build 2540/release)
    Writing library                          : VirtualDubMod build 2540/release

    Video
    ID                                       : 0
    Format                                   : MPEG-4 Visual
    Format profile                           : Advanced Simple@L5
    Format settings, BVOP                    : 3
    Format settings, QPel                    : No
    Format settings, GMC                     : No warppoints
    Format settings, Matrix                  : Default (MPEG)
    Muxing mode                              : Packed bitstream
    Codec ID                                 : XVID
    Codec ID/Hint                            : XviD
    Duration                                 : 43mn 11s
    Bit rate                                 : 1 190 Kbps
    Width                                    : 656 pixels
    Height                                   : 368 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 23.976 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.206
    Stream size                              : 367 MiB (82%)
    Writing library                          : XviD 1.2.1 (UTC 2008-12-04)

    Audio #1
    ID                                       : 1
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Codec ID                                 : 55
    Codec ID/Hint                            : MP3
    Duration                                 : 43mn 11s
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel count                            : 2 channels
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 39.5 MiB (9%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 42 ms (1.00 video frame)
    Interleave, preload duration             : 504 ms
    Writing library                          : LAME3.98r
    Encoding settings                        : -m s -V 4 -q 2 -lowpass 17 -b 128

    Audio #2
    ID                                       : 2
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Codec ID                                 : 55
    Codec ID/Hint                            : MP3
    Duration                                 : 43mn 11s
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel count                            : 2 channels
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 39.5 MiB (9%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 42 ms (1.00 video frame)
    Interleave, preload duration             : 504 ms
    Writing library                          : LAME3.98r
    Encoding settings                        : -m s -V 4 -q 2 -lowpass 17 -b 128

    $ ffmpeg -i "infile.avi" -map 0:0 -map 0:2 -map 0:1 -c copy "outfile.avi"
    ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libsnappy --enable-libfontconfig --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libass --enable-ffplay --enable-libssh --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-openssl --enable-libopus --enable-frei0r --enable-libcaca --enable-libsoxr --enable-libvidstab --enable-libx265 --enable-libwebp --enable-libbs2b --enable-librubberband --enable-libopenh264 --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 --enable-nonfree --enable-vda
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 48.101 / 57. 48.101
     libavformat    57. 41.100 / 57. 41.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 47.100 /  6. 47.100
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, avi, from 'infile.avi':
     Metadata:
       encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
     Duration: 00:44:03.10, start: 0.000000, bitrate: 1434 kb/s
       Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 656x368 [SAR 1:1 DAR 41:23], 1164 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
       Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
       Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
    [avi @ 0x7f826b03d200] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
       Last message repeated 2 times
    Output #0, avi, to 'outfile.avi':
     Metadata:
       ISFT            : Lavf57.41.100
       Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 656x368 [SAR 1:1 DAR 41:23], q=2-31, 1164 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
       Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, 128 kb/s
       Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:2 -> #0:1 (copy)
     Stream #0:1 -> #0:2 (copy)
    Press [q] to stop, [?] for help
    [avi @ 0x7f826b03d200] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    frame=63371 fps=1830 q=-1.0 Lsize=  465060kB time=00:44:03.10 bitrate=1441.4kbits/s speed=76.3x    
    video:375760kB audio:82597kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.462486%

    infile.avi 474 MB

    outfile.avi 476.2 MB

  • PHP-FFMpeg not converting (error with ffmpeg)

    13 août 2016, par Magurean Dan Sergiu

    I have installed ffmpeg server side with all the dependencies, updated it. And then installed PHP-FFMpeg with Composer. Tested that ffmpeg is instaled with a ssh conexion.

    root@host [/opt/ffmpeg]# ffmpeg
    ffmpeg version N-81322-ge8b355a Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
    configuration: --disable-yasm
    libavutil      55. 28.100 / 55. 28.100
    libavcodec     57. 51.100 / 57. 51.100
    libavformat    57. 46.100 / 57. 46.100
    libavdevice    57.  0.102 / 57.  0.102
    libavfilter     6. 51.100 /  6. 51.100
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  1.100 /  2.  1.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]     outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'

    But when I try to convert a video file with a php script it throws me a very long error.
    PHP Code :

    <?PHP
    include($_SERVER['DOCUMENT_ROOT']."/vendors/install/vendor/autoload.php");
    $ffmpeg = FFMpeg\FFMpeg::create();
    $video = $ffmpeg->open($_SERVER['DOCUMENT_ROOT'].'/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.wmv');
    $video
          ->filters()
          ->synchronize();
    $format = new FFMpeg\Format\Video\X264();
    $format->on('progress', function ($video, $format, $percentage) {
       echo "$percentage % transcoded";});
    $video
         ->save($format,$_SERVER['DOCUMENT_ROOT'].'/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.mp4');
    ?>

    Error displayed :

    <b>Fatal error</b>:  Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutionFailureException' with message 'ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57ad320a1b685j794u/pass-57ad320a1b716' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.mp4'' in /home/user/working/vendors/install/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:100↵Stack trace:↵#0 /home/user/working/vendors/install/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(72): Alchemy\BinaryDriver\ProcessRunner-&amp;gt;doExecutionFailure(''/usr/bin/ffmpe...')↵#1 / in <b>/home/user/working/vendors/install/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Video.php</b> on line <b>168</b><br />↵"

    Then I have took the basic code displayed upwards and ran it directly through ssh.

    '/usr/local/bin/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57ad320a1b685j794u/pass-57ad320a1b716' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.mp4'

    And this is the response I get :

    ffmpeg version N-81322-ge8b355a Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
     configuration: --disable-yasm
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 51.100 / 57. 51.100
     libavformat    57. 46.100 / 57. 46.100
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 51.100 /  6. 51.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, asf, from '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv':
     Metadata:
       SfOriginalFPS   : 299700
       WMFSDKVersion   : 11.0.6001.7000
       WMFSDKNeeded    : 0.0.0.0000
       comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
       title           : Wildlife in HD
       copyright       : © 2008 Microsoft Corporation
       IsVBR           : 0
       DeviceConformanceTemplate: AP@L3
     Duration: 00:00:30.09, start: 0.000000, bitrate: 6977 kb/s
       Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 192 kb/s
       Stream #0:1(eng): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
    Unknown encoder 'libx264'

    My question is what to do next ? I have wasted 3 days to make this work and this is the furthest I have come. How can I test if libx264 is installed corectly ? And if it is not installed corectly how cand I reinstal or make it work ?

  • ffmpeg extracting frames from video

    22 novembre 2017, par TheOtherguyz4kj

    I am using Writingminds FFmpeg to use FFmpeg with Android. I am currently trying to extract frames from a video.

    I would like to extract 8 frames from the video evenly distributed throughout the video. I found this tutorial here is my implementation of it.

    MediaMetadataRetriever retriever = new MediaMetadataRetriever();
       retriever.setDataSource(videoCroppedFile.getAbsolutePath());
       String time = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
       Long videoLength = Long.parseLong(time);


    final String cmd[] = {

               "-i",
               videoCroppedFile.getAbsolutePath(),
               "-f",
               "image2",
               "-ss",
               String.valueOf(videoLength.intValue() / ((8 + 1) * 10)),
               "-r",
               String.valueOf((8 + 1) / videoLength.intValue()),
               mediaStorageDir.getAbsolutePath() + "/%d.jpg"
       };

    However, when i go to the folder where the frames should be saved there isn’t anything there. Also there are no error messages.

    I feel like its a way this library takes the String parameters. I’ve been stuck on this for sometime I have tried lots of different versions of the cmd. I was hoping someone could help.

    Here is my output from ffmpeg :

    1-22 19:33:14.904 30981-30981/com.firebase.android D/videoFrames:  failure reason ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
            built with gcc 4.8 (GCC)
            configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
            libavutil      55. 17.103 / 55. 17.103
            libavcodec     57. 24.102 / 57. 24.102
            libavformat    57. 25.100 / 57. 25.100
            libavdevice    57.  0.101 / 57.  0.101
            libavfilter     6. 31.100 /  6. 31.100
            libswscale      4.  0.100 /  4.  0.100
            libswresample   2.  0.101 /  2.  0.101
            libpostproc    54.  0.100 / 54.  0.100
          Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.firebase.android/cache/videovgntp6q5ar4dglkaflaoobfpcv945824159.mp4':
            Metadata:
              major_brand     : isom
              minor_version   : 512
              compatible_brands: isomiso2avc1mp41
              encoder         : Lavf57.25.100
            Duration: 00:00:08.28, start: 0.000000, bitrate: 391 kb/s
              Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 720x764 [SAR 1:1 DAR 180:191], 132 kb/s, 16.67 fps, 16.67 tbr, 12800 tbn, 33.33 tbc (default)
              Metadata:
                handler_name    : VideoHandler
              Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
              Metadata:
                handler_name    : SoundHandler
          Invalid framerate value: 0

    Update 2

    Here is my Android code :

         try {
           ffmpeg.loadBinary(new LoadBinaryResponseHandler() {

               @Override
               public void onStart() {
                   Log.d("videoFrames", "starting to load binary");
               }

               @Override
               public void onFailure() {
                   Log.d("videoFrames", "failed to load binary");
               }

               @Override
               public void onSuccess() {
                   Log.d("videoFrames", "loaded binary");
                   try {
                       ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

                           @Override
                           public void onStart() {
                               Log.d("videoFrames", " starting to get frames from video");
                               if (mediaStorageDir.isDirectory() &amp;&amp; mediaStorageDir.list().length > 0) {
                                   String[] children = mediaStorageDir.list();
                                   for (int i = 0; i &lt; children.length; i++) {
                                       new File(mediaStorageDir, children[i]).delete();
                                   }
                               }
                           }

                           @Override
                           public void onProgress(String message) {
                               Log.d("videoFrames", " progress getting frames from video");
                           }

                           @Override
                           public void onFailure(String message) {
                               Log.d("videoFrames", " failed to get frames from video");
                               Log.d("videoFrames", " failure reason " + message);
                               Log.d("videoFrames", " ----------------------------------------------- ");
                           }

                           @Override
                           public void onSuccess(String message) {
                               Log.d("videoFrames", " success getting frames from video");
                           }

                           @Override
                           public void onFinish() {
                               Log.d("videoFrames", " finished getting frames from video");
                           }
                       });
                   } catch (FFmpegCommandAlreadyRunningException e) {
                       Log.d("videoFrames", " command already running in fmpeg");
                       e.printStackTrace();
                   }
               }

               @Override
               public void onFinish() {}
           });
       } catch (FFmpegNotSupportedException e) {
           // Handle if FFmpeg is not supported by device
       }

    Update 3

    I fixed my code by doing :

    final String cmd[] = {

               "-i",
               videoCroppedFile.getAbsolutePath(),
               "-f",
               "image2",
               "-ss",
               String.valueOf(videoLength.floatValue() / (8.0  * 10.0)),
               "-r",
               String.valueOf(8.0 / videoLength.floatValue()),
               mediaStorageDir.getAbsolutePath() + "/%d.jpg"
       };