
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (97)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (9398)
-
Code forks fine on macbook laptop..but on Imac(Yosemite) I get errors in my shell script
2 mars 2015, par arantxI’m still figuring out how to work within the terminal, mainly with FFmpeg at the moment. I have this code running for a while now on my macbook pro (snow leopard I think). It works fine, no glitches whatsover. I just got an Imac (yosemite) and I wanted to install the same code, but now it gives these minor stupid syntax errors - that are not at fault on my laptop ! Its seems bizar to me, but maybe it’s something I forgot to install .. like a certain library ? I’ve tried to use the same steps as before but ofcourse I might have forgotten about one..
The code will make a clip of 5 seconds on every hour via the embedded webcam, (the hourly notice is being programmed within crontab). This is the shell script :
#!/bin/bash
FNAME=videocapture_`date +"%F_%H_%M"`.mpg
echo $FNAME
/usr/local/bin/ffmpeg -t 5 -f avfoundation -i "default" $FNAME
And these are the erros (I tried to change a few small syntaxes to see if it would stop but it just finds new errors)
"SyntaxError: EOL while scanning string literal
Arantxas-iMac:~ arantx$ python /Users/arantx/Documents/terminal\ stuff/camera.sh
File "/Users/arantx/Documents/terminal stuff/camera.sh", line 3
FNAME=videocapture_'date +"%F_%H_%M"`.mpeg
^
SyntaxError: EOL while scanning string literal
Arantxas-iMac:~ arantx$ python /Users/arantx/Documents/terminal\ stuff/camera.sh
File "/Users/arantx/Documents/terminal stuff/camera.sh", line 3
FNAME=videocapture_'date +"%F_%H_%M"`.mpeg
^
SyntaxError: EOL while scanning string literal
Arantxas-iMac:~ arantx$ python /Users/arantx/Documents/terminal\ stuff/camera.sh
File "/Users/arantx/Documents/terminal stuff/camera.sh", line 3
FNAME=videocapture_'date +"%F_%H_%M"`.mp4"
If someone can point something out that I might have missed, let me know !
Kind regards,
Arantxa
-
how to generate rtsp stream using laptop cam [closed]
13 décembre 2023, par MubahsirI am using the following command to capture video from the laptop camera and stream it as an RTSP using ffmpeg :


ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -profile:v baseline -pix_fmt yuv420p -b:v 500k -r 30 -f rtsp rtsp://127.0.0.1:1234



Upon executing this command, the laptop camera's indicator light turns on, indicating that it is in use. However, when attempting to view the RTSP stream on VLC using the URL
rtsp://127.0.0.1:1234
, no video is displayed.

-
the workstation' Image decode and render perform,use same code,worse than laptop
12 janvier 2024, par karma1995i'm working on Image decoding and rendering,trying to develop a software to process and display 4K TIFF and DPX sequence.Developing on my laptop and testing on both laptop and workstation.It's wired that workstaion's performance worse than laptop,my hardware and code information is here :
The information of both machine


- 

- Laptop
platform : windows 11
CPU : Intel I9-13900H 14C 20T
GPU : RTX 4060 Laptop GPU
Mem : 64G
Disk : SSD
- Workstaton
platform : windows 10
CPU : Intel Xeon 56C 112T
GPU : RTX A6000
Mem : 512
Disk : SSD
IDE
IDE is Qt, version 5.14.0, both on laptop and workstation.






For Image decoding, ffmpeg is used


void SeqDecodeTask::run()
{
 QElapsedTimer timer;
 timer.start();
 SwsContext* swsCtx = nullptr;
 AVPixelFormat srcFmt = AV_PIX_FMT_NONE;
 AVPixelFormat dstFmt = AV_PIX_FMT_NONE;
 AVFormatContext* fmtCtx;
 const AVCodec* codec;
 AVCodecContext* codecCtx;
 AVStream* stream;
 int index = -1;
 AVPacket pkt;
 AVFrame* frame = av_frame_alloc();
 AVFrame* output = av_frame_alloc();
 fmtCtx = avformat_alloc_context();

 if(avformat_open_input(&fmtCtx, file_.toUtf8(),
 nullptr, nullptr) < 0) {
 return;
 }
 if (avformat_find_stream_info(fmtCtx, nullptr) < 0) {
 return;
 }
 for (unsigned int i = 0; i < fmtCtx->nb_streams; i++) {
 if (fmtCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
 index = static_cast<int>(i);
 continue;
 }
 }
 if (index < 0) {
 return;
 }
 stream = fmtCtx->streams[index];
 fmtCtx->streams[index]->discard = AVDISCARD_DEFAULT;
 codecCtx = avcodec_alloc_context3(nullptr);
 if (avcodec_parameters_to_context(
 codecCtx,
 fmtCtx->streams[index]->codecpar) < 0) {
 return;
 }
 codec = avcodec_find_decoder(codecCtx->codec_id);
 if (codec == nullptr) {
 return;
 }
 if (avcodec_open2(codecCtx, codec, nullptr) < 0) {
 return;
 }
 av_read_frame(fmtCtx, &pkt);
 avcodec_send_packet(codecCtx, &pkt);
 avcodec_receive_frame(codecCtx, frame);

 if (srcFmt == AV_PIX_FMT_NONE) {
 srcFmt = static_cast<avpixelformat>(frame->format);
 }
 dstFmt = AV_PIX_FMT_RGBA64LE;
 cv::Mat mat(cv::Size(frame->width, frame->height), CV_16UC4);
 if (!(frame->width < 0 || frame->height < 0)) {
 if (swsCtx == nullptr) {
 swsCtx = sws_alloc_context();
 swsCtx = sws_getContext(frame->width,
 frame->height,
 srcFmt,
 frame->width,
 frame->height,
 dstFmt,
 SWS_BICUBIC, nullptr,
 nullptr, nullptr);
 }

 swsCtx = sws_getContext(frame->width, frame->height,
 srcFmt,
 frame->width, frame->height,
 dstFmt,
 SWS_BICUBIC, nullptr, nullptr, nullptr);
 av_image_fill_arrays(output->data, output->linesize,
 static_cast(mat.data),
 dstFmt,
 frame->width, frame->height, 1);
 sws_scale(swsCtx, static_cast<const>(frame->data),
 frame->linesize, 0, frame->height, output->data, output->linesize);
 }
 av_packet_unref(&pkt);
 av_frame_free(&output);
 av_frame_free(&frame);
 sws_freeContext(swsCtx);
 avcodec_free_context(&codecCtx);
 avformat_free_context(fmtCtx);

 buffer_->edit(true, item_, index_, file_, mat);

 emit decodeTaskFinished();
 qDebug() << "decode time " << timer.elapsed();
}
</const></avpixelformat></int>


