Recherche avancée

Médias (91)

Autres articles (47)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (8645)

  • ffmpeg : mute first 2 seconds in all audio streams

    10 avril 2015, par Tony

    Looking to edit a blip out of the beginning of a video/audio file :

    • How can I use ffmpeg to only edit the first two seconds of the clip so that there’s no longer that blip in the audio ?

    • How do I ensure that all 7 audio tracks are affected by the audio filter ?

    • How do I ensure that all 7 are also present in my output file in the same input specs ?

    Complete output :

    ffmpeg -i ~/Downloads/in.mov  -vcodec copy -acodec pcm_s24le -q:a 0 -af "volume=enable='between(t,0,3)':volume=0"  ~/Downloads/out2.mov
    ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Guessed Channel Layout for  Input Stream #0.1 : mono
    Guessed Channel Layout for  Input Stream #0.2 : mono
    Guessed Channel Layout for  Input Stream #0.3 : mono
    Guessed Channel Layout for  Input Stream #0.4 : mono
    Guessed Channel Layout for  Input Stream #0.5 : mono
    Guessed Channel Layout for  Input Stream #0.6 : mono
    Guessed Channel Layout for  Input Stream #0.7 : stereo
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '~/Downloads/in.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       creation_time   : 2014-01-16 18:02:27
     Duration: 00:00:06.44, start: 0.000000, bitrate: 119128 kb/s
       Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709), 1920x1080, 109843 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
         encoder         : Apple ProRes 422 (HQ)
         timecode        : 01:00:00;00
       Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
       Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
       Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
       Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
       Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
       Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
       Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
       Stream #0:8(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:28
         handler_name    : Apple Alias Data Handler
         timecode        : 01:00:00;00
    File '~/Downloads/out2.mov' already exists. Overwrite ? [y/N] y
    Output #0, mov, to '~/Downloads/out2.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       encoder         : Lavf56.25.101
       Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 109843 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 2997 tbc (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
         encoder         : Apple ProRes 422 (HQ)
         timecode        : 01:00:00;00
       Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
       Metadata:
         creation_time   : 2014-01-16 18:02:27
         handler_name    : Apple Alias Data Handler
         encoder         : Lavc56.26.100 pcm_s24le
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:7 -> #0:1 (pcm_s24le (native) -> pcm_s24le (native))
    Press [q] to stop, [?] for help
    frame=  193 fps=109 q=-1.0 Lsize=   88166kB time=00:00:06.43 bitrate=112155.7kbits/s    
    video:86349kB audio:1811kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.006946%
  • FFmpeg meaningful video thumbnails

    18 avril 2015, par Maverick

    I know this question has been discussed already here. However, it did not solve the problem completely. I trying to retrieve meaning thumbnails from video and while executing the following command.

    ffmpeg -ss 3 -i input.avi -vf "select=gt(scene\,0.4)" -frames:v 5 -vsync vfr -vf "fps=fps=1/600" out%02d.jpg

    As a result, I am only able to get 1 image out of this video. I am not sure, what is going wrong over here.

    Also, it would be great, if someone kindly give a quick explanation of this command parameters and filters. The command originally comes from here

    FFMPEG console output :

    ffmpeg version 2.6 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 ' --enable-nonfree --enable-vda
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, avi, from 'tagesschau.avi':
     Metadata:
       encoder         : Lavf56.25.101
     Duration: 00:00:20.03, start: 0.000000, bitrate: 4357 kb/s
       Stream #0:0: Video: mpeg4 (Simple Profile) (xvid / 0x64697678), yuv420p, 720x540 [SAR 1:1 DAR 4:3], 4190 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
       Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 44100 Hz, stereo, fltp, 160 kb/s
    [swscaler @ 0x7fcb2a00f600] deprecated pixel format used, make sure you did set range correctly
    [mjpeg @ 0x7fcb2a803c00] bitrate tolerance 4000000 too small for bitrate 200000, overriding
    Output #0, image2, to 'out%02d.jpg':
     Metadata:
       encoder         : Lavf56.25.101
       Stream #0:0: Video: mjpeg, yuvj420p(pc), 720x540 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 0k fps, 0k tbn, 0k tbc
       Metadata:
         encoder         : Lavc56.26.100 mjpeg
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg4 (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=6.9 Lsize=N/A time=00:10:00.00 bitrate=N/A    
    video:44kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
  • ffmpeg not working on Asp.net MVC

    9 avril 2015, par Faisal Mq

    I am using ffmpeg to extract thumbnails from video files and also to get their durations.
    The code works absolutely fine in Console Application, but when I use it on Asp.Net MVC 3, it does not work at all.

    I have placed ffmpeg.exe file on my application’s root folder and set its property "Copy to Output Directory" to "Copy Always"

    ffmpeg file gets placed in my application’s Bin folder after that I compile my project but it is not doing anything. It does not give me any error but also does not giving me my intended results, which are otherwise working absolutely fine in a Console application.

    [NOTE] In QuickWatch when I see the value for "output" on statement :

    string output = SROutput.ReadToEnd();

    ffmpeg shows me following output but this output does not include Duration info like it does in Console application.

    ffmpeg version N-69422-gf5722ba Copyright (c) 2000-2015 the FFmpeg developers
     built on Jan 30 2015 22:13:10 with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
     libavutil      54. 18.100 / 54. 18.100
     libavcodec     56. 21.101 / 56. 21.101
     libavformat    56. 19.100 / 56. 19.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5.  9.102 /  5.  9.102
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100

    I am pasting here the code that I am using just to get the duration of a media file using ffmpeg.

    private static TimeSpan GetVideoDurationByFFMPEG(string ffmpegPath, string filepath)
           {
               string param = string.Format("-i \"{0}\"", filepath);

               System.Text.RegularExpressions.Regex re = null;
               System.Text.RegularExpressions.Match m = null;
               TimeSpan Duration = new TimeSpan();

               //Get ready with ProcessStartInfo
               ProcessStartInfo oInfo = new ProcessStartInfo(ffmpegPath, param);
               oInfo.CreateNoWindow = true;

               //ffMPEG uses StandardError for its output.
               oInfo.RedirectStandardError = true;
               oInfo.WindowStyle = ProcessWindowStyle.Hidden;
               oInfo.UseShellExecute = false;

               // Lets start the process

               Process mProcess = Process.Start(oInfo);

               // Divert output
               StreamReader SROutput = mProcess.StandardError;

               // Read all
               string output = SROutput.ReadToEnd();

               //get duration

               re = new System.Text.RegularExpressions.Regex("[D|d]uration:.((\\d|:|\\.)*)");
               m = re.Match(output);

               if (m.Success)
               {
                   //Means the output has cantained the string "Duration"
                   string temp = m.Groups[1].Value;
                   string[] timepieces = temp.Split(new char[] { ':', '.' });
                   if (timepieces.Length == 4)
                   {

                       // Store duration
                       Duration = new TimeSpan(0, Convert.ToInt16(timepieces[0]), Convert.ToInt16(timepieces[1]), Convert.ToInt16(timepieces[2]), Convert.ToInt16(timepieces[3]));
                   }
               }

               mProcess.Close();

               return Duration;
           }

    Please someone guide me where I am getting wrong.