Recherche avancée

Médias (91)

Autres articles (16)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (5714)

  • How to setup ffmpeg for CentOS release 6.5 server

    23 juillet 2015, par hitesh

    I need to create a screen shot from video,

    I have followed this tutorial to do the intial setup in window 8, php 5.3

    1) I downloaded the ffmpeg from here -[
    http://ffmpeg.zeranoe.com/builds/ ] for 64 bit operating system.

    2) I followed the https://www.youtube.com/watch?v=gU49GiWGGAI , video and did all configuration successfully and phpinfo() shows that ffmpeg has been installed.

    3) Then I tried this to find out whether it is working or not,

    It worked successfully

    4) Next I followed this video tutorial here and thumbnails were created successfully.

    below is my code

    /**
    * FFMPEG-PHP Test Script
    *
    * Special thanks to http://www.sajithmr.me/ffmpeg-sample-code for this code example!
    * See the tutorial at http://myownhomeserver.com on how to install ffmpeg-php.
    */
    error_reporting(1);
    error_reporting(E_ALL ^ E_NOTICE);
    // Check if the ffmpeg-php extension is loaded first
    extension_loaded('ffmpeg') or die('Error in loading ffmpeg');

    // Determine the full path for our video
    $vid = realpath('./videos/myvideo.mp4');
    $videosize = filesize($vid);
    $remoteVideo = 'http://video-js.zencoder.com/oceans-clip.mp4';

    //ffmpeg

    $ffmpeg = dirname(__FILE__) . "\\ffmpeg\\bin\\ffmpeg";
    $imageFile = "1.png";
    $image2 = "2.png";
    $size = "120x90";
    $getfromsecond = 7;
    $cmd = "$ffmpeg -i $vid -an -ss $getfromsecond -s $size $imageFile";
    $cmd2 = "$ffmpeg -i $remoteVideo -an -ss $getfromsecond -s $size $image2";
    if(!shell_exec($cmd)){
       echo "Thumbnail created";
    }else{
       echo "Error Creating thumbnail";
    }

    if(!shell_exec($cmd2)){
       echo "Thumbnail for remote url was created";
    }else{
       echo "Error Creating thumbnail for remote url ";
    }

     OUTPUT
       Thumbnail created
       Thumbnail for remote url was created

    Now above code works as expected in my local, in window machine , I need to do it in my server environment(Linux server) with php 5.5. How do I do the configuration for ffmpeg in CentOS release 6.5 server with php 5.5.

    I have followed this tutorial to install it in server

    1.http://supportlobby.com/blog/ffmpeg-installation-on-centos-6-5/

    2.http://tecadmin.net/install-ffmpeg-on-linux/

    OUTPUT IN CONSOLE

    [root@BRANDWEB01D ~]# ffmpeg -version
    ffmpeg version 2.2.1
    built on Apr 13 2014 13:00:18 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv --enable-libdc1394 --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping
    libavutil      52. 66.100 / 52. 66.100
    libavcodec     55. 52.102 / 55. 52.102
    libavformat    55. 33.100 / 55. 33.100
    libavdevice    55. 10.100 / 55. 10.100
    libavfilter     4.  2.100 /  4.  2.100
    libswscale      2.  5.102 /  2.  5.102
    libswresample   0. 18.100 /  0. 18.100
    libpostproc    52.  3.100 / 52.  3.100
    [root@BRANDWEB01D ~]# which ffmpeg
    /usr/bin/ffmpeg
    [root@BRANDWEB01D ~]# ffmpeg -formats
    ffmpeg version 2.2.1 Copyright (coffee) 2000-2014 the FFmpeg developers
     built on Apr 13 2014 13:00:18 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv --enable-libdc1394 --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping
     libavutil      52. 66.100 / 52. 66.100
     libavcodec     55. 52.102 / 55. 52.102
     libavformat    55. 33.100 / 55. 33.100
     libavdevice    55. 10.100 / 55. 10.100
     libavfilter     4.  2.100 /  4.  2.100
     libswscale      2.  5.102 /  2.  5.102
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    File formats:
    D. = Demuxing supported
    .E = Muxing supported

    But in server when I open my php file I am getting this error Error in loading ffmpeg

    Also I have checked phpinfo(), It shows ffmpeg installed in my local but not in server.

    What else I need to do to configure ffmpeg in Cent Os 6.5 php 5.5.

  • Meteor edit audio files on the server

    28 décembre 2015, par Mohammed Hussein

    I am building a Meteor application to split uploaded audio files
    I upload the audio files and store them using GridFS

    child = Npm.require(’child_process’) ;

    var fs = Npm.require('fs');


    storagePath= fs.realpathSync(process.env.PWD+'/audio');
    StaticServer.add('/audio', clipsPath);

    and then using a method i split the audio file using
    child.exec(command) ;

    the command is the ffmpeg command used to cut the source audio file and store it on the storagePath

    the application worked fine locally but when I tried to deploy it to digital ocian i got errors , stating that the file /audio doesnot exist
    I use mupx to deploy and the error appears after "verifying deployment"

    here is the error

       -----------------------------------STDERR-----------------------------------
       eteor-dev-bundle@0.0.0 No README data
       => Starting meteor app on port:80

       /bundle/bundle/programs/server/node_modules/fibers/future.js:245
                                                       throw(ex);
                                                             ^
       Error: ENOENT, no such file or directory '/bundle/bundle/audio'
           at Object.fs.lstatSync (fs.js:691:18)
           at Object.realpathSync (fs.js:1279:21)
           at server/startup.js:10:20
           at /bundle/bundle/programs/server/boot.js:249:5
       npm WARN package.json meteor-dev-bundle@0.0.0 No description
       npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
       npm WARN package.json meteor-dev-bundle@0.0.0 No README data
       => Starting meteor app on port:80

       /bundle/bundle/programs/server/node_modules/fibers/future.js:245
                                                       throw(ex);
                                                             ^
       Error: ENOENT, no such file or directory '/bundle/bundle/audio'
           at Object.fs.lstatSync (fs.js:691:18)
           at Object.realpathSync (fs.js:1279:21)
           at server/startup.js:10:20
           at /bundle/bundle/programs/server/boot.js:249:5

       => Redeploying previous version of the app

       -----------------------------------STDOUT-----------------------------------

       To see more logs type 'mup logs --tail=50'

       ----------------------------------------------------------------------------

    the main quistion is , how to i generate an output file using ffmpeg command and store it in a place where I can access it and display it on the browser

  • Streaming issues with HLS setup using Nginx and FFmpeg, and TS video files

    12 septembre 2024, par Jacob Anderson

    I've been working on setting up an HLS stream on my Raspberry Pi to broadcast video from a security camera that's physically connected to my Raspberry Pi through my web server, making it accessible via my website. The .ts video files and the .m3u8 playlist are correctly being served from /var/www/html/hls. However, when I attempt to load the stream on Safari (as well as other browsers), the video continuously appears to be loading without ever displaying any content.

    


    Here are some details about my setup :

    


      

    • Camera : I am using an Arducam 1080p Day & Night Vision USB Camera which is available on /dev/video0.
    • 


    • Server Configuration : I haven't noticed any errors in the Safari console or on the server logs. When I access the .ts files directly from the browser, they only show a black screen but they do play.
    • 


    


    Given the situation, I suspect there might be an issue with my FFmpeg command or possibly with my Nginx configuration.

    


    Here is what I have :

    


    ffmpeg stream service :
