
Recherche avancée
Autres articles (62)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (...)
Sur d’autres sites (6957)
-
Linker errors when building a simple c++ program with ffmpeg
15 février 2023, par Serban StoenescuI have this c++ program :


#include <iostream>

extern "C"
{
 #include <libavcodec></libavcodec>avcodec.h>
 #include <libavformat></libavformat>avformat.h>
 #include <libswscale></libswscale>swscale.h>

}

namespace hrean::ffmpeg
{
namespace detail
{
 
}//namespace detail

void testFFmpeg()
{
 AVFormatContext *avFormatContext = avformat_alloc_context();
 //I can comment out the rest of the function, the error is the same

} //testFFmpeg()

} //namespace hrean::ffmpeg


int main(int argc, char **argv)
{
 try
 {
 hrean::ffmpeg::testFFmpeg();
 }
 catch(const std::runtime_error& e)
 {
 std::cerr << "Error! " << e.what() << '\n';
 return -1;
 }
 catch(...)
 {
 std::cerr << "Unknown error\n";
 return -1;
 }
 
 return 0;
}
</iostream>


The CMakeLists.txt for this is :


cmake_minimum_required(VERSION 3.13)
project(hrean)

add_subdirectory(lib/ffmpeg-module)

message("[temp] FFMPEG_INCLUDE_DIRS = ${FFMPEG_INCLUDE_DIRS}")
message("[temp] FFMPEG_LIBRARIES = ${FFMPEG_LIBRARIES}")
add_executable(hrean-app src/main.cpp)
target_include_directories(hrean-app PUBLIC ${FFMPEG_INCLUDE_DIRS})
target_link_libraries(hrean-app PUBLIC ${FFMPEG_LIBRARIES})



The CMakeLists.txt for lib/ffmpeg-module contains only


find_package(FFmpeg REQUIRED MODULE)



The CMake output is :


-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'libavcodec'
-- Found libavcodec, version 60.2.100
-- Checking for module 'libavformat'
-- Found libavformat, version 60.2.100
-- Checking for module 'libavdevice'
-- Found libavdevice, version 60.0.100
-- Checking for module 'libavutil'
-- Found libavutil, version 58.1.100
-- Checking for module 'libavfilter'
-- Found libavfilter, version 9.1.100
-- Checking for module 'libswscale'
-- Found libswscale, version 7.0.100
-- Checking for module 'libpostproc'
-- Found libpostproc, version 57.0.100
-- Checking for module 'libswresample'
-- Found libswresample, version 4.9.100
-- Found FFmpeg: /home/serban/ffmpeg_build/lib/libavcodec.a;/home/serban/ffmpeg_build/lib/libavformat.a;/home/serban/ffmpeg_build/lib/libavutil.a 
[temp] FFMPEG_INCLUDE_DIRS = /home/serban/ffmpeg_build/include
[temp] FFMPEG_LIBRARIES = /home/serban/ffmpeg_build/lib/libavcodec.a;/home/serban/ffmpeg_build/lib/libavformat.a;/home/serban/ffmpeg_build/lib/libavutil.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/serban/Work/hrean/build



When I run make, I get the following errors. The problem is, this worked perfectly yesterday and I changed nothing. I create a new Ubuntu virtual machine, everything fresh and I still get the same problem. The output is 1000+ lines long, here is some of it :


