
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (63)
-
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 (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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 (...)
Sur d’autres sites (9091)
-
FFMPEG : Reconnect not working for HTTP source with UDP output [closed]
5 octobre 2023, par QuinnellI am streaming an audio input with a static video slate. Audio comes from an HTTP source. I output to a multicast IP via UDP.


The stream periodically fails. The process needs to be killed and manually restarted. Would like to have the stream automatically reconnect itself upon failure.


Server runs CentOS 7.
FFMPEG version : ffmpeg version N-107408-g882aac99d2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)


The server will eventually be replaced with AlmaLinux 8.8 running the latest version of ffmpeg.


Currently experimenting with the RECONNECT option but so far it has failed to restore the stream automatically.


note : IPs and identifying variables have been sanitized.


#! /bin/bash

filename="test1.yuv"
streamTitle="Reconnect_TEST1" # friendly name for stream. Helps when running pgrep
streamInput="100.100.100.100:8002" # Input IP:Port we're receiving on.
multicastOut="232.100.100.100:5500" # Multicast IP:Port we're sending to
logFile=/home/username/logs/${streamTitle}.log # Log file we output the nohup data to.

nohup ffmpeg \
 -re \
 -video_size 854x480 \
 -i $filename \
 -i http://${streamInput} \
 -reconnect 1 \
 -reconnect_at_eof 1 \
 -reconnect_streamed 1 \
 -reconnect_on_network_error 1 \
 -reconnect_on_http_error 1 \
 -reconnect_delay_max 10 \
 -c:a ac3 \
 -ac 1 \
 -af loudnorm \
 -vf loop=loop=-1:size=1:start=0 \
 -c:v libx264 \
 -profile:v main \
 -s:v 854x480 \
 -aspect 16:9 \
 -r 15 -g 30 -bf 0 -crf 30 \
 -fflags +genpts -flags +cgop+ilme \
 -metadata title=$streamTitle \
 -metadata:s:a:0 language=eng \
 -mpegts_flags +pat_pmt_at_frames \
 -flush_packets 0 -threads 1 \
 -v verbose \
 -f mpegts udp://${multicastOut}?pkt_size=1316 \
 -loglevel verbose >$logFile &



-
FFmpeg 6.0 won't work because the header files can't connect or interact with each other. How do I fix the files ?
11 septembre 2023, par Señor TontoI am creating a win32 API C++ application with Microsoft Visual Studio 2022 in a .sln file. I've got quite far in basic functionalities & decided to try out video decoding & playing ; I've practiced this before but not with C++. So, I looked to see good libraries & found FFmpeg. Of course, I thought this would be quite straightforward - just import the headers & code, right ? No. Firstly, the FFmpeg I'm using is one of the pre-built binaries. The 'ffmpeg-master-latest-win64-gpl-shared.zip' From the BtbN Github repository. I decompressed it with WinRar & placed the files in Program Files (x86). Later on, I realised my mistake of placing it with 32-bit programs since it's a 64-bit build. So I transferred it to Program Files. Even after this though my issue persists. The issue being that the .h files of FFmpeg cannot communicate with each other. For some reason, they can't navigate to where the header files are. I am quite sure the reason for this may have something to do with where I save the files, the directory. Nowhere on the FFmpeg website can I see where you're expected to have the file directory at. I am sure there's a preset file path that is expected. Maybe I've named the FFmpeg folder incorrectly ? Or maybe it's not meant to go in Program Files ? The current directory for the FFmpeg folder for me is : C :\Program Files\FFmpeg. Below I will provide pictures of the errors I get where the code can't connect to other .h files as well as the file path. I'll also provide my code.


#include //imports the main win32 API library
#include //imports macros for handling Unicode & ASCII char sets
#include //defines the common control classes
#include //imports the standard C library
#include 
#include 
#include <iostream>
#include <fstream>
#include <string>

extern "C"
{
#include 
#include 
#include 
#include 
}

