Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (37)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (9712)

  • Python Send stdout and stderr to Multiple files using stored in Variable

    17 avril 2021, par D0n

    Here is my scripts

    


    csv_location = '/home/scripts/streams.csv'
ffmpeg_location = '/usr/bin/ffmpeg'
ffmpeglogs = '/home/scripts/ffmpeglog/'

# Open the streams list csv file
with open(csv_location) as csv_file:
    csv_reader = csv.reader(csv_file, delimiter=',')
    for row in csv_reader:
        ffmpeg_log = (ffmpeglogs + row[0]) # set the ffmpeg log to be named the stream name
        # Open log file for writing
        with open(ffmpeg_log, 'wb') as ffmpeg_output: 
            # Iterate through streams list
            for row in csv_reader:
                print(row)
                stream_output = (row[0] + ".mpeg") # stream output variable
                # Subprocess record 1 stream at a time & send the output t0 stdout & stdeer
                ffmpeg_instance = subprocess.Popen([ffmpeg_location, '-t', '10', '-i', row[1], stream_output], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                # sent output to ffmpeg log
                ffmpeg_output.write(ffmpeg_instance.communicate()[1])


    


    Here is my CSV File

    


    Name,RTSP_URL
stream1,rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
stream3,rtsp://wowz.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
stream4,rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov


    


    So I have a script that reads a CSV file and ffmpeg records the video for 10 seconds. Then spits the output of the FFMPEG to a file. I need each camera to have its own file. Really just to log FFMPEG output for each camera. But my issue is that the FFMPEG output for multiple cameras get written to 1 file.

    


    Here is what I want to see in /home/scripts/ffmpeglog/

    


    stream1 stream3 stream4


    


    Here's what I'm actually what I see in /home/scripts/ffmpeglog/

    


    name stream1


    


  • mix two audio files fmpeg Android

    21 mars 2016, par Adroid Freak

    I’m using ffmpeg for android and I’m trying to mix two audio files but I’m getting the following error

    [NULL @ 0xb60c8c00] Unable to find a suitable output format for ' -filter_complex amerge -c:a libmp3lame -q:a 4 '
    -filter_complex amerge -c:a libmp3lame -q:a 4 : Invalid argument

    This is the ffmpeg library details when

    ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    built on Dec 22 2014 21:35:30 with gcc 4.8 (GCC)
    configuration: --target-os=linux --cross-prefix=/home/android/Downloads/ffmpeg-android-pie/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/android/Downloads/ffmpeg-android-pie/toolchain-android/sysroot --enable-decoders --enable-encoders --enable-filters --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --enable-pic --enable-libx264 --enable-version3 --disable-debug --disable-ffserver --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/android/Downloads/ffmpeg-android-pie/ffmpeg-pkg-config --prefix=/home/android/Downloads/ffmpeg-android-pie/build/armeabi-v7a --extra-cflags='-I/home/android/Downloads/ffmpeg-android-pie/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/android/Downloads/ffmpeg-android-pie/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    libavutil      54.  7.100 / 54.  7.100
    libavcodec     56.  1.100 / 56.  1.100
    libavformat    56.  4.101 / 56.  4.101
    libavdevice    56.  0.100 / 56.  0.100
    libavfilter     5.  1.100 /  5.  1.100
    libswscale      3.  0.100 /  3.  0.100
    libswresample   1.  1.100 /  1.  1.100
    libpostproc    53.  0.100 / 53.  0.100

    My function is this

    public Clip mixTwoAudioFiles (String audio1, String audio2, Clip out, ShellCallback sc) throws Exception
    {
       ArrayList<string> cmd = new ArrayList<string>();

       cmd.add(mFfmpegBin);
       cmd.add("-y");

       cmd.add("-i");
       cmd.add(audio1);

       cmd.add("-i");
       cmd.add(audio2);
    //  cmd.add("-strict");
    //  cmd.add("-2");//experimental

       cmd.add(" -filter_complex amerge -c:a libmp3lame -q:a 4 ");  
       File fileOut = new File(out.path);
       cmd.add(fileOut.getCanonicalPath());    
       execFFMPEG(cmd, sc);
       return out;

    }
    </string></string>

    and the output command is this

    ffmpeg -y -i /storage/emulated/0/audio1.mp3 -i /storage/emulated/0/audio2.3gp -strict -2  -filter_complex amerge -c:a libmp3lame -q:a 4  /storage/emulated/0/out.mp4

    Now as you can see above I don’t have libmp3lame enabled but it looks like the error above is not related to that, correct ?

    I tried many other filter variations but all are failing with the same error, the questions I have are as follow :

    1- Since I don't have libmp3lame, what is the next option? please note that mp3 is not mandatory here.
    2- If it is possible can you please show me how?
  • how to resolve Linking error undefined reference to symbol 'avcodec_open2@@LIBAVCODEC_54

    20 septembre 2016, par TobSta

    I’m getting the following linking error

    Linking CXX executable test_decode
    /usr/bin/ld: /home/t/NetBeansProjects/FaceCept3D/WrapFFMPEG/libWrapFFMPEG.a(DecodeFFMPEG.cpp.o): undefined reference to symbol 'avcodec_open2@@LIBAVCODEC_54'
    //usr/lib/x86_64-linux-gnu/libavcodec.so.54: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    make[2]: *** [test_decode] Error 1
    make[1]: *** [CMakeFiles/test_decode.dir/all] Error 2
    make: *** [all] Error 2

    cmake . &amp;&amp; make works for WrapFFMPEG, but for test_decode, i get the linking error when building

    My CMakeLists.txt for test_decode :

    cmake_minimum_required (VERSION 2.8)
    #cmake_policy(SET CMP0003 OLD)

    # Add executable
    add_executable(test_decode test_decode.cpp)

    find_package(OpenCV REQUIRED )
    message(STATUS ${OPENCV_INCLUDE_DIRS})
    include_directories (${OPENCV_INCLUDE_DIRS},      "/home/t/NetBeansProjects/FaceCept3D/WrapFFMPEG")
    find_library (WrapFFMPEG WrapFFMPEG "/home/t/NetBeansProjects/FaceCept3D/WrapFFMPEG")


    message(STATUS ${WrapFFMPEG})
    link_directories( ${WrapFFMPEG} )


    # Link to the WrapFFMPEG library
    target_link_libraries(test_decode LINK_PUBLIC ${OpenCV_LIBRARIES} ${WrapFFMPEG})

    add_custom_command(TARGET test_decode POST_BUILD COMMAND xcopy /i /y \"${FFmpeg_RUNTIME_LIBS}\" \"${CMAKE_CURRENT_BINARY_DIR}\")

    and my CMakeLists.txt for WrapFFMPEG :

    cmake_minimum_required (VERSION 2.8)
    file(GLOB sources *.cpp *.h)

    list(APPEND CMAKE_MODULE_PATH "/home/t/NetBeansProjects/FaceCept3D/WrapFFMPEG")

    find_package( avformat REQUIRED)
    find_package( avcodec REQUIRED)
    find_package( avutil REQUIRED )
    find_package( swscale REQUIRED )

    include_directories(    
    ${AVFORMAT_INCLUDE_DIR}
    ${AVCODEC_INCLUDE_DIR}
    ${AVUTIL_INCLUDE_DIR}
    ${SWSCALE_INCLUDE_DIR}
    )


    set(
    FFMPEG_LIBRARIES    
    ${AVFORMAT_LIBRARY}
    ${AVCODEC_LIBRARY}
    ${AVUTIL_LIBRARY}
    ${SWSCALE_LIBRARY}
    )

    add_library(WrapFFMPEG ${sources})

    #add_library(WrapFFMPEG DecodeFFMPEG.cpp DecodeFFMPEG.h )
    set(FFMPEG_INCLUDE_DIR     "/home/t/NetBeansProjects/FaceCept3D/WrapFFMPEG/ffmpeg")
    find_library (FFMPEG FFMPEG "/home/t/NetBeansProjects/FaceCept3D/WrapFFMPEG/ffmpeg")
    message(STATUS ${FFMPEG_LIBRARIES})
    message(STATUS ${FFMPEG})
    include_directories($(FFMPEG_INCLUDE_DIR}))
    message(STATUS ${FFMPEG_INCLUDE_DIR})


    # Make sure the compiler can find include files for our WrapFFMPEG library
    # when other libraries or executables link to WrapFFMPEG
    target_include_directories (WrapFFMPEG PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
    target_link_libraries(WrapFFMPEG avutil avcodec avformat swscale)

    resulting in link.txt :

    /usr/bin/ar cq libWrapFFMPEG.a CMakeFiles/WrapFFMPEG.dir/DecodeFFMPEG.cpp.o CMakeFiles/WrapFFMPEG.dir/Tutorial.cpp.o /usr/bin/ranlib libWrapFFMPEG.a

    did CMake not find ffmpeg ?