[ 50%] Building CXX object CMakeFiles/hrean-app.dir/src/main.cpp.o
[100%] Linking CXX executable hrean-app
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(amvenc.o): in function `amv_write_packet':
/home/serban/ffmpeg/libavformat/amvenc.c:356: undefined reference to `av_packet_unref'
/usr/bin/ld: /home/serban/ffmpeg/libavformat/amvenc.c:357: undefined reference to `av_packet_ref'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(amvenc.o): in function `amv_deinit':
/home/serban/ffmpeg/libavformat/amvenc.c:209: undefined reference to `av_packet_free'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(amvenc.o): in function `amv_init':
/home/serban/ffmpeg/libavformat/amvenc.c:111: undefined reference to `avcodec_get_name'
/usr/bin/ld: /home/serban/ffmpeg/libavformat/amvenc.c:117: undefined reference to `avcodec_get_name'
/usr/bin/ld: /home/serban/ffmpeg/libavformat/amvenc.c:188: undefined reference to `av_new_packet'
/usr/bin/ld: /home/serban/ffmpeg/libavformat/amvenc.c:196: undefined reference to `av_packet_alloc'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `asf_read_close':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1413: undefined reference to `av_packet_free'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `asf_read_single_payload':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1119: undefined reference to `av_new_packet'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `asf_read_packet':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1388: undefined reference to `av_packet_move_ref'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `reset_packet':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1030: undefined reference to `av_packet_unref'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `asf_deinterleave':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1313: undefined reference to `av_packet_unref'
/usr/bin/ld: /home/serban/ffmpeg/libavformat/asfdec_o.c:1314: undefined reference to `av_packet_from_data'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `asf_read_replicated_data':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1043: undefined reference to `av_new_packet'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `asf_read_timestamp':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1463: undefined reference to `av_packet_alloc'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `reset_packet':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1030: undefined reference to `av_packet_unref'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(asfdec_o.o): in function `asf_read_timestamp':
/home/serban/ffmpeg/libavformat/asfdec_o.c:1512: undefined reference to `av_packet_unref'



Any idea how to debug this ?


Later edit :
This is the find script I am using : FindFFmpeg.cmake
I changed the way I link to the libraries, this way causes the least amount of errors :


set(ORDERED_FFMPEG_LIBRARIES ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${AVUTIL_LIBRARIES})
message("[temp] ORDERED_FFMPEG_LIBRARIES=${ORDERED_FFMPEG_LIBRARIES}")
add_executable(hrean-app src/main.cpp)

target_include_directories(hrean-app PUBLIC ${FFMPEG_INCLUDE_DIRS})
target_link_libraries(hrean-app PUBLIC ${ORDERED_FFMPEG_LIBRARIES})



The errors are similar, but they seem to point to other locations :


[100%] Linking CXX executable hrean-app
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(mov.o): in function `mov_read_cmov':
/home/serban/ffmpeg/libavformat/mov.c:5578: undefined reference to `uncompress'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(swfdec.o): in function `swf_read_packet':
/home/serban/ffmpeg/libavformat/swfdec.c:393: undefined reference to `uncompress'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(swfdec.o): in function `swf_read_header':
/home/serban/ffmpeg/libavformat/swfdec.c:161: undefined reference to `inflateInit_'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(swfdec.o): in function `zlib_refill':
/home/serban/ffmpeg/libavformat/swfdec.c:134: undefined reference to `inflate'
/usr/bin/ld: /home/serban/ffmpeg_build/lib/libavformat.a(swfdec.o): in function `swf_read_close':
/home/serban/ffmpeg/libavformat/swfdec.c:557: undefined reference to `inflateEnd'



Do I have to link to anything else ?


Regards,
Serban


-
how input the file text to ffmpeg ? simple text
18 juillet 2023, par manuelthe file text.txt :


./folder1/folder2/AAA.avi
./folder2/AAB.avi
.ABA.avi
./folder6/BBA.avi
...
...



for bash :


batchfiles="text.txt"
ffmpeg -i $batchfiles $batchfiles.mp4



result error :


text.txt: Invalid data found when processing input



how resolve it ? I'm sure that I'm wrong code...can you help me ? thank you


-
What video codecs work on Google Chromebook
3 mars 2019, par MonkeyDLuffyI’m trying to put a show on my friends Google Chromebook but the mp4 files show up black when trying to watch them on said Chromebook, audio works fine. I found out that it is a video encoding problem but I cannot find a list of video formats that work on the Chromebook. I have ffmpeg and handbrake to try and test some things, but if someone could tell me a ffmpeg code that will convert the video files into a format that works on a Google Chromebook that would help a lot.
What I’ve tried :
ffmpeg -i "Game of Thrones S02E01 The North Remembers.mkv" codec mpeg "Game of Thrones S02E01 The North Remembers.mp4"
Which gives error :
[NULL @ 00000177196ea500] Unable to find a suitable output format for
’codec’ codec : Invalid argument