Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (36)

  • Gestion générale des documents

    13 mai 2011, par

    Mé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, par

    Cette 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.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5737)

  • How to Show result after uploaded file in PHP

    23 avril 2022, par i0x4r

    I have a script that uploads the video to a server, everything is correct but there is a problem, after the upload of the video to the server is completed
it shows all the uploaded files in the (uploads) folder as array !

    


    I only want the result of the file I just uploaded, and it doesn't show me the previous files !
I need ffmpeg to improve video quality

    


    index.php

    


    &lt;?php&#xA;//index.php&#xA;&#xA;?>&#xA;&#xA;&#xA; &#xA;  &#xA;  &#xA;  <code class="echappe-js">&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js&quot;&gt;&lt;/script&gt;&#xA;        &lt;script src=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;        &#xA;  &#xA;  &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/dropzone.js&quot;&gt;&lt;/script&gt;&#xA;  &#xA; &#xA; &#xA;  
    &#xA;&#xA;
    &#xA;&#xA;

    &#xA; &#xA; &#xA; &#xA;
    &#xA;&#xA;

    &#xA;&#xA;
    &#xA;

    &#xA; &#xA;&#xA;&#xA;&lt;script&gt;&amp;#xA;&amp;#xA;$(document).ready(function(){&amp;#xA; &amp;#xA; Dropzone.options.dropzoneFrom = {&amp;#xA;  autoProcessQueue: true,&amp;#xA;  timeout: 300000,&amp;#xA;  acceptedFiles:&quot;video/*&quot;,&amp;#xA;  init: function(){&amp;#xA;   var submitButton = document.querySelector(&amp;#x27;#submit-all&amp;#x27;);&amp;#xA;   myDropzone = this;&amp;#xA;   submitButton.addEventListener(&quot;click&quot;, function(){&amp;#xA;    myDropzone.processQueue();&amp;#xA;   });&amp;#xA;   this.on(&quot;complete&quot;, function(){&amp;#xA;    if(this.getQueuedFiles().length == 0 &amp;amp;&amp;amp; this.getUploadingFiles().length == 0)&amp;#xA;    {&amp;#xA;     var _this = this;&amp;#xA;     _this.removeAllFiles();&amp;#xA;    }&amp;#xA;    list_image();&amp;#xA;   });&amp;#xA;  },&amp;#xA; };&amp;#xA;&amp;#xA; list_image();&amp;#xA;&amp;#xA; function list_image()&amp;#xA; {&amp;#xA;  $.ajax({&amp;#xA;   url:&quot;upload.php&quot;,&amp;#xA;   success:function(data){&amp;#xA;    $(&quot;#preview&quot;).html(data);&amp;#xA;   }&amp;#xA;  });&amp;#xA; }&amp;#xA;&amp;#xA; $(document).on(&amp;#x27;click&amp;#x27;, &amp;#x27;.remove_image&amp;#x27;, function(){&amp;#xA;  var name = $(this).attr(&amp;#x27;id&amp;#x27;);&amp;#xA;  $.ajax({&amp;#xA;   url:&quot;upload.php&quot;,&amp;#xA;   method:&quot;POST&quot;,&amp;#xA;   data:{name:name},&amp;#xA;   success:function(data)&amp;#xA;   {&amp;#xA;    list_image();&amp;#xA;   }&amp;#xA;  })&amp;#xA; });&amp;#xA; &amp;#xA;});&amp;#xA;&lt;/script&gt;&#xA;

    &#xA;

    upload.php

    &#xA;

        &lt;?php&#xA;&#xA;//upload.php&#xA;&#xA;$folder_name = &#x27;upload/&#x27;;&#xA;$tumb_name = &#x27;thumb/&#x27;;&#xA;$imageext = &#x27;.png&#x27;;&#xA;&#xA;if(!empty($_FILES))&#xA;{&#xA;&#xA; $temp_file = $_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;];&#xA; $location = $folder_name . $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; move_uploaded_file($temp_file, $location);&#xA; $upload = $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; $uploadStr = str_replace(" ", "\ ",$upload);&#xA; $locationStr = str_replace(" ","\ ",$location);&#xA; $cmd  = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&amp;1";&#xA; echo shell_exec($cmd);&#xA;}&#xA;&#xA;if(isset($_POST["name"]))&#xA;{&#xA; $filename = $folder_name.$_POST["name"];&#xA; $imagename = $thumb_name.$_POST["name"].$imageext;&#xA; unlink($filename);&#xA; unlink($imagename);&#xA;}&#xA;&#xA;$result = array();&#xA;&#xA;$files = scandir(&#x27;upload&#x27;);&#xA;&#xA;$output = &#x27;<div class="row">&#x27;;&#xA;&#xA;if(false !== $files)&#xA;{&#xA; foreach($files as $file)&#xA; {&#xA;  if(&#x27;.&#x27; !=  $file &amp;&amp; &#x27;..&#x27; != $file)&#xA;  {&#xA;   $output .= &#x27;&#xA;   <a href="http://stackoverflow.com/view.php?file=&#38;#x27;.$file.&#38;#x27;" target="_blank"> <img src="http://stackoverflow.com/feeds/tag/thumb/&#38;#x27;.$file.&#38;#x27;.png" class="img-thumbnail" width='246' height='138' /></a>&#xA;    <button type="button" class="btn btn-link remove_image">Remove</button>&#xA;   &#x27;;&#xA;  }&#xA; }&#xA;}&#xA;$output .= &#x27;</div>&#x27;;&#xA;echo $output;&#xA;&#xA;?>&#xA;

    &#xA;

    EDIT :&#xA;I put the example on an Array, I don't want it, I just want it to show the downloaded video I just uploaded as a result.

    &#xA;

    EDIT 2 :&#xA;There are some who say type $location and it displays the downloaded file, but this does not work !!!&#xA;I just tried more than once and with several uses, there is no display where the text is empty

    &#xA;

    This is an example of that

    &#xA;

    &lt;?php&#xA;&#xA;//upload.php&#xA;&#xA;$folder_name = &#x27;upload/&#x27;;&#xA;$tumb_name = &#x27;thumb/&#x27;;&#xA;$imageext = &#x27;.png&#x27;;&#xA;&#xA;if(!empty($_FILES))&#xA;{&#xA;&#xA; $temp_file = $_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;];&#xA; $location = $folder_name . $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; move_uploaded_file($temp_file, $location);&#xA; $upload = $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; $uploadStr = str_replace(" ", "\ ",$upload);&#xA; $locationStr = str_replace(" ","\ ",$location);&#xA; $cmd  = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&amp;1";&#xA; echo shell_exec($cmd);&#xA;}&#xA;&#xA;if(isset($_POST["name"]))&#xA;{&#xA; $filename = $folder_name.$_POST["name"];&#xA; $imagename = $thumb_name.$_POST["name"].$imageext;&#xA; unlink($filename);&#xA; unlink($imagename);&#xA;}&#xA;&#xA;&#xA;$output .= &#x27;Successfly file is "&#x27;.$location.&#x27;"&#x27;;&#xA;echo $output;&#xA;&#xA;?>&#xA;

    &#xA;

    Result : Successfly file is ""&#xA;no name file :(

    &#xA;

    EDIT 3 :

    &#xA;

    this code upload.php&#xA;functions not working

    &#xA;

    &lt;?php&#xA;&#xA;//upload.php&#xA;&#xA;$folder_name = &#x27;upload/&#x27;;&#xA;$tumb_name = &#x27;thumb/&#x27;;&#xA;$imageext = &#x27;.png&#x27;;&#xA;&#xA;if(!empty($_FILES))&#xA;{&#xA;&#xA; $temp_file = $_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;];&#xA; $location = $folder_name . $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; move_uploaded_file($temp_file, $location);&#xA; $upload = $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; $uploadStr = str_replace(" ", "\ ",$upload);&#xA; $locationStr = str_replace(" ","\ ",$location);&#xA; $cmd  = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&amp;1";&#xA; echo shell_exec($cmd);&#xA;}&#xA;&#xA;&#xA;echo "The file " . $location . " has been uploaded";&#xA;// not working&#xA;echo "<br />";&#xA;echo "The file " . $upload . " has been uploaded";&#xA;// not working&#xA;echo "<br />";&#xA;echo "The file " . $uploadStr . " has been uploaded";&#xA;// not working&#xA;echo "<br />";&#xA;echo "The file " . $locationStr . " has been uploaded";&#xA;// not working&#xA;&#xA;?>&#xA;

    &#xA;

    Result upload.php in EDIT 3

    &#xA;

    this error :&#xA;[23-Apr-2022 12:31:56 Asia/Riyadh] PHP Notice : Undefined variable : location in /home/prdix/public_html/test/upload.php on line 38

    &#xA;

    line 38 : echo $location ;

    &#xA;

    About the developer solution Markus AO

    &#xA;

    I did the experiment and it is quite good, but dropzone is still missing, because I will upload a large video and the normal upload compresses the video before uploading, here is a picture from my mobile while uploading, but this does not happen with dropzone&#xA;enter image description here

    &#xA;

    I want to implement this in dropzone as well, because this library does not compress the video, but upload it in full size.

    &#xA;

    Thank you bro.

    &#xA;

  • opencv does not find ffmpeg functions during compilation (make)

    17 avril 2022, par titicplusplus

    I am currently trying to compile OpenCV with CUDA.&#xA;So I downloaded opencv 4.5.5 and opencv_contrib and followed this tutorial : https://gist.github.com/raulqf/f42c718a658cddc16f9df07ecc627be7

    &#xA;

    cd opencv-4.5.5/&#xA;mkdir build&#xA;cd build&#xA;cmake -D CMAKE_BUILD_TYPE=RELEASE \&#xA;-D CMAKE_INSTALL_PREFIX=/usr/local \&#xA;-D WITH_TBB=ON \&#xA;-D ENABLE_FAST_MATH=1 \&#xA;-D CUDA_FAST_MATH=1 \&#xA;-D WITH_CUBLAS=1 \&#xA;-D WITH_CUDA=ON \&#xA;-D BUILD_opencv_cudacodec=OFF \&#xA;-D WITH_CUDNN=OFF \&#xA;-D OPENCV_DNN_CUDA=OFF \&#xA;-D CUDA_ARCH_BIN=7.5 \&#xA;-D WITH_V4L=ON \&#xA;-D WITH_QT=ON \&#xA;-D WITH_OPENGL=ON \&#xA;-D WITH_GSTREAMER=ON \&#xA;-D OPENCV_GENERATE_PKGCONFIG=ON \&#xA;-D OPENCV_PC_FILE_NAME=opencv.pc \&#xA;-D OPENCV_ENABLE_NONFREE=ON \&#xA;-D INSTALL_PYTHON_EXAMPLES=OFF \&#xA;-D INSTALL_C_EXAMPLES=OFF \&#xA;-D BUILD_EXAMPLES=OFF \&#xA;-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.5.5/modules ../&#xA;

    &#xA;

    The cmake command generated these lines :

    &#xA;

    -- General configuration for OpenCV 4.5.5 =====================================&#xA;--   Version control:               unknown&#xA;-- &#xA;--   Extra modules:&#xA;--     Location (extra):            /mnt/704E048C4E044D72/build/opencv/opencv_contrib-4.5.5/modules&#xA;--     Version control (extra):     unknown&#xA;-- &#xA;--   Platform:&#xA;--     Timestamp:                   2022-04-17T16:01:44Z&#xA;--     Host:                        Linux 5.4.0-107-lowlatency x86_64&#xA;--     CMake:                       3.16.3&#xA;--     CMake generator:             Unix Makefiles&#xA;--     CMake build tool:            /usr/bin/make&#xA;--     Configuration:               RELEASE&#xA;-- &#xA;--   CPU/HW features:&#xA;--     Baseline:                    SSE SSE2 SSE3&#xA;--       requested:                 SSE3&#xA;--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX&#xA;--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX&#xA;--       SSE4_1 (18 files):         &#x2B; SSSE3 SSE4_1&#xA;--       SSE4_2 (2 files):          &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2&#xA;--       FP16 (1 files):            &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX&#xA;--       AVX (5 files):             &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 AVX&#xA;--       AVX2 (33 files):           &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2&#xA;--       AVX512_SKX (8 files):      &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX&#xA;-- &#xA;--   C/C&#x2B;&#x2B;:&#xA;--     Built as dynamic libs?:      YES&#xA;--     C&#x2B;&#x2B; standard:                11&#xA;--     C&#x2B;&#x2B; Compiler:                /usr/bin/c&#x2B;&#x2B;  (ver 8.4.0)&#xA;--     C&#x2B;&#x2B; flags (Release):         -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG&#xA;--     C&#x2B;&#x2B; flags (Debug):           -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG&#xA;--     C Compiler:                  /usr/bin/cc&#xA;--     C flags (Release):           -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG&#xA;--     C flags (Debug):             -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG&#xA;--     Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed  &#xA;--     Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed  &#xA;--     ccache:                      NO&#xA;--     Precompiled headers:         NO&#xA;--     Extra dependencies:          m pthread cudart_static dl rt nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/lib/x86_64-linux-gnu&#xA;--     3rdparty dependencies:&#xA;-- &#xA;--   OpenCV modules:&#xA;--     To be built:                 alphamat aruco barcode bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python2 python3 quality rapid reg rgbd saliency sfm shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto&#xA;--     Disabled:                    cudacodec world&#xA;--     Disabled by dependency:      -&#xA;--     Unavailable:                 java julia matlab ovis viz&#xA;--     Applications:                tests perf_tests apps&#xA;--     Documentation:               NO&#xA;--     Non-free algorithms:         YES&#xA;-- &#xA;--   GUI:                           QT5&#xA;--     QT:                          YES (ver 5.12.8 )&#xA;--       QT OpenGL support:         YES (Qt5::OpenGL 5.12.8)&#xA;--     GTK&#x2B;:                        YES (ver 3.24.20)&#xA;--       GThread :                  YES (ver 2.64.6)&#xA;--       GtkGlExt:                  NO&#xA;--     OpenGL support:              YES (/usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so)&#xA;--     VTK support:                 NO&#xA;-- &#xA;--   Media I/O: &#xA;--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)&#xA;--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)&#xA;--     WEBP:                        build (ver encoder: 0x020f)&#xA;--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.37)&#xA;--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.1.0)&#xA;--     JPEG 2000:                   build (ver 2.4.0)&#xA;--     OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2_3)&#xA;--     HDR:                         YES&#xA;--     SUNRASTER:                   YES&#xA;--     PXM:                         YES&#xA;--     PFM:                         YES&#xA;-- &#xA;--   Video I/O:&#xA;--     DC1394:                      YES (2.2.5)&#xA;--     FFMPEG:                      YES&#xA;--       avcodec:                   YES (58.54.100)&#xA;--       avformat:                  YES (58.29.100)&#xA;--       avutil:                    YES (56.31.100)&#xA;--       swscale:                   YES (5.5.100)&#xA;--       avresample:                YES (4.0.0)&#xA;--     GStreamer:                   YES (1.16.2)&#xA;--     v4l/v4l2:                    YES (linux/videodev2.h)&#xA;-- &#xA;--   Parallel framework:            TBB (ver 2020.1 interface 11101)&#xA;-- &#xA;--   Trace:                         YES (with Intel ITT)&#xA;-- &#xA;--   Other third-party libraries:&#xA;--     Intel IPP:                   2020.0.0 Gold [2020.0.0]&#xA;--            at:                   /mnt/704E048C4E044D72/build/opencv/opencv-4.5.5/build/3rdparty/ippicv/ippicv_lnx/icv&#xA;--     Intel IPP IW:                sources (2020.0.0)&#xA;--               at:                /mnt/704E048C4E044D72/build/opencv/opencv-4.5.5/build/3rdparty/ippicv/ippicv_lnx/iw&#xA;--     VA:                          NO&#xA;--     Lapack:                      NO&#xA;--     Eigen:                       YES (ver 3.3.7)&#xA;--     Custom HAL:                  NO&#xA;--     Protobuf:                    build (3.19.1)&#xA;-- &#xA;--   NVIDIA CUDA:                   YES (ver 10.1, CUFFT CUBLAS FAST_MATH)&#xA;--     NVIDIA GPU arch:             75&#xA;--     NVIDIA PTX archs:&#xA;-- &#xA;--   OpenCL:                        YES (no extra features)&#xA;--     Include path:                /mnt/704E048C4E044D72/build/opencv/opencv-4.5.5/3rdparty/include/opencl/1.2&#xA;--     Link libraries:              Dynamic load&#xA;-- &#xA;--   Python 2:&#xA;--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.18)&#xA;--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.18)&#xA;--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.16.5)&#xA;--     install path:                lib/python2.7/dist-packages/cv2/python-2.7&#xA;-- &#xA;--   Python 3:&#xA;--     Interpreter:                 /usr/bin/python3 (ver 3.8.10)&#xA;--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.8.so (ver 3.8.10)&#xA;--     numpy:                       /home/famillevincent/.local/lib/python3.8/site-packages/numpy/core/include (ver 1.22.3)&#xA;--     install path:                lib/python3.8/site-packages/cv2/python-3.8&#xA;-- &#xA;--   Python (for build):            /usr/bin/python2.7&#xA;-- &#xA;--   Java:                          &#xA;--     ant:                         NO&#xA;--     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include&#xA;--     Java wrappers:               NO&#xA;--     Java tests:                  NO&#xA;-- &#xA;--   Install to:                    /usr/local&#xA;-- -----------------------------------------------------------------&#xA;-- &#xA;-- Configuring done&#xA;-- Generating done&#xA;

    &#xA;

    CMake have detected ffmpeg libraries, but when I run make -j8. I have this error :

    &#xA;

    [ 39%] Building CXX object apps/interactive-calibration/CMakeFiles/opencv_interactive-calibration.dir/calibPipeline.cpp.o&#xA;Scanning dependencies of target opencv_cudafilters&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwframe_transfer_data&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;avcodec_get_hw_config&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwdevice_get_hwframe_constraints&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;avcodec_send_packet&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwframe_get_buffer&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwdevice_ctx_create_derived&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwdevice_ctx_create&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_bsf_alloc&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_bsf_receive_packet&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_bsf_free&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;avcodec_send_frame&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;avcodec_parameters_copy&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_packet_free&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwdevice_find_type_by_name&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_bsf_init&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwframe_ctx_alloc&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;avcodec_receive_packet&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_codec_iterate&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwframe_ctx_init&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwdevice_get_type_name&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwframe_constraints_free&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;avcodec_receive_frame&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_bsf_get_by_name&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;avcodec_get_hw_frames_parameters&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_bsf_send_packet&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_hwframe_ctx_create_derived&#xA0;&#xBB;&#xA;/usr/bin/ld&#xA0;: ../../lib/libopencv_videoio.so.4.5.5&#xA0;: r&#xE9;f&#xE9;rence ind&#xE9;finie vers &#xAB;&#xA0;av_packet_alloc&#xA0;&#xBB;&#xA;collect2: error: ld returned 1 exit status&#xA;make[2]: *** [apps/visualisation/CMakeFiles/opencv_visualisation.dir/build.make:92 : bin/opencv_visualisation] Erreur 1&#xA;make[1]: *** [CMakeFiles/Makefile2:11412 : apps/visualisation/CMakeFiles/opencv_visualisation.dir/all] Erreur 2&#xA;make[1]: *** Attente des t&#xE2;ches non termin&#xE9;es....&#xA;[ 39%] Building CXX object apps/interactive-calibration/CMakeFiles/opencv_interactive-calibration.dir/frameProcessor.cpp.o&#xA;

    &#xA;

    So what can I do to compile opencv with cuda and ffmpeg ?
    &#xA;Thank you in advance for your answers.

    &#xA;

    I use Ubuntu 20.04 with g++8

    &#xA;

  • Dreamcast Finds

    15 avril 2022, par Multimedia Mike — Sega Dreamcast

    Pursuant to my recent post about finally understanding how Sega Dreamcast GD-ROM rips are structured, I was able to prepare the contents of various demo discs in a manner that makes exploration easy via the Internet Archive. This is due to the way that IA makes it easy to browse archives such as ZIP or ISO files (anything that 7zip knows how to unpack), and also presents the audio tracks for native playback directly through the web browser.

    These are some of the interesting things I have found while perusing the various Dreamcast sampler discs.

    Multimedia Formats
    First and foremost : Multimedia-wise, SFD and ADX files abound on all the discs. SFD files are Sofdec, a middleware format used for a lot of FMV on Dreamcast games. These were little more than MPEG video files with a non-MPEG (ADPCM instead) audio codec. VLC will usually play the video portions of these files but has trouble detecting the audio. It’s not for lack of audio codec support because it can play the ADX files just fine.

    It should be noted that Dreamcast Magazine Disc 11 has an actual .mpg file (as opposed to a .sfd file) that has proper MPEG audio instead instead of ADX ADPCM.

    The only other multimedia format I know of that was used in any Dreamcast games was 4XM, used on Alone In The Dark : The New Nightmare. I wrote a simple C tool a long time to recover these files from a disc image I extracted myself. Rather than interpreting the ISO-9660 filesystem, the tool just crawled through the binary blob searching for ‘4XMV’ file signatures and using length data within the files for extraction.

    Also, there are plentiful PVR files (in reference to the PowerVR2 GPU hardware that the DC uses) which ‘file’ dutifully identifies as “Sega PVR image”. There are probably tools to view them. It doesn’t appear to be a complicated format.

    Scripting
    I was fascinated to see Lua files on at least one of the discs. It turns out that MDK 2 leverages the language, as several other games do. But it was still interesting to see the .lua files show up in the Dreamcast version as well.

    That Windows CE Logo
    Every Sega Dreamcast is famously emblazoned with a logo mentioning Microsoft Windows CE :


    Windows CE Logo on Dreamcast

    It has confused many folks. It also confused me until this exploratory exercise. Many would wonder if the Dreamcast booted up into some Windows CE OS environment that then ran the game, but that certainly wasn’t it. Indeed, Dreamcast was one of the last consoles that really didn’t have any kind of hypervisor operating system managing everything.

    I found a file called rt2dc.exe on one sampler disc. At first, I suspected that this was a development utility for Windows to convert some “RT” graphical format into a format more suitable for the Dreamcast. Then, ‘file’ told me that it was actually a Windows EXE but compiled for the Hitachi SH-4 CPU (the brain inside the DC). Does the conversion utility run on the Dreamcast itself ? Then I analyzed the strings inside the binary and saw references to train stations. That’s when it started to click for me that this was the binary executable for the demo version of Railroad Tycoon 2 : Gold Edition, hence “rt2dc.exe”. Still, this provides some insight about whether Dreamcast “runs” Windows. This binary was built against a series of Windows CE libraries. The symbols also imply DirectX compatibility.

    Here is a page with more info about the WinCE/DirectX variant for the Sega Dreamcast. It seems that this was useful for closing the gap between PC and DC ports of games (i.e., being able to re-use more code between the 2 platforms). I guess this was part of what made Dreamcast a dry run for the DirectXbox (later Xbox).

    Here is a list of all the Dreamcast games that are known to use Windows CE.

    Suddenly, I am curious if tools such as IDA Pro or Ghidra can possibly open up Windows CE binaries that contain SH-4 code. Not that I’m particularly interested in reverse engineering any algorithms locked up in Dreamcast land.

    Tomb Raider Easter Egg
    The volume 6 sampler disc has a demo of Tomb Raider : The Last Revelation. While inspecting the strings, I found an Easter egg. I was far from the first person to discover it, though, as seen on this The Cutting Room Floor wiki page (look under “Developer Message”). It looks like I am the first person to notice it on the Dreamcast version. It shows up at offset 0xE3978 in the Dreamcast (demo version) binary, if anyone with permissions wants to update the page.

    Web Browser
    Then there’s the Web Browser for Sega Dreamcast. It seemed to be included on a lot of these sampler discs. But only mentioning the web browser undersells it– the thing also bundled an email client and an IRC client. It’s important to remember that the Dreamcast also had a keyboard peripheral.

    I need to check the timeline for when the web browser first became available vs. when the MIL-CD hack became known. My thinking is that there is no way that the web browser program didn’t have some security issues– buffer overflows and the like. It seems like this would have been a good method of breaking the security of the system.

    Ironically, I suddenly can think of a reason why one might want to use advanced reverse engineering tools on Dreamcast binaries, something I struggled with just a few paragraphs ago.

    Odds ‘n Ends
    It’s always fun to find plain text files among video game assets and speculating on the precise meaning… while also marveling how long people have been struggling to correctly spell “length”.

    Internationalization via plain text files.

    Another game (Slave Zero) saw fit to zip its assets. Maybe this was to save space in order to fit everything on the magazine sampler disc. Quizzically, this didn’t really save an appreciable amount of space.

    Finally, all the discs have an audio track 2 that advises that the disc must be played in a Dreamcast console. Not unusual. However, volume 4 also has a Japanese lady saying the same thing on track 4. This is odd because track 4 is one of the GD area audio tracks and is not accessible with normal CD hardware. Further, she identifies the disc as a “Windows CE disc”.

    The post Dreamcast Finds first appeared on Breaking Eggs And Making Omelettes.