#pragma comment(lib, "Comctl32.lib") //tells the linker to include Comctl32.lib in the .exe
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\avcodec.lib")
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\avformat.lib")
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\avutil.lib")
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\swscale.lib")

#define EDIT_CONTROL 1
#define OPEN_FILE_BTN 2
#define SAVE_FILE_BTN 3
#define EMBOLDEN_BTN 4
#define ITALICISE_BTN 5
#define SCROLL_CONTAINER 6
#define FILEMENU_OPEN_FILE_BTN 7
#define ADD_ROW_BTN 8
#define CELL_1_ID 9
#define CELL_2_ID 10
#define CELL_3_ID 11
#define SCROLL_CONTAINER_TBL 12
// 946 0759 0609 | 163 739

HINSTANCE g_hInstance;
HWND g_hWndMain, g_hWndTabs, openFileBtn, saveFileBtn, hOpenFileEdit, hScrollContainer, hEditControl, tabHandle, emboldenBtn, italiciseBtn, FilemenuOpenFileBtn, tableContainer, tblHeaderOne,
tblHeaderTwo, tblHeaderThree, addRowBtn, hAddRowDialogue, hWnd, hWndCell1Label, hWndCell1Edit, hWndCell2Label, hWndCell2Edit, hWndCell3Label, hWndCell3Edit, hWndOkButton, hWndCancelButton, hRow, hCell1, hCell2, hCell3,
hWMP, OpenMp4Btn, hWMPContainer, hPlayBtn;
HMENU hMenu, hSubMenu;
bool isBold = false, isItalic = false;


const int startX = 0;
const int startY = 60;
const int ROW_HEIGHT = 20;
const int CELL_WIDTH = 110;
static int numRows = 1;
static int numCols = 3;

LRESULT CALLBACK WindowProcessMessages(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK AddRowDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);

int WINAPI wWinMain(
 _In_ HINSTANCE currentInstance,
 _In_opt_ HINSTANCE previousInstance,
 _In_ LPWSTR cmdLine,
 _In_ int cmdCount)
{
 const wchar_t* CLASS_NAME = L"Windows App";
 WNDCLASS wc{};
 wc.hInstance = currentInstance;
 wc.lpszClassName = CLASS_NAME;
 wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
 wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
 wc.lpfnWndProc = WindowProcessMessages;
 RegisterClass(&wc);

 g_hWndMain = CreateWindow(CLASS_NAME, L"Windows App",
 WS_OVERLAPPEDWINDOW,
 CW_USEDEFAULT, CW_USEDEFAULT,
 800, 600,
 nullptr, nullptr, nullptr, nullptr);

 if (g_hWndMain == NULL) {
 return 0;
 }

 // Initialize common controls
 INITCOMMONCONTROLSEX icex;
 icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
 icex.dwICC = ICC_TAB_CLASSES;
 InitCommonControlsEx(&icex);

 // Create tab control
 g_hWndTabs = CreateWindow(WC_TABCONTROL, L"",
 WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | TCS_SINGLELINE,
 0, 0, 800, 600,
 g_hWndMain, nullptr, currentInstance, nullptr);

 if (g_hWndTabs == NULL) {
 return 0;
 }

 // Add tabs to tab control, seperate tab later
 TCITEM tcitem;
 tcitem.mask = TCIF_TEXT;

 wchar_t buf1[] = L"Table View";
 tcitem.pszText = buf1;
 TabCtrl_InsertItem(g_hWndTabs, 0, &tcitem);

 wchar_t buf2[] = L"Text Files";
 tcitem.pszText = buf2;
 TabCtrl_InsertItem(g_hWndTabs, 1, &tcitem);

 wchar_t buf3[] = L"mp4 Files";
 tcitem.pszText = buf3;
 TabCtrl_InsertItem(g_hWndTabs, 2, &tcitem);



 //original location of button intitialisation


 ShowWindow(g_hWndMain, SW_SHOWDEFAULT);
 UpdateWindow(g_hWndMain);

 MSG msg{};
 while (GetMessage(&msg, nullptr, 0, 0)) {
 TranslateMessage(&msg);
 DispatchMessage(&msg);
 }
 return 0;
}

