
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (36)
-
Gestion générale des documents
13 mai 2011, parMé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 (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (...)
Sur d’autres sites (5737)
-
RaspberryPi HLS streaming with nginx and ffmpeg ; v4l2 error : ioctl(VIDIOC_STREAMON) : Protocol error
22 janvier 2021, par Mirco WeberI'm trying to realize a baby monitoring with a Raspberry Pi (Model 4B, 4GB RAM) and an ordinary Webcam (with integrated Mic).
I followed this Tutorial : https://github.com/DeTeam/webcam-stream/blob/master/Tutorial.md


Shortly described :


- 

- I installed and configured an nginx server with rtmp module enabled.
- I installed ffmpeg with this configuration —enable-gpl —enable-nonfree —enable-mmal —enable-omx-rpi
- I tried to stream ;)








The configuration of nginx seems to be working (sometimes streaming works, the server starts without any complication and when the server is up and running, the webpage is displayed).
The configuration of ffmpeg seems to be fine as well, since streaming sometimes works...


I was trying a couple of different ffmpeg-commands ; all of them are sometimes working and sometimes resulting in an error.
The command looks like following :


ffmpeg -re
-f v4l2
-i /dev/video0
-f alsa
-ac 1
-thread_queue_size 4096
-i hw:CARD=Camera,DEV=0
-profile:v high
-level:v 4.1
-vcodec h264_omx
-r 10
-b:v 512k
-s 640x360
-acodec aac
-strict
-2
-ac 2
-ab 32k
-ar 44100
-f flv
rtmp://localhost/show/stream;



Note : I rearranged the code to make it easier to read. In the terminal, it is all in one line.
Note : There is no difference when using
-f video4linux2
instead of-f v4l2


The camera is recognized by the system :


pi@raspberrypi:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
 /dev/video10
 /dev/video11
 /dev/video12

bcm2835-isp (platform:bcm2835-isp):
 /dev/video13
 /dev/video14
 /dev/video15
 /dev/video16

HD Web Camera: HD Web Camera (usb-0000:01:00.0-1.2):
 /dev/video0
 /dev/video1



When only using
-i /dev/video0
, audio transmission never worked.
The output ofarecord -L
was :

pi@raspberrypi:~ $ arecord -L
default
 Playback/recording through the PulseAudio sound server
null
 Discard all samples (playback) or generate zero samples (capture)
jack
 JACK Audio Connection Kit
pulse
 PulseAudio Sound Server
usbstream:CARD=Headphones
 bcm2835 Headphones
 USB Stream Output
sysdefault:CARD=Camera
 HD Web Camera, USB Audio
 Default Audio Device
front:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 Front speakers
surround21:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 4.0 Surround output to Front and Rear speakers
surround41:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 Direct sample mixing device
dsnoop:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 Direct sample snooping device
hw:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 Direct hardware device without any conversions
plughw:CARD=Camera,DEV=0
 HD Web Camera, USB Audio
 Hardware device with all software conversions
usbstream:CARD=Camera
 HD Web Camera
 USB Stream Output



that's why i added
-i hw:CARD=Camera,DEV=0
.

As mentioned above, it worked very well a couple of times with this configuration and commands.
But very often, i get the following error message when starting to stream :


pi@raspberrypi:~ $ ffmpeg -re -f video4linux2 -i /dev/video0 -f alsa -ac 1 -thread_queue_size 4096 -i hw:CARD=Camera,DEV=0 -profile:v high -level:v 4.1 -vcodec h264_omx -r 10 -b:v 512k -s 640x360 -acodec aac -strict -2 -ac 2 -ab 32k -ar 44100 -f flv rtmp://localhost/show/stream
ffmpeg version N-100673-g553eb07737 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 8 (Raspbian 8.3.0-6+rpi1)
 configuration: --enable-gpl --enable-nonfree --enable-mmal --enable-omx-rpi --extra-ldflags=-latomic
 libavutil 56. 63.101 / 56. 63.101
 libavcodec 58.117.101 / 58.117.101
 libavformat 58. 65.101 / 58. 65.101
 libavdevice 58. 11.103 / 58. 11.103
 libavfilter 7. 96.100 / 7. 96.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
 libpostproc 55. 8.100 / 55. 8.100
[video4linux2,v4l2 @ 0x2ea4600] ioctl(VIDIOC_STREAMON): Protocol error
/dev/video0: Protocol error



And when I'm swithing to
/dev/video1
(since this was also an output forv4l2-ctl --list-devices
), I get the following error message :

