
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (44)
-
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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...)
Sur d’autres sites (6509)
-
MinGW 64 - CMake Error - CMake will not be able to correctly generate this project. (Windows11 - ffmpeg - AudioToolboxWrapper)
22 janvier 2024, par corruptsmurfI occasionally encode some audio, and I am trying to modify my install of ffmpeg using the code and instructions from the following Github repo :
https://github.com/dantmnf/AudioToolboxWrapper


Instructions from the above Github page :


# in MSYS2 MinGW shell
cd path/to/this/repo
mkdir build
cd build
prefix="$PWD/install-prefix"
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$prefix" ..
make install

# test if we can use the wrapper library, it should not crash
./testapp

mkdir ffmpeg
cd ffmpeg
export CFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib"
path/to/ffmpeg/source/tree/configure --enable-audiotoolbox
make LD="${prefix}/bin/atw_ldwrapper"

# test if ffmpeg can use it
./ffmpeg -f lavfi -i sine=1000 -c aac_at -f mp4 -y NUL



My OS is Windows 11 Pro 64-bit, Version 10.0.22621 Build 22621


The example on that git mentions using MSYS2 MinGW, which I didn't have, so I did the following :


- 

- Created a folder at C :/01Code/ATW for this project.
- Installed MSYS2 MINGW64 using installer from https://github.com/msys2/msys2-installer/releases
- Began to run through the commands from AudioToolboxWrapper
- Ran into issues running the command
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$prefix" ..
- As part of troubleshooting, I did the following :












pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-gdb
pacman -S mingw-w64-x86_64-cmake
pacman -S gcc
pacman -S gdb
pacman -S cmake
pacman -S make



- 

- I updated the PATH environment variable to include the msys path (C :\msys64\usr\bin)
- I opened CMD as admin and executed
C:\msys64\mingw64\bin>mklink make mingw32-make.exe
to create a symbolic link for make (recommended by another forum post).
Honestly, I cannot remember how many pacman commands I ran trying to find the correct dependency.






So here is what happens :


cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$prefix" ..





CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required) :

Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.


— The C compiler identification is GNU 13.2.0

— Detecting C compiler ABI info

— Detecting C compiler ABI info - failed

— Check for working C compiler : C :/msys64/mingw64/bin/cc.exe

— Check for working C compiler : C :/msys64/mingw64/bin/cc.exe - broken

CMake Error at C :/msys64/mingw64/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message) :

The C compiler

"C :/msys64/mingw64/bin/cc.exe"

is not able to compile a simple test program.

It fails with the following output :


Change Dir : 'C :/01Code/ATW/build/CMakeFiles/CMakeScratch/TryCompile-orrmfo'


Run Build Command(s) : C :/msys64/mingw64/bin/cmake.exe -E env VERBOSE=1 C :/msys64/mingw64/bin/make -f Makefile cmTC_39424/fast

no such file or directory

CMake will not be able to correctly generate this project.


Call Stack (most recent call first) :

CMakeLists.txt:2 (project)

— Configuring incomplete, errors occurred !




The command generates some output, but I am assuming it is incomplete. If I try the next command, I get this :


# make install
make: *** No rule to make target 'install'. Stop.



-
Is there any problem in my FFMPEG encoder client code ?
29 janvier 2024, par kyhnzI am trying to write code have function of capture video stream, encode as hevc265 and send to server as UDP :


// There can some unnecessary library imports, rule 1: If it is ok, don't touch it!

#include <iostream>
#include <sys></sys>types.h>
#include 
#include <cstring>
#include <sys></sys>socket.h>
#include <arpa></arpa>inet.h>
#include <netinet></netinet>in.h> 
#include <string>
#include <cstdlib>
#include <cstdio>