Simply get the media information, decode, format transform and store in mat.It's a QRunnable class for multithread.


For rendering, have tried both QPainter and SceneGraph
QPainter :


void PaintedItemRender::paint(QPainter *painter)
{
 QElapsedTimer timer;
 timer.start();
 painter->setRenderHint(QPainter::Antialiasing, true);
 int width = this->width();
 int height = this->height();
// if (defaultWidth_ == NULL || defaultHeight_ == NULL) {
// defaultWidth_ = width;
// defaultHeight_ = height;
// }
 painter->setBrush(Qt::black);
 painter->drawRect(0, 0, width, height);

 QImage img = image_.scaled(QSize(width, height), Qt::KeepAspectRatio);
 /* calculate display position */
 int x = (this->width() - img.width()) / 2;
 int y = (this->height() - img.height()) / 2;

 painter->drawImage(QPoint(x, y), img);
 qDebug() << "paint time: " <code>


SceneGraph


QSGNode *SceneGraphRender::updatePaintNode(QSGNode* oldNode,
 QQuickItem::UpdatePaintNodeData* updatePaintNodeData)
{
 Q_UNUSED(updatePaintNodeData)
 QSGSimpleTextureNode* tex = nullptr;
 QSGTransformNode* trans = nullptr;
 if(!oldNode) {
 tex = new QSGSimpleTextureNode;
 tex->setFlag(QSGNode::OwnsMaterial, true);
 tex->setFiltering(QSGTexture::Linear);
 tex->setTexture(window()->createTextureFromImage(image_));
 tex->setRect(0, 0, width(), height());
 trans = new QSGTransformNode();
 if (!image_.isNull()) {
 float factorW = 1;
 float factorH = 1;
 if (image_.width() > width()) {
 factorH = factorW = width() / image_.width();
 }
 else if (image_.height() > height()) {
 factorW = factorH = height() / image_.height();
 }
 else if (image_.width() < width() && image_.height() < height()) {
 if (width() - image_.width() < image_.height() - height()) {
 factorH = factorW = width() / image_.width();
 }
 else {
 factorH = factorW = height() / image_.height();
 }
 }
 QMatrix4x4 mat;
 float scaledW = tex->rect().width() * factorW;
 float scaledH = tex->rect().height() * factorH;
 if (width() > scaledW) {
 mat.translate((width() - tex->rect().width() * factorW) / 2, 0);
 }
 if (height() > scaledH) {
 mat.translate(0, (height() - tex->rect().height() * factorH) / 2);
 }
 mat.scale(factorW, factorH);
 trans->setMatrix(mat);
 trans->markDirty(QSGNode::DirtyMatrix);
 }
 else {
 scaled_ = true;
 }
 trans->appendChildNode(tex);
 }
 else {
 trans = static_cast<qsgtransformnode>(oldNode);
 tex = static_cast<qsgsimpletexturenode>(trans->childAtIndex(0));
 QSGTexture* texture = tex->texture();
 tex->setTexture(window()->createTextureFromImage(image_));
 tex->setRect(0, 0, image_.width(), image_.height());
 texture->deleteLater();
 if(!image_.isNull() && scaled_) {
 float factorW = 1;
 float factorH = 1;
 if (image_.width() > width()) {
 factorH = factorW = width() / image_.width();
 }
 else if (image_.height() > height()) {
 factorW = factorH = height() / image_.height();
 }
 else if (image_.width() < width() && image_.height() < height()) {
 if (width() - image_.width() < image_.height() - height()) {
 factorH = factorW = width() / image_.width();
 }
 else {
 factorH = factorW = height() / image_.height();
 }

 }
 QMatrix4x4 mat;
 float scaledW = tex->rect().width() * factorW;
 float scaledH = tex->rect().height() * factorH;
 if (width() > scaledW) {
 mat.translate((width() - tex->rect().width() * factorW) / 2, 0);
 }
 if (height() > scaledH) {
 mat.translate(0, (height() - tex->rect().height() * factorH) / 2);
 }
 mat.scale(factorW, factorH);
 trans->setMatrix(mat);
 trans->markDirty(QSGNode::DirtyMatrix);
 scaled_ = false;
 }
 }
 return trans;
}
</qsgsimpletexturenode></qsgtransformnode>


Time Usage
Test image sequence is 4K DPX sequence, 12 bits, RGB.Decode only use one thread ;


- 

- Laptop
decoding : around 200ms per frame
rendering : around 20ms per frame
- Workstation
decoding : over 600ms per frame
rendering : around 80ms per frame






i'm tring to figure out the reason that make performance diffrent and fix it, appreciate for any advice, thank you.