/etc/systemd/system/ffmpeg-stream.service

    


    [Unit]
Description=FFmpeg RTMP Stream
After=network.target

[Service]
ExecStart=/usr/local/bin/start_ffmpeg.sh
Restart=always
User=jacobanderson
Group=jacobanderson
StandardError=syslog
SyslogIdentifier=ffmpeg-stream
Environment=FFMPEG_LOGLEVEL=error

[Install]
WantedBy=multi-user.target


    


    ffmpeg command :
/usr/local/bin/start_ffmpeg.sh

    


    #!/bin/bash

/usr/bin/ffmpeg -f v4l2 -input_format mjpeg -video_size 1280x720 -framerate 30 -i /dev/video0 -vcodec libx264 -preset veryfast -acodec aac -strict -2 -f flv rtmp://localhost/live/


    


    nginx.conf :
/etc/nginx/nginx.conf

    


    user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    # multi_accept on;
}

rtmp {
    server {
        listen 1935;
        chunk_size 4096;
        #allow publish 127.0.0.1;
        #deny publish all;

    application live {
        #allow 192.168.0.100;
        live on;
        hls on;
        hls_path /var/www/html/hls;
        hls_fragment 3;
        hls_nested on; 
        #hls_fragment_naming stream;
        hls_playlist_length 120;
        hls_cleanup on;
        hls_continuous on;
        #deny play all;
    }
    }
}