extern "C"
{
#include <libavutil></libavutil>frame.h>
#include <libavdevice></libavdevice>avdevice.h>
#include <libavformat></libavformat>avformat.h>
#include <libavcodec></libavcodec>avcodec.h>
#include <libavutil></libavutil>imgutils.h>
#include <libavcodec></libavcodec>packet.h>
#include <libavcodec></libavcodec>codec_id.h>
#include <libavutil></libavutil>error.h>
#include <libavutil></libavutil>error.h>
#include <libavutil></libavutil>opt.h>
}

#define PORT 9999
#define IP_ADDRESS "127.0.0.1"

using namespace std;

int main(){
 const int width = 1080;
 const int height = 720;
 const int fps = 18; 
 const auto resulation = "1080x720";
 const auto device = "/dev/video0";
 const auto format = "v4l2";
 const AVCodecID codec_id = AV_CODEC_ID_H265;

 avdevice_register_all();
 avformat_network_init();
 AVFormatContext *formatContext = nullptr;

 AVDictionary *format_opts = nullptr;
 av_dict_set(&format_opts, "framerate", "18", 0);;
 av_dict_set(&format_opts, "video_size", resulation, 0);
 
 const AVInputFormat *inputFormat = av_find_input_format(format);
 if (!inputFormat)
 {
 cerr << "Unknown input format: " << format << endl;
 return 1;
 }
 cout << "Input format: "<< format << endl;

 const AVCodec *codec = avcodec_find_encoder(codec_id);
 if (!codec) {
 cerr << "Codec can't find "<< codec_id << endl;
 return 1;
 }
 cout << "Found codec: "<< codec_id << endl;

 AVCodecContext *avctx = avcodec_alloc_context3(codec);
 if (!avctx) {
 cerr << "Error: Could not create encoder!" << endl;
 return 1;
 }
 cout << "Create encoder. " << endl;


 avctx->bit_rate = 1000000;
 avctx->width = width; 
 avctx->height = height; 
 avctx->pix_fmt = AV_PIX_FMT_YUV420P; 
 avctx->time_base = (AVRational){1, fps};
 avctx->framerate = (AVRational){fps, 1};
 avctx->gop_size = fps*2;
 avctx->refs = 3;

 av_opt_set(avctx->priv_data, "preset", "medium", 0);
 av_opt_set(avctx->priv_data, "crf", "18", 0);
 av_opt_set(avctx->priv_data, "tune", "zerolatency", 0);

 if (avcodec_open2(avctx, codec, nullptr) < 0) {
 cerr << "Error: Couldn't open codec" << endl;
 return 1;
 }
 cout << "Open codec succesfully." << endl;

 int open_input = avformat_open_input(&formatContext, device,
 const_cast<avinputformat>(inputFormat), &format_opts);
 if (open_input != 0)
 {
 cerr << "Device cant open " << device << endl;
 return 1;
 }
 cout << "Device active: " << device <width = avctx->width;
 frame->height = avctx->height;
 frame->format = avctx->pix_fmt;

 if(av_frame_get_buffer(frame, 0) != 0){
 cerr << "Error: video frame " << endl;
 return 1;
 }cout << "Video frame has been created." << endl;

 if(av_frame_make_writable(frame) != 0){
 cerr << "Error: frame is not writable" << endl;
 return 1;
 }

 AVPacket *packet= av_packet_alloc();
 if (!packet) {
 cerr << "error: has not been created packet" << endl;
 }

 av_dump_format(formatContext, 0, device, 0);
 av_dict_free(&format_opts);
 
 int socket_client = socket(AF_INET, SOCK_DGRAM, 0);
 if (socket_client == -1) {
 cerr << "Error: socket!" << endl;
 exit(EXIT_FAILURE);
 }
 cout << "Socket has been created" << endl;

 struct sockaddr_in serverAddr = {0};
 serverAddr.sin_family = AF_INET;
 serverAddr.sin_port = htons(PORT);
 serverAddr.sin_addr.s_addr = inet_addr(IP_ADDRESS);

 while (true) {
 if (av_read_frame(formatContext, packet) != 0) {
 cerr << "Error" << endl;
 av_packet_unref(packet);
 continue;
 }

 frame->data[7] = packet->data; 
 frame->linesize[7] = packet->size;

 if (avcodec_send_frame(avctx, frame) != 0){
 cerr << "Error: Frame sending is missing ---> "<< &av_strerror << endl;
 av_packet_unref(packet);
 continue;
 }

 if (avcodec_receive_packet(avctx, packet) != 0){
 cerr << "Error: Packet giving is missing! ---> " << &av_strerror << endl;
 av_packet_unref(packet);
 continue;
 }

 ssize_t snd = sendto(socket_client, packet->data, packet->size,
 MSG_CONFIRM, (struct sockaddr *)&serverAddr,
 sizeof(serverAddr));

 if(snd == -1){
 cerr << "Error: Data sending failed !" << endl;
 av_packet_unref(packet);
 continue;
 }else {
 cout << "Data sending succesfully" << endl;
 }

 av_packet_unref(packet);
 av_frame_unref(frame);
 }

 av_frame_free(&frame);
 av_packet_free(&packet);
 close(socket_client);
 avformat_free_context(formatContext);
 avformat_close_input(&formatContext);
 avformat_network_deinit();

 return 0;
}
</avinputformat></cstdio></cstdlib></string></cstring></iostream>


