
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (88)
-
Amélioration de la version de base
13 septembre 2013Jolie 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, parCe 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 plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (8271)
-
FFMPEG, running through subprocess, getting error : "pipe: : Invalid data found when processing input"
19 avril 2020, par mamba9999Im writing a program which getting the stream from ip camera, do with frame what i need and send to ffmpeg for transcoding. Then ffmpeg should convert video and send to output url.
But when i running script, i get the error : "pipe: : Invalid data found when processing input".
Im really newby in ffmpeg. Please help, what i doing wrong.




cap = cv2.VideoCapture("rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov")

command = [
 "ffmpeg",
 "-i", "-",
 "-f", "mpegts",
 "-vcodec", "mpeg1video",
 "-s", "960x540",
 "-b:v", "1000K",
 "-r", "30",
 "-bf", "0",
 "-codec:a", "mp2",

 "http://127.0.0.1:8888/yoursecret"
]

proc = subprocess.Popen(command, stderr=subprocess.PIPE, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
out, err = proc.communicate()


print(err)

while True:
 ret, frame = cap.read()
 # _, buf = cv2.imencode('.jpg', frame)
 # img_byte = io.BytesIO(buf.tobytes())
 try: 
 proc.stdin.write(frame.tostring())
 print("SENDED")
 except IOError as e:
 print(e) 
 proc.stdin.close()
 proc.wait() 

proc.stdin.close()
proc.wait()




Traceback



ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
pipe:: Invalid data found when processing input



-
gphoto2 pipe: : Invalid data found when processing input
13 avril 2020, par Taegan ObermeyerSo I have been following this tutorial https://medium.com/nerdery/dslr-webcam-setup-for-linux-9b6d1b79ae22 and when I got to the point to actually take a photo with the camera I have no issues but when I get to try to capture with it I get 

pipe:: Invalid data found when processing input



The entire command is listed as follows :



$ gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
Capturing preview frames as movie to 'stdout'. Press Ctrl-C to abort.
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
 configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
ERROR: Movie capture error... Exiting.
Movie capture finished (0 frames)
pipe:: Invalid data found when processing input



-
How to pipe frames in stdout using FFMPEG and Golang
6 avril 2020, par Sven.DGI am fairly new to Golang, my goal is to build a script in Golang that :



- 

- Transcodes the video input .MOV file into frames, using FFMPEG
- Some downstream process that does something with the emitted frames.







Currently I have the following code as a first attempt :



package main

import (
 "fmt"
 "os/exec"
 "strconv"
 "io"
)

const (
 frameX = 240
 frameY = 135
 frameSize = frameX * frameY * 3
)

func main() {
 ffmpeg := exec.Command("ffmpeg", "-i", "project/data/sample.mov", "-vf", "fps=fps=1/2", "-s", strconv.Itoa(frameX)+"x"+strconv.Itoa(frameY), "-f", "rawvideo", "pipe:1") //nolint
 ffmpegOut, _ := ffmpeg.StdoutPipe()

 if err := ffmpeg.Start(); err != nil {
 panic(err)
 }

 reader(ffmpegOut)
 fmt.Println("Completed. YAY")
}

func reader(ffmpegOut io.Reader) {
 buf := make([]byte, frameSize)
 fmt.Println("Looping..")
 counter := 0
 for {
 if _, err := io.ReadFull(ffmpegOut, buf); err != nil {
 // fmt.Println(err)
 }
 if buf[0] != 0 {
 fmt.Println("Got a frame!!")
 counter++
 fmt.Println(counter)
 }
 }
 fmt.Println("total amount of frames", counter)
}




This is mainly based on this example : https://github.com/pion/example-webrtc-applications/blob/master/gocv-receive/main.go



However, when running this code, it appears that I'm getting an endless amount of data in my downstream
reader
. I would expect that the counter equals the amount of frames but that is clearly not the case looking at the rate at which the counter increases, so obviously I am doing something wrong. Can anybody point me in the right direction ?


I used the sample .mov file with 1280 x 720 resolution here : https://file-examples.com/index.php/sample-video-files/sample-mov-files-download/.
The video is about 31 seconds so I would expect to see 15 frames downstream in the reader.



Cheers !