
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (69)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (9576)
-
Convert set of PNGs into rawvideo .raw FFMPEG
13 août 2020, par WireRecently, I have been trying to modify the boot animation of a little robot. It is a .raw file and it contains every RGB565 frame one after the other. I have been able to get all of the frames using


ffmpeg -f rawvideo -pixel_format rgb565 -video_size 184x96 -framerate 10 -i "boot_anim.raw" -r 1/1 boot_anim%02d.png


But if I try to repack it with


ffmpeg -i boot_anim%02d.png -f rawvideo -pix_fmt rgb565 -framerate 10 -video_size 184x96 -r 1/1 "boot_anim.raw"


it only puts in the first two frames and nothing else. I have also tried libx264 and putting in vcodecs manually. Same result. I'm new to ffmpeg and Linux overall.


Here is the full output :


ffmpeg version N-98716-gb40dd2f Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --enable-encoder=png --enable-decoder=png
 libavutil 56. 58.100 / 56. 58.100
 libavcodec 58.100.100 / 58.100.100
 libavformat 58. 50.100 / 58. 50.100
 libavdevice 58. 11.101 / 58. 11.101
 libavfilter 7. 87.100 / 7. 87.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
Input #0, image2, from 'boot_anim%02d.png':
 Duration: 00:00:00.44, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: png, rgba(pc), 184x96, 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'boot_anim.raw' already exists. Overwrite? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[swscaler @ 0x556d6993d940] full chroma interpolation for destination format 'rgb565le' not yet implemented
Output #0, rawvideo, to 'boot_anim.raw':
 Metadata:
 encoder : Lavf58.50.100
 Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, 184x96, q=2-31, 282 kb/s, 1 fps, 1 tbn, 1 tbc
 Metadata:
 encoder : Lavc58.100.100 rawvideo
frame= 2 fps=0.0 q=-0.0 Lsize= 69kB time=00:00:02.00 bitrate= 282.6kbits/s dup=0 drop=9 speed= 871x 
video:69kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%



Any help appreciated !


-
PHP ffmpeg convert GIF to MP4
17 août 2020, par Eduard UnruhI use this code to convert GIFs to MP4 :


$videoname = str_replace('.gif', '.mp4', $picname);
$ffmpeg = FFMpeg\FFMpeg::create(array(
 'ffmpeg.binaries' => 'ffmpeg/bin/ffmpeg.exe',
 'ffprobe.binaries' => 'ffmpeg/bin/ffprobe.exe',
 'timeout' => 6600, // The timeout for the underlying process
 'ffmpeg.threads' => 12, // The number of threads that FFMpeg should use
), $logger);

$video = $ffmpeg->open('memes/' . $folder . '/' . $picname);

$format = new \FFMpeg\Format\Video\X264('libvo_aacenc', 'libx264');
$format->setAdditionalParameters(array('-profile:v', 'baseline', '-pix_fmt', 'yuv420p'));

$video
 ->save($format, 'memes/' . $folder . '/' . $videoname);



Some GIFs are getting converted but some not, this is the error message :


[16-Aug-2020 14:47:21 Europe/Berlin] PHP Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command "ffmpeg/bin/ffmpeg.exe" -y -i "memes/38/Dr5W6yzR_gif_38.gif" -threads 12 -vcodec libx264 -acodec libvo_aacenc -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -profile:v baseline -pix_fmt yuv420p -pass 1 -passlogfile "C:\Windows\TEMP\ffmpeg-passes5f392ad8ba750qewzr/pass-5f392ad8bb9b7" "memes/38/Dr5W6yzR_gif_38.mp4":

Error Output:

 ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --e in C:\Inetpub\vhosts\yolol.de\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php on line 106



What is all this crap ?


Please help !


EDIT :


This is what I'm getting when running this code in cmd :


ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 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
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, gif, from 'C://ttt.gif':
 Duration: 00:00:03.08, start: 0.000000, bitrate: 10411 kb/s
 Stream #0:0: Video: gif, bgra, 636x357, 14.25 fps, 14.29 tbr, 100 tbn, 100 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (gif (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0000021dca771a40] height not divisible by 2 (636x357)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!



So the error is
height not divisible by 2 (636x357)
I guess, but what would be the solution ?