There is such an output, I do not understand the reason yet :


[video4linux2,v4l2 @ 0x643732e80b40] The V4L2 driver changed the video from 1080x720 to 1280x720
[video4linux2,v4l2 @ 0x643732e80b40] The V4L2 driver changed the video from 1280x720 to 640x480
[video4linux2,v4l2 @ 0x643732e80b40] The driver changed the time per frame from 1/18 to 1/30



Is there any problem in my encoder client code ?


In addition, i can't send datas to server.


-
How the ffmpeg is fixing Handle page termination with same page number ...? [closed]
11 avril 2024, par adarshIm working on the teletext subtitle feature and faced with subs not clearing issue.
the subtitle lines remain displayed until being replaced by a new version of the specific line. So the subtitles never disappear and often an old line is still displayed, after another, more recent line is displayed/updated.
take a look at the issue in this sample video file : https://code.videolan.org/videolan/vlc/uploads/58c2e1660e94e2df5e8cdb75edf531d9/GODFATHER__03_.ts
Issue reported : https://sourceforge.net/p/zapping/bugs/203/


The player is using ffmpeg and libzvbi library.


At first I suspected that the Erase Page Flag (C4) in the Page Header was not set, but the flag was indeed set (at least once between two LOPs with subtitles). After further debugging it turned out that the Teletext service in the two issues consists of just a single Teletext page - which is the reason here :


The Teletext spec defines the Magazine Serial Flag (C11) in Table 2 (ETSI EN 300 706 v1.2.1) as (bold font by me) :


When set to '1' the service is designated to be in Serial mode and the transmission of a page is terminated by the next page header with a different page number.
When set to '0' the service is designated to be in Parallel mode and the transmission of a page is terminated by the next page header with a different page number but the same magazine number.
The same setting shall be used for all page headers in the service.
(BTW it doesn't really matter, but in these two cases this flag is always 0)


In vbi_decode_teletext in /src/packet.c, storing the page is aborted, if the condition "page terminated" in the C11 definition is not met. But as the service here consists of only one page, this condition is never met !


Luckily, this issue was fixed in ffmpeg- https://github.com/FFmpeg/FFmpeg/commit/b1e0e216462a989a39e7b413aef6d32f8cedc154


and also in zvbi :
https://github.com/zapping-vbi/zvbi/commit/40a6ab0200c46b67b059b5b1fb15793ce780892a


I understand the root cause and fix in zvbi library, and how it is ignoring c4 flag in case the same page no.


But i want to understand how the ffmpeg fix is working ?
ffmpeg fix : https://github.com/FFmpeg/FFmpeg/commit/b1e0e216462a989a39e7b413aef6d32f8cedc154


what is the rule for repeated page headers ?