
Recherche avancée
Autres articles (44)
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (8031)
-
Using ffmpeg to "re-time" an RTSP stream ?
29 mars 2021, par Tom SI recently set up a birdbox in my garden, and have been using a cheapie camera that I bought, along with ffmpeg on a raspberry pi to stream from the camera to YouTube.


But YouTube keeps telling me that I am sending data too fast - multiple seconds of video per second, and at that point the stream seems to stall and I just get a buffering spinner on YouTube and have to restart ffmpeg to restore the stream.


This is happening very frequently, infact even more frequently now than when I originally got everything up and running for some reason... So much so that Ive had to setup ffmpeg to run as a service, and restart it once an hour via cron. But even this is not enough and now it seems that it can go bonkers within 10-15 minutes of a restart - almost like the more often I restart the quicker it gets...


I dont know where the issue is, or how to find it (does ffmpeg simply restream "verbatim" what ever the camera supplies ?), but I wonder if it might be possible to have ffmpeg re-time the stream so that I only send to YouTube the 25fps that it is happy with (i.e. dropping any frames in excess of this) ?


I have key frames set to 1 second on the camera.


Thanks !



Here is my service file which contains the command that I use to start ffmpeg :


[Unit]
Description=BirbCam 1 streaming service
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
# Uncomment one ExecStart line below, then run `sudo systemctl daemon-reload` before restart
# With audio
ExecStart=/usr/local/bin/ffmpeg -rtsp_transport tcp -i rtsp://172.25.144.35:554/user=admin&password=&channel=1&stream=0.sdp?real_stream -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx

# Without audio
# ExecStart=/usr/local/bin/ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp://172.25.144.35:554/user=admin&password=&channel=1&stream=0.sdp?real_stream -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx

[Install]
WantedBy=multi-user.target



-
exec ffmpeg not working in nginx.config file
12 août 2020, par DevI've created video streaming service using nginx-rtmp-module, Currently i'm facing issue with exec cmd not working in nginx.config file, I've tried many solution still not working.


user root;
daemon off;

error_log /dev/stdout info;

events {
 worker_connections 1024;
}

rtmp {
 server {
 listen ${RTMP_PORT};
 chunk_size 4000;

 application stream {
 live on;
 exec_push /www/files/ff.sh;
 exec_push /usr/bin/ffmpeg -re -i http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://127.0.0.1/hls/$name
 exec ffmpeg -i rtmp://127.0.0.1:1935/stream/$name
 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f flv -g 30 -r 30 -s 1280x720 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_720p2628kbs
 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 1000k -f flv -g 30 -r 30 -s 854x480 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_480p1128kbs
 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 750k -f flv -g 30 -r 30 -s 640x360 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_360p878kbs
 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 400k -f flv -g 30 -r 30 -s 426x240 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_240p528kbs
 -c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 200k -f flv -g 15 -r 15 -s 426x240 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_240p264kbs;
 }

 application hls {
 live on;
 hls on;
 hls_fragment_naming system;
 hls_fragment 5;
 hls_playlist_length 10;
 hls_path /opt/data/hls;
 hls_nested on;

 hls_variant _720p2628kbs BANDWIDTH=2628000,RESOLUTION=1280x720;
 hls_variant _480p1128kbs BANDWIDTH=1128000,RESOLUTION=854x480;
 hls_variant _360p878kbs BANDWIDTH=878000,RESOLUTION=640x360;
 hls_variant _240p528kbs BANDWIDTH=528000,RESOLUTION=426x240;
 hls_variant _240p264kbs BANDWIDTH=264000,RESOLUTION=426x240;
 }
 }
}

http {
 access_log /dev/stdout combined;

 ssl_ciphers HIGH:!aNULL:!MD5;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 ssl_session_cache shared:SSL:10m;
 ssl_session_timeout 10m;

 server {
 listen ${HTTP_PORT};

 # Uncomment these lines to enable SSL.
 # Update the ssl paths with your own certificate and private key.
 # listen 443 ssl;
 # ssl_certificate /opt/certs/example.com.crt;
 # ssl_certificate_key /opt/certs/example.com.key;

 location /hls {
 types {
 application/vnd.apple.mpegurl m3u8;
 video/mp2t ts;
 }
 root /opt/data;
 add_header Cache-Control no-cache;
 add_header Access-Control-Allow-Origin *;
 }

 location /live {
 alias /opt/data/hls;
 types {
 application/vnd.apple.mpegurl m3u8;
 video/mp2t ts;
 }
 add_header Cache-Control no-cache;
 add_header Access-Control-Allow-Origin *;
 }

 location /stat {
 rtmp_stat all;
 rtmp_stat_stylesheet static/stat.xsl;
 }

 location /static {
 alias /www/static;
 }

 location = /crossdomain.xml {
 root /www/static;
 default_type text/xml;
 expires 24h;
 }
 }
}



