Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (25)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

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

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

Sur d’autres sites (3790)

  • FFMPEG PHP enter command lines ?

    3 mai 2019, par Robert

    You will have to excuse me I have been spending the past 2 days reading through old FFMPEG posts for an answer but did little but confuse myself.
    It seems from what I read FFMPEG-PHP wrappers aren’t supported anymore ??? and to be honest they don’t seem like the proper way of learning how to incorporate it with PHP as there is a whole lot more help for command line FFMPEG usage and the FFMPEG-PHP wrapper usage looks nothing like the command line as far as I can tell.

    So I have 2 questions on using ffmpeg with PHP. So we are on the same page I posted a little info below.

    I downloaded FFMPEG static for windows 64bit.
    I then ran (in composer)

         $ composer require php-ffmpeg/php-ffmpeg

    in my vendor folder i have the following path.

       vendor\ffmpeg-20190429-ac551c5-win64-static\bin

    if I open the command prompt in that folder and type FFMPEG I get.

    ffmpeg version N-93710-gac551c54b1 Copyright (c) 2000-2019 the FFmpeg
    developers
    built with gcc 8.3.1 (GCC) 20190414
    configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
    fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
    libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --
    enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
    --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --
    enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
    --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --
    enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
    libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
    --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --
    enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
    nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
    libavutil      56. 26.100 / 56. 26.100
    libavcodec     58. 52.100 / 58. 52.100
    libavformat    58. 27.103 / 58. 27.103
    libavdevice    58.  7.100 / 58.  7.100
    libavfilter     7. 50.100 /  7. 50.100
    libswscale      5.  4.100 /  5.  4.100
    libswresample   3.  4.100 /  3.  4.100
    libpostproc    55.  4.100 / 55.  4.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    So I’m pretty sure FFMPEG is installed which was my goal.

    Now on my PHP side here is where I am at, and I’m not sure how this works.

    1ST QUESTION. Do I need to save my $_POST files to the drive before manipulating them ? Or can I use the $file and $filep as is ? I don’t really want to store those files, only the output.

    My SLIM code.

    $app->post('/telestrator', function(Request $request, Response $response)
    {

    $response = array();

    if (isset ($_POST['ID']) && ($_POST['position']) && $_FILES['video']
    ['error'] === UPLOAD_ERR_OK && $_FILES['image']['error'] ===
    UPLOAD_ERR_OK) {

    $file = $_FILES['video']['tmp_name'];
    $filep = $_FILES['image']['tmp_name'];
    $time = $_POST['position'];
    $position = msToTime($time);
    $filetime = round(microtime(true) * 1000);
    $outputfolder = 'teletemp/';

    $ID = $_POST['ID'];

    $tempvid = $ID . 'tempvid' . 'mp4';
    $finalvid = $ID  . $filetime . 'mp4';


    $ffmpegpath = "public/ffmpeg.exe";

    echo "Starting ffmpeg...\n\n";
    echo shell_exec("$ffmpegpath -loop 1 -i $filep -c:v libx264 -t 3 -pix_fmt
    yuv420p \"$outputfolder.\" $tempvid /");
    echo shell_exec("$ffmpegpath -i $file -t $position -c copy
    \"$outputfolder\"
    small-1.mp4 -ss $position -codec copy \"$outputfolder\" small-2.mp4 ");
    echo shell_exec("$ffmpegpath -i small-1.mp4 -i $tempvid.mp4 -i small-
    2.mp4 \
    -filter_complex \"[0:v:0][1:v:0][2:v:0]concat=n=3:v=1:a=1[outv]\" \
    -map \"[outv]\" $finalvid" );
    echo "Done.\n";

    $upload = new videouploads();

           $desc = 'telestrated video for ' . $ID . $filetime;
           $ID = $_POST['ID'];  

           if ($upload->saveVideoFile($finalvid, getFileExtension($finalvid),
    $desc, $ID)) {
               $response['error'] = false;
               $response['message'] = 'File Uploaded Successfullly';
           }
        else {
           $response['error'] = true;
           $response['message'] = 'Required parameters are not available';
       }
       echo json_encode($response);
     }
    });

    function getFileExtension($file)
    {
    $path_parts = pathinfo($file);
    return $path_parts['extension'];
    }

    function msToTime($duration) {
    $seconds = floor($duration / 1000);
    $minutes = floor($seconds / 60);
    $hours = floor($minutes / 60);
    $milliseconds = $duration % 1000;
    $seconds = $seconds % 60;
    $minutes = $minutes % 60;

    $format = '%02u:%02u:%02u.%03u';
    $time = sprintf($format, $hours, $minutes, $seconds, $milliseconds);
    return rtrim($time, '0');

    }

    so it’s not running here is my postman. How do I get it to actually run the FFMPEG.

    Starting ffmpeg...

    Done.

    <br />
    <b>Notice</b>:  Undefined index: extension in
    <b>C:\xampp\htdocs\Pathways\public\index.php</b> on line
    <b>14741</b>
    <br />
    {"error":false,"message":"File Uploaded Successfullly"}
  • android : Merge two audio files to one using FFMPEG

    27 mars 2019, par Asif Sb

    I have been stuck from the past two days, couldn’t able to figure out what went wrong.

    Log.d(TAG, "doInBackground: wee");
    String s = "-i ["+fileName+"] -i ["+fileName3+"] -filter_complex amerge -ac 2 -c:a libmp3lame -q:a 4 ["+finalAudio+"]";
    String[] cmd=s.split(" ");
    mergeMediaFiles(RecordActivity.this,cmd);

    And I am getting the following error.

    2019-03-27 11:38:03.525 12912-13042/com.encrypt.audiorecord E/FFmpeg: Exception while trying to run: [Ljava.lang.String;@4bfef23
       java.io.IOException: Cannot run program "/data/user/0/com.encrypt.audiorecord/files/ffmpeg": error=2, No such file or directory
           at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
           at java.lang.Runtime.exec(Runtime.java:695)
           at java.lang.Runtime.exec(Runtime.java:560)
           at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10)
           at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38)
           at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10)
           at android.os.AsyncTask$2.call(AsyncTask.java:333)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
           at java.lang.Thread.run(Thread.java:764)
        Caused by: java.io.IOException: error=2, No such file or directory
           at java.lang.UNIXProcess.forkAndExec(Native Method)
           at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
           at java.lang.ProcessImpl.start(ProcessImpl.java:132)
           at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
           at java.lang.Runtime.exec(Runtime.java:695) 
           at java.lang.Runtime.exec(Runtime.java:560) 
           at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) 
           at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) 
           at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) 
           at android.os.AsyncTask$2.call(AsyncTask.java:333) 
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
           at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
           at java.lang.Thread.run(Thread.java:764) 
    </init>

    And I followed this link to integrate FFMPEG to the android app.

    Below is my mergeMediaFiles() method :

    public void mergeMediaFiles(Context context,String[] cmd) {
           FFmpeg ffmpeg = FFmpeg.getInstance(context);
           try {
               // to execute "ffmpeg -version" command you just need to pass "-version"
               ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

                   @Override
                   public void onStart() {
                   }

                   @Override
                   public void onProgress(String message) {
                   }

                   @Override
                   public void onFailure(String message) {
                   }

                   @Override
                   public void onSuccess(String message) {
                   }

                   @Override
                   public void onFinish() {
                   }
               });
           } catch (FFmpegCommandAlreadyRunningException e) {
               //
           }
       }

    And the path of all my files are from cacheDir

    fileName = getExternalCacheDir().getAbsolutePath();
           fileName += "/audiorecordtest.wav";
  • Evolution of Multimedia Fiefdoms

    1er octobre 2014, par Multimedia Mike — General

    I want to examine how multimedia fiefdoms have risen and fallen through the years.


    Medieval Castle

    Back in the day, the multimedia fiefdoms were built around the formats put forth by competing companies : there was Microsoft/WMV, Apple/MOV, and Real/RM as the big contenders. On2 always wanted to be a player in this arena but could never quite catch a break. A few brave contenders held the line for open source and also for the power users who desired one application that could handle everything (my original motivation for wanting to get into multimedia hacking).

    The computer desktop was the battleground for internet-based media stream. Whatever happened to those days ? Actually, if memory serves, Flash-based video streaming stepped on all of them.

    Over the last 6-7 years, the battleground has expanded to cover mobile devices, where Flash’s impact has… lessened. During this time, multimedia technology pretty well standardized on a particular stack, namely, the MPEG (MP4/H.264/AAC) stack.

    The belligerents in this war tried for years to effectively penetrate new territory, namely, the living room where the television lived. This had been slowgoing for years due to various user interface and content issues, but steadily improved.

    Last April, Amazon announced their entry into the set-top box market with the Fire TV. That was when it suddenly crystallized for me that the multimedia ecosystem has radically shifted. Now, the multimedia fiefdoms revolve around access to content via streaming services.

    Off the top of my head, here are some of the fiefdoms these days (fiefdoms I have experience using) :

    • Netflix (subscription streaming)
    • Amazon (subscription, rental, and purchased streaming)
    • Hulu Plus (subscription streaming)
    • Apple (rental and purchased media)

    I checked some results on Can I Stream.It ? (which I refer to often) and found a bunch more streaming fiefdoms such as Google (both Play and YouTube, which are separate services), Sony, Xbox 360, Crackle, Redbox Instant, Vudu, Target Ticket, Epix, Sony, SnagFilms, and XFINITY StreamPix. And surely, these are probably just services available in the United States ; I know other geographical regions have their own fiefdoms.

    What happened ?

    When I got into multimedia hacking, there were all these disparate, competing ecosystems. As a consumer, I didn’t care where the media came from, I just wanted to play it. That’s what inspired me to work on open source multimedia projects. Now I realize that I have the same problem 10-15 years later : there are multiple competing ecosystems. I might subscribe to fiefdoms X and Y, but am frustrated to learn that something I’d like to watch is only available through fiefdom Z. Very few of these fiefdoms can be penetrated using open source technology.

    I’m not really sure about the point about this whole post. Multimedia technology seems really standardized these days. But that’s probably just my perspective because I have spent way too long focusing on a few areas of multimedia technology such as audio and video coding. It’s interesting that all these services probably leverage the same limited number of codecs. Their differentiation comes from the catalog of content that each is able to license for streaming. There are different problems to solve in the multimedia arena now.