pi@raspberrypi:~ $ ffmpeg -re -f v4l2 -i /dev/video1 -f alsa -ac 1 -thread_queue_size 4096 -i hw:CARD=Camera,DEV=0 -profile:v high -level:v 4.1 -vcodec h264_omx -r 10 -b:v 512k -s 640x360 -acodec aac -strict -2 -ac 2 -ab 32k -ar 44100 -f flv rtmp://localhost/show/stream
ffmpeg version N-100673-g553eb07737 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 8 (Raspbian 8.3.0-6+rpi1)
 configuration: --enable-gpl --enable-nonfree --enable-mmal --enable-omx-rpi --extra-ldflags=-latomic
 libavutil 56. 63.101 / 56. 63.101
 libavcodec 58.117.101 / 58.117.101
 libavformat 58. 65.101 / 58. 65.101
 libavdevice 58. 11.103 / 58. 11.103
 libavfilter 7. 96.100 / 7. 96.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
 libpostproc 55. 8.100 / 55. 8.100
[video4linux2,v4l2 @ 0x1aa4610] ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
/dev/video1: Inappropriate ioctl for device



When using the
video0
input, the webcam's LED that recognizes an access is constantly on. When usingvideo1
not.

After hours and days of googling and tears and whiskey, for the sake of my liver, my marriage and my physical and mental health, I'm very sincerly asking for your help...
What the f**k is happening and what can I do to make it work ???


Thanks everybody :)


UPDATE 1 :


- 

- using the full path to ffmpeg does not change anything...
- /dev/video0 and /dev/video1 have access rights for everybody
sudo ffmpeg ...
does not change anything as well- the problem seems to be at an "early stage". Stripping the command down to
ffmpeg -i /dev/video0
results in the same problem










UPDATE 2 :

It seems that everything is working when I first start another Application that needs access to the webcam and then ffmpeg...
Might be some driver issue, but when I'm looking for loaded modules withlsmod
, there is absolutely no change before and after I started the application...
Any help still appreciated...

UPDATE 3 :

I was checking the output ofdmesg
.

When I started the first application I received this message :

uvcvideo: Failed to query (GET_DEF) UVC control 12 on unit 2: -32 (exp. 4).


And when I startedffmpeg
, nothing happend but everything worked...

-
Compilation error using ffmpeg library
15 novembre 2012, par BartoNazI have downloaded and installed the ffmpeg library. I want to use it for reading the separate frames of different videos and manipulate them. For that I tried to follow some tutorial from here : http://dranger.com/ffmpeg/tutorial01.html
But I can't compile my cpp file since I get the following compilation :Undefined symbols for architecture x86_64:
"av_register_all()", referenced from:
_main in cc9zyUBe.o
_main in ccRz35d4.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit statusWhen I was installing ffmpeg library, I used arch=x86_64 option in ./configure step.
I use OS X Mountain Lion 10.8.2 and gcc 4.2 compiler.
Does somebody have any clue what can be the reason of this error ?
Thanks in advance.UPDATE :
I've already tried many different install options, with static libraries, shared libraries, with/without —arch=x86_64 option. Also installed it with homebrew, result remains the same. Library isn't recognized. But ffmpeg binary works pretty well, when I use it as a command-line tool. -
Running FFmpeg from AWS
11 mai 2019, par JayThis code works perfectly from my local machine.
import subprocess
p = subprocess.call('ffmpeg -r 1 -loop 1 -i "ep1.png" -i "ep1.mp3" -acodec copy -r 1 -shortest -vf scale=1280:720 ep1.flv',shell=True)I would like to run it from AWS
Lambda code
import boto3
import subprocess
s3 = boto3.client('s3')
def lambda_handler(event, context):
ep1PNG = s3.get_object(Bucket='my-buc',Key='ep1.PNG')
ep1MP3 = s3.get_object(Bucket='my-buc',Key='ep1.mp3')
p = subprocess.call(
'/opt/ffmpeg/ffmpeg -r 1 -loop 1 -i ep1PNG -i ep1MP3 -acodec copy -r 1 -shortest -vf scale=1280:720 /tmp/ep1.flv', shell=True)
# TODO implement
return {
'statusCode': 200,
}Questions
Are these correct inside subprocess.call() ?
/opt/ffmpeg/ffmpeg #<-----Is this correct ?
ep1PNG #<-----Is this correct ?
ep1MP3 #<-----Is this correct ?
/tmp/ep1.flv #<----- Not Sending Output to S3 BucketPlease comment if I’m heading in the right direction been trying this for about a week now
ffmpeg is uploaded as a layer