</string></fstream></iostream>


I severely doubt my code has anything to do with the issue though. It's probably directory-based. I just placed wWinmain here to keep with the character limit.






-
memcpy to av_malloc's memory crash
26 octobre 2023, par PeacefulWindyI use the code in x64 windows :


#include<iostream>
#include<memory>
#include<vector>
extern "C"
{
#include <libavcodec></libavcodec>avcodec.h>
#include<libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>imgutils.h>
#include<libswscale></libswscale>swscale.h>
#include<libswresample></libswresample>swresample.h>
}

struct BufferData
{
 uint8_t* ptr;
 size_t size;
 size_t file_size;
};

int main()
{
 auto file=fopen("E:/test.jpg", "rb");
 fseek(file, 0, SEEK_END);
 auto fileSize = ftell(file);
 fseek(file, 0, SEEK_SET);
 auto data = std::vector(fileSize);
 fread(data.data(), sizeof(uint8_t), fileSize, file);
 fclose(file);

 auto test = BufferData();
 test.ptr = data.data();
 test.size = data.size();
 test.file_size = data.size();
 auto buffer = (uint8_t*)av_malloc(4096 * 10);
 char errStr[128] = { 0 };

 auto avformatContext = avformat_alloc_context();
 auto avioContext = avio_alloc_context(buffer, 4096, 0, &test, [](void* opaque, uint8_t* buf, int buf_size)
 {
 BufferData* bd = (BufferData*)opaque;
 auto size = std::min(bd->size, (size_t)buf_size);

 if (!size)
 {
 return -1;
 }

 memcpy(buf, bd->ptr, size);
 bd->ptr += size;
 bd->size -= size;
 return (int)size;
 }, NULL, NULL);
 avformatContext->pb = avioContext;
 avformatContext->flags = AVFMT_FLAG_CUSTOM_IO;

 auto ret = avformat_open_input(&avformatContext, nullptr, nullptr, nullptr);
 if (ret != 0)
 {
 av_strerror(ret, errStr, sizeof(errStr));
 std::cout << errStr << std::endl;
 av_free(buffer);
 avformat_close_input(&avformatContext);
 return 0;
 }

 ret = avformat_find_stream_info(avformatContext, nullptr);
 if (ret < 0)
 {
 av_strerror(ret, errStr, sizeof(errStr));
 std::cout << errStr << std::endl;
 av_free(buffer);
 avformat_close_input(&avformatContext);
 return 0;
 }

 av_dump_format(avformatContext, 0, nullptr, 0);

 auto videoIndex = av_find_best_stream(avformatContext, AVMEDIA_TYPE_VIDEO, -1, -1, nullptr, 0);
 if (videoIndex == AVERROR_STREAM_NOT_FOUND)
 {
 av_free(buffer);
 avformat_close_input(&avformatContext);
 return 0;
 }
 else if (videoIndex == AVERROR_DECODER_NOT_FOUND)
 {
 av_free(buffer);
 avformat_close_input(&avformatContext);
 return 0;
 }

 auto videoCodecPar = avformatContext->streams[videoIndex]->codecpar;
 auto videoCodec = avcodec_find_decoder(videoCodecPar->codec_id);
 if (!videoCodec)
 {
 av_free(buffer);
 avformat_close_input(&avformatContext);
 return 0;
 }

 av_free(buffer);
 avformat_close_input(&avformatContext);
}
</vector></memory></iostream>


I use memcpy to copy data to buffer,it run to av_free(buffer) get crash.
ffmpeg version is 6.0.
Visual Studio version is 2022 with CMake.


Use fread replace memcpy,it can work !But I need to resolve load from std::vector memory,not fread.
I think maybe memory-align problem when run av_free,but I no way to find the cause.