Advanced search

Medias (91)

Other articles (23)

  • Other interesting software

    13 April 2011, by

    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: (...)

  • Submit bugs and patches

    13 April 2011

    Unfortunately 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 (...)

  • List of compatible distributions

    26 April 2011, by

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

On other websites (6032)

  • How to generate video as fast as possible with subtitles and audio on node.js + ffmpeg?

    12 September 2018, by DSeregin

    Intro:

    We receive from the site some pieces of text
    Pieces arrive to node.js-server

    At the output we need to get a video, merged from all the pieces of text, voiced by the machine voice, with the added subtitles and audio substrate. So that user could be share this video in the social networks. MKV format doesn`t supported by VK.com

    The options that we have tried:
    1. Get all the text at once, generate the entire speech, create a file with subtitles, burn subtitles in the video .mp4 (vk.com does not support the .mkv container). It took 12 seconds of operations for a 45-second video on the local computer.
    2. Generate audio and video files for each piece of text (with added subtitles). It took one second for one piece of text. At the final request, we merge all pieces together. The last request (merging) took 2-3 seconds, which is already bearable.

    The second variant looks acceptable in terms of speed, but if you run 50 clients at the same time, then the computer (tested on a MacBook PRO 2013, 2.4 GHz i7, 8gb 1600 Mhz DDR3, SSD 256gb) processed only 1 piece from 1 client in 60 seconds (60 times slower), then the computer hung tight.

    The commands we used:

    • Burn video subtitles and trim up to conditional 6 seconds (in the code send unix timestamp)

    ffmpeg -i import / back.mov -i export_0 / tmp.srt -scodec mov_text -t 6 export_0 / output.mov

    • Merging all audio

    ffmpeg -i audio1.mp3 .... -i audio15.mp3 merged.mp3

    • Overlay audio-substrate on the text

    ffmpeg -i merged.mp3 -i back.mp3 -filter_complex amerge -ac 2-c: a libmp3lame -q: a 4 -shortest audio.mp3

    • Merging all videos

    ffmpeg -i video.txt -f concat -c copy video.mp4

    • Overlay audio on video

    ffmpeg -i audio.mp3 -i video.mp4 -i test.mp4 -i export / output.mp3 -c: v copy -c: a aac -map 0: v: 0 -map 1: a: 0 -shortest output .mp4

    Questions that torment:

    1. Is it faster?

    2. Can I use other codecs or methods of gluing without re-encoding?

    3. Try to call ffmpeg directly without a wrapper? (in fact, it gives 50-100 ms of speed)

    4. Try not to save to disk, and write data to Stream and have them glue together in the end?

  • FFMPEG for aws s3 bucket signed url not working in node js

    21 August 2018, by ahmed sharief

    I am trying to create thumbnails from an amazon s3 bucket signed url. I am able to generate thumbnails when i run the command in terminal

    ffmpeg -ss 00:00:02 -i "https://test-s3-bucket.s3.ap-south-1.amazonaws.com/user_gallery_assets/5b6936069ac2bf0602085367/gallery/images/5b7be08527641dee8c1f8134.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxx%2F20180821%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20180821T095101Z&X-Amz-Expires=900&X-Amz-Signature=d7f81f4eed3d6c87c04dc1b0ad06beeb946afa33d417585f57fad72aeadb3ac0&X-Amz-SignedHeaders=host" -vframes 1 -q:v 2 -f image2 output.jpg

    I am running the above command in terminal and its working fine but when i try to implement the same in node js its showing "no such file or directory error". Though i am encoding the url with double quotes then also its showign same error. Here is my node js code....

    function uploadThumbNailForVideo(obj,url, thumb_url){
       return new Promise((resolve, reject) => resolve(url))
       .then((url) => awsHelper.getImage(url))
       .then((result) => {

           var resUrl = "\""+result+"\"";

           var args = [
               '-i', resUrl,
               '-ss', '00:00:02',
               '-vframes', '1',
               '-f','image2',
               'output.jpg'
           ]
           //console.log(args)
           var ffmpeg = require('child_process').spawn('ffmpeg', args);

           ffmpeg.on('error', function (err) {
               console.log(err);
           });

           ffmpeg.on('close', function (code) {

           });

           ffmpeg.stderr.on('data', function (data) {
               var tData = data.toString('utf8');
               var a = tData.split('\n');
               console.log("A",a);
           });

           ffmpeg.stdout.on('data', function (data) {
               //
           });


       });

    }

    and i am getting the following error

    A [ 'ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg
    developers' ]
    A [ '',
     '  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)',
     '  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-
    shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --
    enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-
    gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
    opencl --enable-videotoolbox --disable-lzma',
      '  libavutil      56. 14.100 / 56. 14.100',
      '  libavcodec     58. 18.100 / 58. 18.100',
     '  libavformat    58. 12.100 / 58. 12.100',
     '  libavdevice    58.  3.100 / 58.  3.100',
     '  libavfilter     7. 16.100 /  7. 16.100',
     '  libavresample   4.  0.  0 /  4.  0.  0',
     '  libswscale      5.  1.100 /  5.  1.100',
     '  libswresample   3.  1.100 /  3.  1.100',
     '  libpostproc    55.  1.100 / 55.  1.100',
     '"https://test-s3-bucket.s3.ap-south-1.amazonaws.com/user_gallery_assets/5b6936069ac2bf0602085367/gallery/images/5b7be08527641dee8c1f8134.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxx%2F20180821%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20180821T095101Z&X-Amz-Expires=900&X-Amz-Signature=d7f81f4eed3d6c87c04dc1b0ad06beeb946afa33d417585f57fad72aeadb3ac0&X-Amz-SignedHeaders=host": No such file or directory',
     '' ]

    ffmpeg exited with code 1
  • FFmpeg transcoding on Lambda results in unusable (static) audio

    17 May 2020, by jmkmay

    I'd like to move towards serverless for audio transcoding routines in AWS. I've been trying to setup a Lambda function to do just that; execute a static FFmpeg binary and re-upload the resulting audio file. The static binary I'm using is here.

    



    The Lambda function I'm using in Python looks like this:

    



    import boto3

s3client = boto3.client('s3')
s3resource = boto3.client('s3')

import json
import subprocess 

from io import BytesIO

import os

os.system("cp -ra ./bin/ffmpeg /tmp/")
os.system("chmod -R 775 /tmp")

def lambda_handler(event, context):

    bucketname = event["Records"][0]["s3"]["bucket"]["name"]
    filename = event["Records"][0]["s3"]["object"]["key"]

    audioData = grabFromS3(bucketname, filename)

    with open('/tmp/' + filename, 'wb') as f:
        f.write(audioData.read())

    os.chdir('/tmp/')

    try:
        process = subprocess.check_output(['./ffmpeg -i /tmp/joe_and_bill.wav /tmp/joe_and_bill.aac'], shell=True, stderr=subprocess.STDOUT)
        pushToS3(bucketname, filename)
        return process.decode('utf-8')
    except subprocess.CalledProcessError as e:
        return e.output.decode('utf-8'), os.listdir()


def grabFromS3(bucket, file):

    obj = s3client.get_object(Bucket=bucket, Key=file)
    data = BytesIO(obj['Body'].read())

    return(data)

def pushToS3(bucket, file):

    s3client.upload_file('/tmp/' + file[:-4] + '.aac', bucket, file[:-4] + '.aac')

    return


    



    You can listen to the output of this here. WARNING: Turn your volume down or your ears will bleed.

    



    The original file can be heard here.

    



    Does anyone have any idea what might be causing the encoding errors? It doesn't seem to be an issue with the file upload, since the md5 on the Lambda fs matches the MD5 of the uploaded file.

    



    I've also tried building the static binary on an Amazon Linux instance in EC2, then zipping and porting it into the Lambda project, but the same issue persists.

    



    I'm stumped! :(