
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (47)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (5781)
-
youtube-dl doesn't see ffmpeg in the executable
30 novembre 2019, par Михаил МуратовI am writing a program to download music and videos via youtube-dl in python. Next, I pack the script into an executable file via pyinstaller.
The problem is that youtube-dl (in the executable) doesn’t see ffmpeg and ffprobe, even though I add them to the spec file.
As far as I know youtube-dl has the
ffmpeg_location
parameter, but that’s only in the console version. Maybe it is also for python ? But I didn’t find any information about it.How do I solve the problem ?
command to create executable :
pyinstaller --upx-dir=c:\users\exe-builder c:\users\exe-builder\youtubedownloader\main.spec
.spec file :
# -*- mode: python -*
block_cipher = None
a = Analysis(['C:\\Users\\Exe-Builder\\YoutubeDownloader\\main.py'],
pathex=['C:\\Users\\Exe-Builder\\YoutubeDownloader'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
a.binaries += [('ffmpeg.exe','C:\\Users\\Exe-Builder\\YoutubeDownloader\\ffmpeg.exe', "Binary"),
('ffprobe.exe','C:\\Users\\Exe-Builder\\YoutubeDownloader\\ffprobe.exe', "Binary")]
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='MediaDownloader',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=['vcruntime140.dll'],
runtime_tmpdir=None,
console=True)very small example :
import youtube_dl
url = 'https://www.youtube.com/watch?v=MIk55C1s0ns'
outtmpl = '\\%(title)s.%(ext)s'
ydl_opts = {'format': 'bestaudio/best',
'outtmpl': outtmpl,
'postprocessors': [{'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '128'}]}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
info_dict = ydl.extract_info(url, download=True)error message :
youtube_dl.utils.DownloadError: ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.
-
ffplay does not exit in forked child
6 septembre 2019, par user12030145ffplay -autoexit
does not exit in a forked childI need to pipe my application (stdout) to
ffplay
(stdin). I do this by forkingffplay
as a child and using-i pipe:0
as argument.#include
#include
#include <sys></sys>types.h>
#include <sys></sys>wait.h>
int main(int argc, const char** argv)
{
int tube[2];
int c;
FILE* f = fopen(argv[1], "rb");
pid_t pid;
if (argc < 2) return -1;
if (pipe(tube)) {
perror("Pipe");
return -1;
}
// main process cats a .mlp file to stdout, sent to a child ffplay stdin through a pipe
char* const arg[] = {"-i", "pipe:0", "-f", "mlp", "-nodisp", "-autoexit", NULL};
switch (pid = fork()) {
case -1:
fprintf(stderr,"%s\n", "Could not launch ffplay");
break;
case 0:
close(tube[1]);
dup2(tube[0], STDIN_FILENO);
execv("/usr/bin/ffplay", arg);
fprintf(stderr, "%s\n", "Runtime failure in ffplay child process");
return -2;
default:
close(tube[0]);
dup2(tube[1], STDOUT_FILENO);
}
// Here the main process code sending the .mlp file to stdout...
while ((c = fgetc(f)) != EOF) putchar(c);
waitpid(pid, NULL, 0);
fclose(f);
// main never returns
return 0;
}The issue is that in this context,
ffplay -autoexit
never exits (GNU-Linux platform). In a main process,ffplay -autoexit
always exits at the end of a media file.
Is there a pure C workaround without usingsystem
,popen
or scripting ?
Is this a feature or a bug offfplay
(I cannot tell) ? -
MSVC fatal error LNK1120 : 1 unresolved externals with FFMPEG libs
16 août 2019, par JaredI am trying to utilize the ffmpeg libraries in a program of my own and am having trouble linking them. Specifically, In my a basic program I am receiving
fatal error LNK1120: 1 unresolved externals
errors. The program is :#include <iostream>
#include <libswresample></libswresample>swresample.h>
int main()
{
std::cout << "Hello World!\n";
struct SwrContext* swr_ctx = swr_alloc();
if (!swr_ctx) {
std::cout << "Could not allocate resampler context";
}
}
</iostream>I downloaded prebuild libraries from https://ffmpeg.zeranoe.com/builds/, specifically the Windows x64 dev package which includes the .def/.lib as well as .dll files.
I originally tried (and intend to ultimately use) cmake to generate the MSVC sln files. The cmake file is :
cmake_minimum_required(VERSION 3.5)
project(ffmpeg_jni)
# Find the JNI bits
find_package(JNI)
# Search for the ffmpeg libraries
set(ffmpeg_include_hint "ffmpeg-dev/include")
set(ffmpeg_lib_hint "ffmpeg-dev/lib")
find_path(SWRESAMPLE_INCLUDE_DIR libswresample/swresample.h PATHS ${ffmpeg_include_hint})
find_library(SWRESAMPLE_LIBRARY swresample PATHS ${ffmpeg_lib_hint})
add_library(swresample SHARED IMPORTED)
set_target_properties(swresample PROPERTIES
IMPORTED_LOCATION "${SWRESAMPLE_LIBRARY}"
IMPORTED_IMPLIB "${SWRESAMPLE_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${SWRESAMPLE_INCLUDE_DIR}"
)
# Setup basic include dirs
set(includeDIRS
src/main/cpp
${JAVA_INCLUDE_PATH})
# Setup windows specific includes
set(includeDIRS
${includeDIRS}
${JAVA_INCLUDE_PATH}/Win32)
include_directories(${includeDIRS})
set(WRAPPER_SRC
src/main/cpp/logging.c
src/main/cpp/logging.h
src/main/cpp/main.cpp)
add_library(ffmpeg_jni SHARED ${WRAPPER_SRC})
target_link_libraries(ffmpeg_jni PRIVATE swresample)The generated solution compiles and has proper access to the include files (Visual Studio can even take me to the declarations). The issue comes in the linking phase of the build where I receive :
error LNK2019 : unresolved external symbol "struct SwrContext * __cdecl
swr_alloc(void)" (?swr_alloc@@YAPEAUSwrContext@@XZ) referenced in
function mainThinking that I perhaps had something wrong in cmake since I am still pretty new with it I tried making a simple demo as a pure visual studio project following what I have found in countless online demos for adding an external library to a project. Specifically this included :
- Adding the directory containing the header files to Properties->C/C++->General->Additional Include Directories
- Adding the directory containing the .lib files to Properties->Linker->General->Additional Library Directories (Note that the cmake path did not do this but instead added the lib file via a relative path)
- Adding the .lib file to Properties->Linker->Input->Additional Dependencies
At this point any searching efforts I undertake show me different people doing the same things which tells me I’ve been looking at this too long to find the answer myself and its something trivial that I’m missing/not understanding.