-
Getting error "DLL load failed while importing rect : %1 is not a valid Win32 application" while importing package
17 août 2020, par Sagar DonadkarI am using cython package to call Cpp API and in my cpp code i am using ffmpeg library and able to build my code successfully using bellow command


python setup.py build_ext --inplace --compiler=msvc



but when i try to import generated pyd file then i get error


PS D:\SiVUE\Backend\Cython\demo> python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import rect
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing rect: %1 is not a valid Win32 application.
>>> 
</module></stdin>


My entire code is provided bellow


header file
#ifndef RECTANGLE_H
#define RECTANGLE_H
#include <iostream>

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

using namespace std;

namespace shapes 
{
 class Rectangle {
 public:
 int x0, y0, x1, y1;
 Rectangle();
 Rectangle(int x0, int y0, int x1, int y1);
 ~Rectangle();
 int getArea();
 int ffmpegFile();
 void getSize(int* width, int* height);
 void move(int dx, int dy);
 };
}

#endif
</iostream>


Rectangle.Cpp file in ffmpegFile() i am calling mostly ffmpeg API



#include <iostream>
#include "Rectangle.hpp"

namespace shapes {
 

 // Default constructor
 Rectangle::Rectangle () {}

 // Overloaded constructor
 Rectangle::Rectangle (int x0, int y0, int x1, int y1) {
 this->x0 = x0;
 this->y0 = y0;
 this->x1 = x1;
 this->y1 = y1;
 }

 // Destructor
 Rectangle::~Rectangle () {}

 // Return the area of the rectangle
 int Rectangle::getArea () {
 return 10;
 }

 // Get the size of the rectangle.
 // Put the size in the pointer args
 void Rectangle::getSize (int *width, int *height) {
 (*width) = x1 - x0;
 (*height) = y1 - y0;
 }

 // Move the rectangle by dx dy
 void Rectangle::move (int dx, int dy) {
 this->x0 += dx;
 this->y0 += dy;
 this->x1 += dx;
 this->y1 += dy;
 }
 int Rectangle::ffmpegFile()
 {
 AVFormatContext *fmt_ctx = NULL;
 AVDictionaryEntry *tag = NULL;
 int ret = 0;
 char* filename = "D:\\Discovery.mp4";

 if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)))
 return ret;

 if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
 av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
 return ret;
 }

 while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
 printf("%s=%s\n", tag->key, tag->value);

 avformat_close_input(&fmt_ctx);
 return ret;
 }
}
</iostream>


Rectangle.pxd file declaration for cpp file function and variable


cdef extern from "Rectangle.cpp":
 pass
cdef extern from "Rectangle.hpp" namespace "shapes":
 cdef cppclass Rectangle:
 Rectangle() except +
 Rectangle(int, int, int, int) except +
 int x0, y0, x1, y1
 int getArea()
 void getSize(int* width, int* height)
 void move(int, int)
 int ffmpegFile()



rect.pyx file i am calling cpp API


# distutils: language = c++

from Rectangle cimport Rectangle

cdef class PyRectangle:
 cdef Rectangle c_rect # Hold a C++ instance which we're wrapping

 def __cinit__(self, int x0, int y0, int x1, int y1):
 self.c_rect = Rectangle(x0, y0, x1, y1)

 def get_area(self):
 return self.c_rect.getArea()

 def get_size(self):
 cdef int width, height
 self.c_rect.getSize(&width, &height)
 return width, height

 def move(self):
 print(self.c_rect.ffmpegFile())



setup.py
I provided pyx file and ffmpeg library path as well as include path


from distutils.core import setup
from setuptools import Extension
from Cython.Build import cythonize 

sfc_module = [Extension('rect', sources = ['rect.pyx'],
 include_dirs = ['D:\\SiVUE\\Backend\\Cython\\demo\\ffmpeg\\include\\'],
 library_dirs = ['D:\\SiVUE\\Backend\\Cython\\demo\\ffmpeg\\lib\\'],
 libraries = ['avcodec','avdevice','avfilter','avformat','avutil','postproc','swresample','swscale'],
 language='c++')]

setup(name = 'superfastcode', version = '1.0',
 description = 'Python Package with superfastcode C++ extension',
 ext_modules = cythonize(sfc_module),
 include_dirs = ['D:\\SiVUE\\Backend\\Cython\\demo\\ffmpeg\\include\\']
 )



Thank You