I've tried added user root at the top of file, exec_push, exec_static, exec ffmpeg, exec /usr/bin/ffmpeg and also write script file still not
working


ff.sh files


echo "running script";
ffmpeg -re -i http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://127.0.0.1/hls/my_video;



when run above cmd from terminal it's working perfectly.


-
dockerfile apt-get install ffmpeg unmet dependencies
8 juillet 2020, par MartinI have a Dockerfile which looks like this :


FROM node:carbon
VOLUME ["/root"]
ADD setup-ffmpeg.sh /root
RUN /root/setup-ffmpeg.sh
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]



Which tries to run the file setup-ffmpeg.sh :


#!/usr/bin/env bash
echo 'deb http://www.deb-multimedia.org jessie main non-free' >> /etc/apt/sources.list
echo 'deb-src http://www.deb-multimedia.org jessie main non-free' >> /etc/apt/sources.list
apt-get update
apt-get install -y --force-yes deb-multimedia-keyring
apt-get remove -y --force-yes ffmpeg
apt-get install -y --force-yes build-essential libmp3lame-dev libvorbis-dev libtheora-dev libspeex-dev yasm pkg-config libfaac-dev libx264-dev libav-tools 
echo "ffmpeg time"
apt-get install ffmpeg 



I am on Ubuntu 20.04 LTS, and try to run this the Dockerfile, from terminal, with the command :


docker build -t alien35/node-web-app .



This causes an error when reaching the
ffmpeg
part though :

Sending build context to Docker daemon 9.793MB
Step 1/10 : FROM node:carbon
 ---> 8eeadf3757f4
Step 2/10 : VOLUME ["/root"]
 ---> Using cache
 ---> 3658672462de
Step 3/10 : ADD setup-ffmpeg.sh /root
 ---> c9c192aa97c5
Step 4/10 : RUN /root/setup-ffmpeg.sh
 ---> Running in b9240ac8d351
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [53.0 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://deb.debian.org/debian stretch Release.gpg [2410 B]
Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [529 kB]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [28.2 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7083 kB]
Get:9 http://www.deb-multimedia.org jessie InRelease [24.6 kB]
Ign:9 http://www.deb-multimedia.org jessie InRelease
Get:10 http://www.deb-multimedia.org jessie/main Sources [60.8 kB]
Get:11 http://www.deb-multimedia.org jessie/non-free Sources [2480 B]
Get:12 http://www.deb-multimedia.org jessie/main amd64 Packages [82.8 kB]
Get:13 http://www.deb-multimedia.org jessie/non-free amd64 Packages [1776 B]
Fetched 8080 kB in 2s (3402 kB/s)
Reading package lists...
W: GPG error: http://www.deb-multimedia.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117
W: The repository 'http://www.deb-multimedia.org jessie InRelease' is not signed.
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
 deb-multimedia-keyring
0 upgraded, 1 newly installed, 0 to remove and 56 not upgraded.
Need to get 10.7 kB of archives.
After this operation, 25.6 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
 deb-multimedia-keyring
Get:1 http://www.deb-multimedia.org jessie/main amd64 deb-multimedia-keyring all 2016.8.1 [10.7 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 10.7 kB in 0s (23.3 kB/s)
Selecting previously unselected package deb-multimedia-keyring.
(Reading database ... 29962 files and directories currently installed.)
Preparing to unpack .../deb-multimedia-keyring_2016.8.1_all.deb ...
Unpacking deb-multimedia-keyring (2016.8.1) ...
Setting up deb-multimedia-keyring (2016.8.1) ...
W: --force-yes is deprecated, use one of the options starting with --allow instead.
W: --force-yes is deprecated, use one of the options starting with --allow instead.
Reading package lists...
Building dependency tree...
Reading state information...
Package 'ffmpeg' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 56 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
pkg-config is already the newest version (0.29-4+b1).
pkg-config set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libav-tools : Depends: ffmpeg (= 10:2.6.9-dmo1+deb8u2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ffmpeg time
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ffmpeg : Depends: libavcodec56 (>= 10:2.6.9) but it is not going to be installed
 Depends: libavdevice56 (>= 10:2.6.9) but it is not going to be installed
 Depends: libavfilter5 (>= 10:2.6.9) but it is not going to be installed
 Depends: libavformat56 (>= 10:2.6.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c /root/setup-ffmpeg.sh' returned a non-zero code: 100



I have tried adding the dependencies to
apt-get install
in my Dockerfile, and adding-f
to theffmpeg
command as well, but I am still getting this error