http {
    ##
    # Basic Settings
    ##

    sendfile on;
    #sendfile off;
    tcp_nopush on;
    types_hash_max_size 2048;
    # server_tokens off;

    # Additional for video
    directio 512;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
    #ssl_protocols TLSv1.2 TLSv1.3; # Use only secure protocols
    ssl_prefer_server_ciphers on;
    #ssl_ciphers "HIGH:!aNULL:!MD5";

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    #gzip on;
    gzip off;  # Ensure gzip is off for HLS

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}


    


    sites-available :
/etc/nginx/sites-available/myStream.mysite.com

    


    server {
    listen 443 ssl;
    server_name myStream.mysite.com;

    ssl_certificate /etc/letsencrypt/live/myStream.mysite.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/myStream.mysite.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        root /var/www/html/hls;
        index index.html;
    }

    location /hls {
        # Password protection
        auth_basic "Restricted Content";
        auth_basic_user_file /etc/nginx/.htpasswd;

        # Disable cache
        add_header Cache-Control no-cache;

        # CORS setup
        add_header 'Access-Control-Allow-Origin' '*' always;
        add_header 'Access-Control-Expose-Headers' 'Content-Length';

        # Allow CORS preflight requests
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain charset=UTF-8';
            add_header 'Content-Length' 0;
            return 204;
        }

        types {
            application/vnd.apple.mpegurl m3u8;
            video/mp2t ts;
        text/html html;
        text/css css;
        }

    root /var/www/html;
    }
}

server {
    listen 80;
    server_name myStream.mysite.com;

    if ($host = myStream.mysite.com) {
        return 301 https://$host$request_uri;
    }

    return 404; # managed by Certbot
}


    


    index.html :
/var/www/html/hls/index.html

    


    &#xA;&#xA;&#xA;    &#xA;    &#xA;    &#xA;    &#xA;    <code class="echappe-js">&lt;script src='http://stackoverflow.com/feeds/tag/js/hls.min.js'&gt;&lt;/script&gt;&#xA;&#xA;&#xA;    &#xA;        &#xA;    &#xA;    &#xA;&#xA;    &lt;script src=&quot;https://vjs.zencdn.net/7.10.2/video.js&quot;&gt;&lt;/script&gt;&#xA;    &lt;script&gt;&amp;#xA;        if (Hls.isSupported()) {&amp;#xA;            var video = document.getElementById(&amp;#x27;my-video_html5_api&amp;#x27;); // Updated ID to target the correct video element&amp;#xA;            var hls = new Hls();&amp;#xA;            hls.loadSource(&amp;#x27;https://myStream.mysite.com/hls/index.m3u8&amp;#x27;);&amp;#xA;            hls.attachMedia(video);&amp;#xA;            hls.on(Hls.Events.MANIFEST_PARSED,function() {&amp;#xA;                video.play();&amp;#xA;            });&amp;#xA;        } else if (video.canPlayType(&amp;#x27;application/vnd.apple.mpegurl&amp;#x27;)) {&amp;#xA;            video.src = &amp;#x27;https://myStream.mysite.com/hls/index.m3u8&amp;#x27;;&amp;#xA;            video.addEventListener(&amp;#x27;loadedmetadata&amp;#x27;, function() {&amp;#xA;                video.play();&amp;#xA;            });&amp;#xA;        }&amp;#xA;    &lt;/script&gt;&#xA;&#xA;&#xA;

    &#xA;

    Has anyone experienced similar issues or can spot an error in my configuration ? Any help would be greatly appreciated as I have already invested over 30 hours trying to resolve this.

    &#xA;