Recherche avancée

Médias (91)

Autres articles (92)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

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

Sur d’autres sites (9327)

  • (java.net.ProtocolException) Unable to stream video in video view. (Video which was trimmed using FFmpeg

    16 décembre 2020, par Suraj

    Hello I am using the below command to trim video using FFmpeg (trim without re-encoding)

    


    String[] command = new String[]{"-y", "-i", original_path, "-ss", ""+ startMs / 1000, "-t" , "" +((endMs - startMs) / 1000), "-c", "copy", dest.getPath()};


    


    Now this trimmed video is present on my server but i am not able to stream it in video view. Whereas I can play the other videos which was not trimmed using FFmpeg.

    


    Below is the code load video in videoview

    


    VideoView videov = findViewById(R.id.videov);
Uri uri = Uri.parse("http://x.x.xxxx.xxxx:8000/xxxxxApp/media/xxxx/1608121174332.mp4");
videov.setVideoURI(uri);
videov.start();


    


    Also I can play the same video in webview control.

    


  • How to overlay one video on another and then if one video finishes then fullscreen the other video [FFMPEG]

    2 février 2020, par siddhesh amrale

    ffmpeg -i s2.mp4 -vf "movie=s1small.mp4 [inner];[in][inner] overlay=100:100 [out]" merge.mp4

    s1 dimension : 420x320

    s2 dimension : 1280x720

    I want the other video to fullscreen if one video ends.

  • NGINX | FFMPEG Not creating files in designated directory, Regular nginx works, but not the one with ffmpeg

    23 février 2021, par Thinked

    We're trying to setup multiple streams that have a delay on them through nginx. We have got the nginx server working on our livestream, but for our delayed ones running through ffmpeg, no files are even created.

    


    Relevant parts of the config :

    


    rtmp {
  server {
    listen 1935; # default port: 1935
    chunk_size 4096;
    allow play all;

    application live {
      allow play all;
      live on;
      # on_publish path_to_stream_key_validation.php
      record off;

      # hls
      hls on;
      hls_nested on;
      hls_path /HLS/live;
      hls_fragment 10s;

      # creates the delayed webcam stream
      exec /usr/local/nginx/hls.sh $app $name;
    }

    # creates the http-location for our delayed webcam HLS stream - "http://my-ip/mobile/my-stream-key/index.m3u8"
    application delay {
      allow play all;
      live on;
      hls on;
      hls_nested on;
      hls_path /HLS/delay;
      hls_fragment 10s;
    }
    #DELAY0
    application delay0 {
      allow play all;
      live on;
      hls on;
      hls_nested on;
      hls_path /HLS/delay0;
      hls_fragment 10s;
    }
  }
}


    


    Screenshot from folders supposed to have videofiles, live has but no other

    


    nginx.conf

    


    #user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
  worker_connections  1024;
}


http {
  include       mime.types;
  default_type  application/octet-stream;

  #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  #                  '$status $body_bytes_sent "$http_referer" '
  #                  '"$http_user_agent" "$http_x_forwarded_for"';

  #access_log  logs/access.log  main;

  sendfile        on;
  #tcp_nopush     on;

  #keepalive_timeout  0;
  keepalive_timeout  65;

  #gzip  on;

  server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
      root   html;
      index  index.php index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
      root   html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

    location ~ \.php$ {
      root           html;
      fastcgi_pass   127.0.0.1:9000;
      fastcgi_index  index.php;
      # fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
      # fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include        fastcgi_params;
    }
    #LIVE
    location /live {
      types {
        application/vnd.apple.mpegurl m3u8;
      }
      alias /HLS/live;
      add_header Cache-Control no-cache;
    }
    #DELAY
    location /delay {
      types {
        application/vnd.apple.mpegurl m3u8;
      }
      alias /HLS/delay;
      add_header Cache-Control no-cache;
    }
    #DELAY0
    location /delay0 {
      types {
        application/vnd.apple.mpegurl m3u8;
      }
      alias /HLS/delay0;
      add_header Cache-Control no-cache;
    }
    #DELAY1
    location /delay1 {
      types {
        application/vnd.apple.mpegurl m3u8;
      }
      alias /HLS/delay1;
      add_header Cache-Control no-cache;
    }
    #DELAY2
    location /delay2 {
      types {
        application/vnd.apple.mpegurl m3u8;
      }
      alias /HLS/delay2;
      add_header Cache-Control no-cache;
    }
    #DELAY3
    location /delay3 {
      types {
        application/vnd.apple.mpegurl m3u8;
      }
      alias /HLS/delay3;
      add_header Cache-Control no-cache;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
  }


  # another virtual host using mix of IP-, name-, and port-based configuration
  #
  #server {
  #    listen       8000;
  #    listen       somename:8080;
  #    server_name  somename  alias  another.alias;

  #    location / {
  #        root   html;
  #        index  index.html index.htm;
  #    }
  #}


  # HTTPS server
  #
  #server {
  #    listen       443 ssl;
  #    server_name  localhost;

  #    ssl_certificate      cert.pem;
  #    ssl_certificate_key  cert.key;

  #    ssl_session_cache    shared:SSL:1m;
  #    ssl_session_timeout  5m;

  #    ssl_ciphers  HIGH:!aNULL:!MD5;
  #    ssl_prefer_server_ciphers  on;

  #    location / {
  #        root   html;
  #        index  index.html index.htm;
  #    }
  #}

}

