
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (85)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (5971)
-
ffmpeg + ffserver : "Broken ffmpeg default settings detected"
18 octobre 2012, par Chris NoletI'm just trying to connect ffmpeg to ffserver and stream rawvideo.
I keep getting the error :
broken ffmpeg default settings detected
from libx264 and thenError while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
from ffmpeg before it exits.I'm launching ffmpeg with the command :
ffmpeg -f x11grab -s 320x480 -r 10 -i :0.0 -tune zerolatency http://localhost:8090/feed1.ffm
My ffserver.conf file (for ffserver) looks like this :
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
NoDaemon
<feed>
ACL allow 127.0.0.1
</feed>
<stream>
Feed feed1.ffm
Format asf
NoAudio
VideoBitRate 128
VideoBufferSize 400
VideoFrameRate 24
VideoSize 320x480
VideoGopSize 12
VideoQMin 1
VideoQMax 31
VideoCodec libx264
</stream>
<stream>
Format status
</stream>And the full output is :
ffmpeg version N-45614-g364c60b Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 17 2012 04:34:04 with Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)
configuration: --enable-shared --enable-libx264 --enable-libmp3lame --enable-x11grab --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --cc=/usr/bin/clang --host-cflags='-Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7' --extra-cflags='-x objective-c' --extra-ldflags='-framework Foundation -framework Cocoa -framework CoreServices -framework ApplicationServices -lobjc'
libavutil 51. 76.100 / 51. 76.100
libavcodec 54. 66.100 / 54. 66.100
libavformat 54. 32.101 / 54. 32.101
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 19.103 / 3. 19.103
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
[x11grab @ 0x7f87dc01e200] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 320 height: 480
[x11grab @ 0x7f87dc01e200] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
Duration: N/A, start: 1350517708.386699, bitrate: 49152 kb/s
Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 320x480, 49152 kb/s, 10 tbr, 1000k tbn, 10 tbc
[tcp @ 0x7f87dc804120] TCP connection to localhost:8090 failed: Connection refused
[tcp @ 0x7f87dc804b20] TCP connection to localhost:8090 failed: Connection refused
[libx264 @ 0x7f87dd801000] broken ffmpeg default settings detected
[libx264 @ 0x7f87dd801000] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x7f87dd801000] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x7f87dd801000] speed presets are listed in x264 --help
[libx264 @ 0x7f87dd801000] profile is optional; x264 defaults to high
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
creation_time : now
Stream #0:0: Video: h264, yuv420p, 160x128, q=2-31, 128 kb/s, 1000k tbn, 10 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> libx264)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
</profile></speed>Any help much appreciated :)
-
How ffmpeg does mpegts streaming ?
14 avril 2020, par xybrekHere's how I stream MPEG-TS to a relay using ffmpeg :



ffmpeg -re -i out.ts -f mpegts -vcodec copy -acodec copy http://localhost:8081/secret




My question is in the internals of ffmpeg, I want to understand the core process as to how ffmpeg stream mpegts, what it does to the file to stream it, does it manipulate the byte it streams or it just stream as-is ?


-
Broken pipe error when using FFmpeg stream camera video
14 septembre 2021, par Xiuyi YangI try to write frames captured from a my laptop camera and then stream these images with FFmpeg. This is my code :


import subprocess
import cv2
rstp_url = "rtsp://localhost:31415/stream"

# In my mac webcamera is 0, also you can set a video file name instead, for example "/home/user/demo.mp4"
path = 0
cap = cv2.VideoCapture(path)

# gather video info to ffmpeg
fps = int(cap.get(cv2.CAP_PROP_FPS))
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

# command and params for ffmpeg
command = ['ffmpeg',
 '-y',
 '-f', 'rawvideo',
 '-vcodec', 'rawvideo',
 '-pix_fmt', 'bgr24',
 '-s', "{}x{}".format(width, height),
 '-r', str(fps),
 '-i', '-',
 '-c:v', 'libx264',
 '-pix_fmt', 'yuv420p',
 '-preset', 'ultrafast',
 '-f', 'flv',
 rstp_url]

# using subprocess and pipe to fetch frame data
p = subprocess.Popen(command, stdin=subprocess.PIPE)


while cap.isOpened():
 ret, frame = cap.read()
 if not ret:
 print("frame read failed")
 break

 # YOUR CODE FOR PROCESSING FRAME HERE

 # write to pipe
 p.stdin.write(frame.tobytes())



After run this code, the following error occurs :




Input #0, rawvideo, from 'pipe :' :
Duration : N/A, start : 0.000000, bitrate : 221184 kb/s
Stream #0:0 : Video : rawvideo (BGR[24] / 0x18524742), bgr24, 640x480, 221184 kb/s, 30 > tbr, 30 tbn, 30 tbc
rtsp ://localhost:31415/stream : Protocol not found
Traceback (most recent call last) :
File "rtsp.py", line 42, in 
p.stdin.write(frame.tobytes())
BrokenPipeError : [Errno 32] Broken pipe




Please help me fix this bug.



After reply by Rotem, I modidied code as below :


import subprocess
import cv2
import pdb 

rstp_url = "rtsp://localhost:31415/stream"

# In my mac webcamera is 0, also you can set a video file name instead, for example "/home/user/demo.mp4"
path = 0
cap = cv2.VideoCapture(path)

# gather video info to ffmpeg
fps = int(cap.get(cv2.CAP_PROP_FPS))
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

# command and params for ffmpeg
command = ['ffmpeg',
 '-re',
 '-f', 'rawvideo', # Apply raw video as input - it's more efficient than encoding each frame to PNG
 '-s', f'{width}x{height}',
 '-pixel_format', 'bgr24',
 '-r', f'{fps}',
 '-i', '-',
 '-pix_fmt', 'yuv420p',
 '-c:v', 'libx264',
 '-bufsize', '64M',
 '-maxrate', '4M',
 '-rtsp_transport', 'udp',
 '-f', 'rtsp',
 #'-muxdelay', '0.1',
 rstp_url ]


# using subprocess and pipe to fetch frame data
p = subprocess.Popen(command, stdin=subprocess.PIPE)


while cap.isOpened():
 ret, frame = cap.read()
 if not ret:
 print("frame read failed")
 break

 pdb.set_trace()
 # YOUR CODE FOR PROCESSING FRAME HERE

 # write to pipe
 p.stdin.write(frame.tobytes())

 cv2.imshow('current_img', frame) # Show image for testing

 # time.sleep(1/FPS)
 key = cv2.waitKey(int(round(1000/fps))) # We need to call cv2.waitKey after cv2.imshow

 if key == 27: # Press Esc for exit
 break

p.stdin.close() # Close stdin pipe
p.wait() # Wait for FFmpeg sub-process to finish
cv2.destroyAllWindows() # Close OpenCV window



The error ocurs as below :




Connection to tcp ://localhost:31415 ?timeout=0 failed : Connection >refused
Could not write header for output file #0 (incorrect codec >parameters ?) : Connection refused
Error initializing output stream 0:0 —
Conversion failed !
c
Qt : Session management error : None of the authentication protocols >specified are supported.