
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (28)
-
Initialisation de MediaSPIP (préconfiguration)
20 février 2010, parLors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
Dans un premier temps il active ou désactive des options de SPIP qui ne le (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (4338)
-
OpenCV VideoWriter produces "can't find starting number" error
5 avril 2020, par user3325139I am trying to write 16-bit grayscale video using the FFV1 codec and opencv.ImageWriter on Windows 10



Here is my code :



import numpy as np
import cv2, pdb

print(cv2.getBuildInformation())

def to8(img):
 return (img/256).astype('uint8')

cap = cv2.VideoCapture(0+cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y','1','6',' '))
cap.set(cv2.CAP_PROP_CONVERT_RGB, False)

out = cv2.VideoWriter('out.avi', cv2.VideoWriter_fourcc('F','F','V','1'), cap.get(cv2.CAP_PROP_FPS), (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)),int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))))

while True:
 ret, frame = cap.read()
 frame = cv2.normalize(frame,None,0,65535,cv2.NORM_MINMAX)

 cv2.imshow('Video',to8(frame))
 out.write(frame)

 if cv2.waitKey(1) & 0xFF == ord('q'):
 break
cap.release()
out.release()
cv2.destroyAllWindows()




And here is my error :



[ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (415) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): out.avi in function 'cv::icvExtractPattern'




I am running this script from a command window with admin privileges. I've tried both making sure the output file does and does not exist before running.



My OpenCV build information is here : https://pastebin.com/whtF6ixG



Thanks !



EDIT :
Based on Rotem's suggestion, instead of using VideoWriter I piped directly to FFMPEG using ffmpeg-python :



import numpy as np
import cv2, pdb
import ffmpeg

def to8(img):
 return (img/256).astype('uint8')

cap = cv2.VideoCapture(0+cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y','1','6',' '))
cap.set(cv2.CAP_PROP_CONVERT_RGB, False)

ff_proc = (
 ffmpeg
 .input('pipe:',format='rawvideo',pix_fmt='gray16le',s='%sx%s'%(int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)),int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))),r='60')
 .output('out3.avi',vcodec='ffv1',an=None)
 .run_async(pipe_stdin=True)
)

while True:
 ret, frame = cap.read()

 cv2.imshow('Video',to8(frame))
 ff_proc.stdin.write(frame)

 if cv2.waitKey(1) & 0xFF == ord('q'):
 break

out.terminate()
cap.release()
cv2.destroyAllWindows()



-
Failed to start broadcast : kurento.MediaPipeline not found (Code:40101, Type:null, Data : {"type" :"MEDIA_OBJECT_NOT_FOUND"})
30 avril 2020, par Arslan MaqboolI am facing this issue when I opened any conference room or any meeting then the camera or microphone or sharedscreen is opened from just 1 or 2 seconds and then
 gone and error message popup in the image below which is attached and in text



I am using open-meeting version 5.0.0-M3 WebRTC



> Failed to start broadcast: Object
> '4f09d0d4-f52f-4731-9e54-124e2da0ca9a_kurento.MediaPipeline' not found
> (Code:40101, Type:null, Data: {"type":"MEDIA_OBJECT_NOT_FOUND"})






-
FFmpeg : "Invalid data found when processing input" when reading video from memory
24 avril 2020, par DrawoceansI'm trying to read a mp4 video file from memory with C++ and FFmpeg library, but I got "Invalid data found when processing input" error. Here are my codes :



#include <cstdio>
#include <fstream>
#include <filesystem>

extern "C"
{
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
}

using namespace std;
namespace fs = std::filesystem;

struct VideoBuffer
{
 uint8_t* ptr;
 size_t size;
};

static int read_packet(void* opaque, uint8_t* buf, int buf_size)
{
 VideoBuffer* vb = (VideoBuffer*)opaque;
 buf_size = FFMIN(buf_size, vb->size);

 if (!buf_size) {
 return AVERROR_EOF;
 }

 printf("ptr:%p size:%zu\n", vb->ptr, vb->size);

 memcpy(buf, vb->ptr, buf_size);
 vb->ptr += buf_size;
 vb->size -= buf_size;

 return buf_size;
}

void print_ffmpeg_error(int ret)
{
 char* err_str = new char[256];
 av_strerror(ret, err_str, 256);
 printf("%s\n", err_str);
 delete[] err_str;
}

int main()
{
 fs::path video_path = "test.mp4";
 ifstream video_file;
 video_file.open(video_path);
 if (!video_file) {
 abort();
 }
 size_t video_size = fs::file_size(video_path);
 char* video_ptr = new char[video_size];
 video_file.read(video_ptr, video_size);
 video_file.close();

 VideoBuffer vb;
 vb.ptr = (uint8_t*)video_ptr;
 vb.size = video_size;

 AVIOContext* avio = nullptr;
 uint8_t* avio_buffer = nullptr;
 size_t avio_buffer_size = 4096;
 avio_buffer = (uint8_t*)av_malloc(avio_buffer_size);
 if (!avio_buffer) {
 abort();
 }

 avio = avio_alloc_context(avio_buffer, avio_buffer_size, 0, &vb, read_packet, nullptr, nullptr);

 AVFormatContext* fmt_ctx = avformat_alloc_context();
 if (!fmt_ctx) {
 abort();
 }
 fmt_ctx->pb = avio;

 int ret = 0;
 ret = avformat_open_input(&fmt_ctx, nullptr, nullptr, nullptr);
 if (ret < 0) {
 print_ffmpeg_error(ret);
 }

 avformat_close_input(&fmt_ctx);
 av_freep(&avio->buffer);
 av_freep(&avio);
 delete[] video_ptr;
 return 0;
}
</filesystem></fstream></cstdio>



And here is what I got :



ptr:000001E10CEA0070 size:4773617
ptr:000001E10CEA1070 size:4769521
...
ptr:000001E10D32D070 size:1777
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e10caaeac0] moov atom not found
Invalid data found when processing input




FFmpeg version is 4.2.2, with Windows 10 and Visual Studio 2019 in x64 Debug mode. FFmpeg library is the Windows compiled shared library from FFmpeg homepage. Some codes are from official example
avio_reading.c
. Target MP4 file can be played normally by VLC player so I think the file is OK. Is anywhere wrong in my codes ? Or is it an FFmpeg library problem ?