rtmp {
  server {
    listen 1935; # default port: 1935
    chunk_size 4096;
    allow play all;

    application live {
      allow play all;
      live on;
      # on_publish path_to_stream_key_validation.php
      record off;

      # hls
      hls on;
      hls_nested on;
      hls_path /HLS/live;
      hls_fragment 10s;

      # creates the delayed webcam stream
      #exec ffmpeg -i rtmp://127.0.0.1:1935/$app/$name -acodec copy -c:v libx264 -preset veryfast -profile:v baseline -b:v 400k maxrate 400k -bufsize 400k -threads 0 -r 30 -f flv  rtmp://127.0.0.1:1935/delay3/$;
     
      #exec ffmpeg -i rtmp://127.0.0.1:1935/$app/$name -acodec copy -c:v libx264 -preset veryfast -profile:v baseline -vsync cfr -s 480x360 -b:v 400k maxrate 400k -bufsize 400k -threads 0 -r 30 -f flv rtmp://127.0.0.1:1935/delay0/$;

      exec /usr/local/nginx/hls.sh $app $name;


      #  exec ffmpeg -i rtmp://127.0.0.1:1935/$app/$name -acodec copy -c:v libx264 -preset veryfast -profile:v baseline -vsync cfr -s 1920x1080 -b:v 400k maxrate 400k -bufsize 400k -threads 0 -r 30 -f flv  -filter_complex "[0:v]crop=480:270:0:0[out1];[0:v]crop=480:270:480:0[out2];[0:v]crop=480:270:960:0[out2];[0:v]crop=480:270:1440:0[out2]" -map [out1] -map 0:a rtmp://127.0.0.1:1935/delay0/$ -map [out2] -map 0:a rtmp://127.0.0.1:1935/delay1/$ -map [out3] -map 0:a rtmp://127.0.0.1:1935/delay2/$ -map [out4] -map 0:a rtmp://127.0.0.1:1935/delay3/$;
    }

    # creates the http-location for our delayed webcam HLS stream - "http://my-ip/mobile/my-stream-key/index.m3u8"
    application delay {
      allow play all;
      live on;
      hls on;
      hls_nested on;
      hls_path /HLS/delay;
      hls_fragment 10s;
    }
    #DELAY0
    application delay0 {
      allow play all;
      live on;
      hls on;
      hls_nested on;
      hls_path /HLS/delay0;
      hls_fragment 10s;
    }
    #DELAY1
    application delay1 {
      allow play all;
      live on;
      hls on;
      hls_nested on;
      hls_path /HLS/delay1;
      hls_fragment 10s;
    }
    #DELAY2
    application delay2 {
      allow play all;
      live on;
      hls on;
      hls_nested on;
      hls_path /HLS/delay2;
      hls_fragment 10s;
    }
    #DELAY3
    application delay3 {
      allow play all;
      live on;
      hls on;
      hls_nested on;
      hls_path /HLS/delay3;
      hls_fragment 10s;
    }

  }
}


    


    We just tested a shell script variant of the exec function so here is the shellscript :

    


    ffmpeg -i rtmp://127.0.0.1:1935/$app/$name -acodec copy -c:v libx264 -preset veryfast -profile:v baseline -vsync cfr -s 480x360 -b:v 400k maxrate 400k -bufsize 400k -threads 0 -r 30 -f flv rtmp://127.0.0.1:1935/delay0/$


    


    errors :
Screenshot of logs