Recherche avancée

Médias (91)

Autres articles (39)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 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, par

    Par 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, par

    MediaSPIP 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 (4888)

  • Merging\Joining three FFMPEG Commands (Drawtext / -filter_complex overlay / anullsrc=channel_layout)

    18 décembre 2020, par roar

    Currently I am using three different commands to create three mp4s only to delete the two "temporary" videos using this code.

    


    @ECHO OFF
ffmpeg -f lavfi -i color=size=1280x720:duration=5:rate=25:color=Black -vf "drawtext=fontfile='GothamRnd-Book.otf':line_spacing=15:fontsize=15:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:text=Stack Exchange" "out1.mp4"
ffmpeg -i "out1.mp4" -i logo.png -filter_complex "overlay=x=10:y=10" "out2.mp4"
ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -i "out2.mp4" -c:v copy -c:a aac -shortest "out3.mp4"
del "out1.mp4"
del "out2.mp4"
pause


    


    The nearest I have come is moving the anullsrc=channel_layout into the -filter_complex but that results in a long encode that I dont really understand what it is going because if I ctrl-c to cancel the batch still creates out3.mp4 correctly.

    


    ffmpeg -f lavfi -i color=size=1280x720:duration=5:rate=25:color=Black -vf "drawtext=fontfile='GothamRnd-Book.otf':line_spacing=15:fontsize=15:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:text=Stack Exchange" "out1.mp4"
ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000  -i "out1.mp4" -i logo.png -filter_complex "overlay=x=10:y=10" "out3.mp4"


    


    It seems like this could be streamlined to not create the temporary files.
But maybe this is the only way to do this. Thank you for any assistance and sorry if the answer is obvious.

    


    Rory

    


  • ffmpeg 4.4 problem with image2 combined with stream loop -1 and overlay

    14 mai 2021, par codeSam

    I have a python app and my code to stream ffmpeg is :

    


    'ffmpeg',
'-thread_queue_size', '1024',
'-i', 'rtsp://...',
'-f', 'image2',
'-stream_loop', '-1',
'-i', 'image.png',
'-filter_complex', 'overlay=(main_w-overlay_w)/2:main_h*0.1-overlay_h',
'-acodec', 'aac',
'-ar', '44100',
'-ab', '128k',
'-f', 'flv',
'-g', '30',
'-vcodec', 'libx264',
'-preset', 'ultrafast',
'-crf', '30',
'rtmp://...'


    


    Works fine on ffmpeg 4.3.2. But after ffmpeg updated to 4.4 the stream doesn't start at all. If I change stream_loop -1 to loop 1 the stream starts but as I want to update the image.png like every 10 seconds or so, it stops being updated on the stream. That is probably because new image.png is being saved at the same time it is being read. stream_loop doesn't mind this as I have understood.

    


    Also if I delay image.png start with -ss -5, the stream starts with main video from rtsp ://... but it stops when image.png starts to be read.

    


    Also if I remove -f image2 from the code, the stream starts fine but image.png is not being updated to the stream.

    


    Would be easy to downgrade ffmpeg to the older 4.3.2 version but it is not possible as I want this thing to run on Android device in Termux. Termux has only the latest ffmpeg 4.4 available.

    


    Any ideas how to make this work on ffmpeg 4.4.

    


    Here is what is printed out when I run the command above. The stream does not start. This is done with Termux in Android device. Stream does not start in my Mac Book Pro's ffmpeg 4.4 either, in that 4.3.2 is ok.

    


    ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Android (6454773 based on r365631c2) clang version 9.0.8 
(https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
  configuration: --arch=aarch64 --as=aarch64-linux-android-clang --cc=aarch64-linux-android-clang
  --cxx=aarch64-linux-android-clang++ --cross-prefix=aarch64-linux-android- --disable-indevs 
  --disable-outdevs --enable-indev=lavfi --disable-static --disable-symver --enable-cross-compile 
  --enable-gnutls --enable-gpl --enable-libass --enable-libdav1d --enable-libmp3lame 
  --enable-libfreetype --enable-libvorbis --enable-libopus --enable-libx264 --enable-libx265 
  --enable-libxvid --enable-libvpx --enable-shared --enable-libsoxr --enable-libvidstab 
  --enable-libwebp --prefix=/data/data/com.termux/files/usr --target-os=android 
  --extra-libs=-landroid-glob --enable-neon
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[udp @ 0x7ebe823840] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0x7ebe8238e0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0x7ebe823a20] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0x7ebe823ac0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)

Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://...':
  Metadata:
    title           : Session streamed by "TP-LINK RTSP Server"
    comment         : stream1
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc
  Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Input #1, image2, from 'image.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
  Stream #1:0: Video: png, rgba(pc), 1152x87 [SAR 8504:8504 DAR 384:29], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #1:0 (png) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))
Press [q] to stop, [?] for help


    


  • Application using FFMPEG Library does not compile with CMAKE error avformat_alloc_context but I have imported the header files and libray

    23 mai 2022, par Clockman

    I compiled the FFMPEG source file myself and got the header and library files in an include and bin folder respectively, the target platform is Windows 10. I also setup my cmakelist.txt to find and include both the library and header files. The application finds the path or so it seems because during compilation I get a "LNK2019 error unresolved external symbol avformat_alloc_context referenced in function main". Below is an extract from my cmake list ; I will like to note that I got the .lib and .dll versions of the library hence the approach below based on the book "professional cmake" and other stackflow examples.

    


    ProjectDir/AudMan/cmakelist.txt

    


    list(APPEND CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};PATH-TO-INCLUDES;PATH-TO-LIBRARY)
find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)
add_library(ffmpegHeaders INTERFACE)
target_include_directories(ffmpegHeaders INTERFACE ${AVFORMAT_INCLUDE_DIR})


    


    ProjectDir/cmakelist.txt

    


    set(Rapid_Prefix PATH-TO-LIBRARY)
    add_library(AVformat SHARED IMPORTED)
    set_target_properties(AVformat PROPERTIES IMPORTED_LOCATION ${Rapid_Prefix}/avformat-59.dll IMPORTED_IMPLIB ${AVFORMAT_LIBRARY})
target_link_libraries(App_target PRIVATE AVformat)


    


    A sample of the codes is this

    


    extern "C" {&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;}&#xA;&#xA;int main()&#xA;{&#xA;    AVFormatContext* format = avformat_alloc_context();&#xA;    if (avformat_open_input(&amp;format, R"(\test.m4a)", NULL, NULL) != 0) {&#xA;        fprintf(stderr, "Could not open file &#x27;%s&#x27;\n", R"(\test.m4a)");&#xA;        return -1;&#xA;    }&#xA;    if (avformat_find_stream_info(format, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Could not retrieve stream info from file &#x27;%s&#x27;\n", R"(test.m4a)");&#xA;        return -1;&#xA;    }&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    I have been at it for about five days and will appreciate any help I can get.

    &#xA;