Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (27)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (3224)

  • rtsp to rtmp using ffmpeg or any tool wrapper

    27 août 2017, par Chakri

    I have a requirement where I need to restream the RTSP stream from camera source to RTMP server. I know this may sound a repeated question but my exact scenario is I cannot do it manually over command line with ffmpeg command. I need a wrapper where I receive the rtsp and rtmp url from external source say through REST invocation. Then the code can trigger the ffmpeg restream.

    Basically flow is like this :

    1. Camera source application sends RTSP read event(could be basic HTTP(REST) request with RTSP url, metadata about camera info, serial no etc) to my streamer app

    Ex : /usr/bin/ffmpeg -i rtsp ://10.144.11.22:554/stream1 -f flv rtmp ://10.13.11.121:1935/stream1

    1. Streamer app computes the RTMP server url for corresponding camera and triggers a ffmpeg command to stream RTSP to RTMP

    2. Streamer app triggers above(2) in separate thread and keeps reading the logs for monitoring purpose. Also identifies the end of RTSP stream and sends an update(Example : RTSP END) event to UI

    Now at point(2) I need a suggestion. Here I need a stable wrapper/api which can help. I tried this through some Java wrappers but the process hangs or fails to read the output from ffmpeg. Also I need to handle streams from many cameras where spawning thread for each one could be exhaustive.

    So I am looking for some similar api/wrapper in C++ or Go Lang which might have more closer interaction in handling ffmpeg command.

    Please point if similar issue is addressed elsewhere

  • converting video with avconv while capturing

    31 mai 2017, par Oliver

    I am successfully capturing a video stream with that device :
    Easycap DC60

    But I need to run the following commands in serial :

    First that :

    sudo killall -9 somagic-both

    sudo killall -9 somagic-capture

    sudo somagic-init

    sudo somagic-both -n 1>.video 2>.audio

    [CTRL+C]

    Then that :

    avconv

    -f rawvideo -pix_fmt uyvy422 -r 30 -s:v 720x480 -i .video

    -f s16le -sample_rate 24000 -ac 2 -i .audio -strict experimental

    -vcodec mpeg4 -vtag xvid -qscale:v 7

    -vf yadif -s:v 720x540

    video.avi

    The problem is that when I try to run them together in a row (with "&" at the end of "sudo somagic-both -n 1>.video 2>.audio") I get that error :

    ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, rawvideo, from '.video':
     Duration: N/A, bitrate: 165888 kb/s
       Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x480, 165888 kb/s, 30 tbr, 30 tbn, 30 tbc
    [s16le @ 0x24d7480] Estimating duration from bitrate, this may be inaccurate
    Guessed Channel Layout for  Input Stream #1.0 : stereo
    Input #1, s16le, from '.audio':
     Duration: 00:00:00.71, bitrate: 767 kb/s
       Stream #1:0: Audio: pcm_s16le, 24000 Hz, 2 channels, s16, 768 kb/s
    File 'video.avi' already exists. Overwrite ? [y/N] y
    Output #0, avi, to 'video.avi':
     Metadata:
       ISFT            : Lavf56.40.101
       Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 720x540, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
       Metadata:
         encoder         : Lavc56.60.100 mpeg4
       Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 24000 Hz, stereo, s16p
       Metadata:
         encoder         : Lavc56.60.100 libmp3lame
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
     Stream #1:0 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    Multiple frames in a packet from stream 0
    [pcm_s16le @ 0x24f33c0] Invalid PCM packet, data has size 2 but at least a size of 4 was expected
    Error while decoding stream #1:0: Invalid data found when processing input
    frame=    0 fps=0.0 q=0.0 Lsize=      38kB time=00:00:03.19 bitrate=  98.0kbits/s    
    video:0kB audio:25kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 50.802467%

    I think it happens because it is converting more quickly than it is capturing. I tried to use the solution given here
    without success.

    Anyone ever faced that situation before ?

  • Running a py script in the Cloud

    12 janvier 2018, par Anay Bose

    I’m new to Google’s cloud & Virtual Machine(VM) instances, and I need some clarifications on a couple of points. I have a python script ; it imports a long range of functions. I need to run those functions in parallel. I’m using multiprocessing and Process, not threads. These functions are basically image and media processors, and they use many other tools like FFMPEG, imagemagick and Avisynth in addition to a wide range of python modules, including moviepy. Now, I would like to run some 50 functions in parallel assigning a CPU for each process. Images, media and avi files are stored in seperate folders. I’m on Windows7 Core-i7 machine. So, need cloud computing power.

    Now, my question can I run such a python script/app in the cloud that requires a very complicated file system and non-python tools i.e. ffmpeg, avisynth and avi files ?

    Can Google VMs emulate my local machine and empower me with more cores and memory to run such a program ? if not, then what are my options ? Is their any tutorials that I can follow ? I need your suggestions. I have given below an example script and some codes to help facilitate your understanding about my situation.

    from __future__ import unicode_literals
    import youtube_dl
    import os
    import time
    import sys
    reload(sys)  
    sys.setdefaultencoding('utf-8')
    from multiprocessing import Process
    from utils import *

    from clip31 import VIDEO31
    from clip32 import VIDEO32
    from clip189 import VIDEO189
    from clip16 import VIDEO16
    from clip39 import VIDEO39


    if __name__== '__main__':

       # 1. CALLING A FUNCTION
       folder = "bodyforce3\\16"
       serial = "16"
       images = get_filepaths("../16")
       videos = get_filepaths("12__media")
       pngs = get_filepaths("../pngs")

       Process(target=VIDEO192, args=(folder, serial, color1, color2, color3, images, videos)).start()


       # 2. CALLING A FUNCTION
       folder = "bodyforce3\\20"
       serial = "20"
       images = get_filepaths("../20")
       videos = get_filepaths("18__media")

       Process(target=VIDEO32, args=(folder, serial, color1, color2, color3, images, videos)).start()


       # 3. CALLING A FUNCTION
       folder = "bodyforce3\\14"
       serial = "14"
       images = get_filepaths("../14")
       videos = get_filepaths("16__media")

       Process(target=VIDEO91, args=(folder, serial, color1, color2, color3, images, videos)).start()

    I copy avi files in functions like this :

    src = "clip50_files"
    src_files = os.listdir(src)
    for file_name in src_files:
       full_file_name = os.path.join(src, file_name)
       if (os.path.isfile(full_file_name)):
           shutil.copy(full_file_name, folder)

    I call ffmpeg commands like this, and they are included within py functions.

    ###########################
    #### FFMPEG OPERATIONS ####
    ###########################

    print "Starting FFMPEG operations ..."

    if os.path.isfile(os.path.join(folder, "bounce-(3).avi")):
       os.remove(os.path.join(folder, "bounce-(3).avi"))


    infile = folder + "/bounce-(3).avs"
    outfile = folder + "/bounce-(3).avi"
    codec = "rawvideo"
    pix_fmt = "bgra"

    try:
       subprocess.call(["ffmpeg",
                        "-i" ,infile,
                        "-c:v" ,codec,
                        "-pix_fmt", pix_fmt,
                        outfile],
                       stdout=open(os.devnull, 'w'),
                       stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as e:  
       #except subprocess.CalledProcessError as e:
       sys.exit(e.output)
    except OSError as e:
       sys.exit(e.strerror)


    print "FFMPEG operations ended"