Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (73)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

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

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (12621)

  • Output always corrupt from FFMPEG using selenium python

    28 avril 2021, par Didit Setiawan

    i try to running testcase using selenium python and want to record video on every testacases, but when i try the output is always corrupted. FFMPEG process are running, no error appear on the output line. I attach my code, Please anyone help me is there anything i need to add or remove

    


    here's the first file, for recorder :

    


    import subprocess
from subprocess import Popen
from subprocess import call


class recorderMethod():
    videoRecording = None

    @staticmethod
    def recorder_start(res,name):
        rec_lib          = 'ffmpeg -y -rtbufsize 2000M -f dshow  -i video="screen-capture-recorder" -s '
        resolution       = res
        buffer           = ' -b:v 512k -r 20 -vcodec libx264 '
        filename         = name
        extension        = '.mp4'
        complete_command = rec_lib+resolution+buffer+filename+extension

        recorderMethod.videoRecording = Popen(str(complete_command))

    @staticmethod
    def recorder_stop():
        if recorderMethod.videoRecording.poll() is None:
            call('taskkill /F /T /PID ' + str(recorderMethod.videoRecording.pid))


    


    here's the main test file for record the video

    


    import unittest
import recorder_main
from selenium import webdriver
from time import sleep

class recordingTest(unittest.TestCase):
    #init test
    browser         = webdriver.Chrome()
    baseurl         = 'http://www.facebook.com/'
    record          = recorder_main.recorderMethod
    
    #setup
    def setUp(self):
        #declare to use browser
        self.driver = recordingTest.browser
        #make variable for easy access
        driver = self.driver
        #maximize Firefox
        driver.maximize_window()
        #go to maukerja
        driver.get(recordingTest.baseurl)

    #test001
    def test_001_record(self):
        #start recording
        recordingTest.record.recorder_start('1920x1080','Test_Sleep')
        sleep(10)
        #stop_recording
        recordingTest.record.recorder_stop()


    #teardown
    def test_999_ShutDownTest(self):
        self.driver.close()
        
if __name__ == '__main__':
    unittest.main(exit=False)


    


  • PHP FFMPEG match Instagram aspect ratio requirements

    19 mai 2021, par Linesofcode

    As stated here, the Instagram API requirements to upload a video are :

    


    - Picture size
- - Maximum columns (horizontal pixels): 1920
- - Minimum aspect ratio [cols / rows]: 4 / 5
- - Maximum aspect ratio [cols / rows]: 16 / 9


    


    I'm having some problems figuring it out if the aspect ratio matches. I grab the width and height of the video like this :

    


    $ffprobe = \FFMpeg\FFProbe::create();
$video = $ffprobe->streams($file)->videos()->first();
$width = $video->get('width');
$height = $video->get('height');


    


    And then I know the ratio by dividing the width by height.

    


    The Instagram requirements about Portrait & Landscape videos are :

    


    Portrait - min: 0.8 ; max: 0.99
Landscape - min: 1.01 ; max: 1.78


    


    So why does a video of 848x480 (aspect ratio of 1.76) fails to upload to Instagram by returning "The video format is not supported" and how can I be completely sure that the aspect ratio matches the requirements before trying to upload ?

    


    Edit

    


    The full validation of Instagram requirements :

    


    $video = $ffprobe->streams($file)->videos()->first();
$audio = $ffprobe->streams($file)->audios()->first();
$codec = $video->get('codec_name');
$frameRate = eval('return ' . $video->get('avg_frame_rate') . ';'); // 30/1 -> 30
$width = $video->get('width');
$height = $video->get('height');
$duration = $video->get('duration');

$ratio = round($width / $height, 3);

// Portrait
if ($width < $height)
    if ($ratio < 0.8 || $ratio > 0.99)
        return false;
        
// Landscape
if ($width > $height)
    if ($ratio < 1.01 || $ratio > 1.78)
        return false;


if (!in_array($codec, ['h264', 'hevc']))
    return false;

if ($frameRate < 23 || $frameRate > 60)
    return false;

if ($width > 1920)
    return false;

if ($duration < 3 || $duration > 60)
    return false;

if ($audio)
{
    $aCodec = $audio->get('codec_name');

    if ($aCodec != 'aac')
        return false;
}

return true;


    


    Sample not uploading into Instagram :
enter image description here

    


  • RTMP server - without watermarks everything works fine --- with watermark one stream will not work nginx ffmpeg overlay watermark

    10 juin 2021, par Ashley Taylor

    okay so i used the below config and everything works great both youtube and facebook work .

    


    rtmp {
    server {
        listen 1935;
        chunk_size 8192;
        application live {
        record off;
        live on;
        push rtmp://a.rtmp.youtube.com/live2/djfghjkdfhgkjsdfglsjdfhj;
                push rtmp://127.0.0.1:19350/rtmp/453uy4uty8ryt85ty85yt8; (facbook)
                    }
    
        }
    

    }


    


    Now i have tried 2 seprate way to add a water mark (Youtube works fine Every time)
Facebook does not stream at all let alone with a watermark

    


    examples i have tried below

    


    rtmp {
server {
    listen 1935;
    chunk_size 8192;
    application live {
    record off;
    live on;
            exec /bin/ffmpeg  -i rtmp://127.0.0.1:1935/live/$name
             -vf "movie=/etc/nginx/images/logo.png[logo];[0][logo]overlay=0:300"
             -c:v libx264 -f flv rtmp://127.0.0.1:1935/push/$name;
              }

    application push {
    live on;
    push rtmp://a.rtmp.youtube.com/live2/djfghjkdfhgkjsdfglsjdfhj;
            }
   }
}


    


    and another

    


    rtmp {
server {
    listen 1935;
    chunk_size 8192;
    application live {
    record off;
    live on;
            exec /bin/ffmpeg  -i rtmp://127.0.0.1:1935/live/$name
             -vf "movie=/etc/nginx/images/logo.png[logo];[0][logo]overlay=0:300"
             -c:v libx264 -f flv rtmp://127.0.0.1:1935/push/$name;
    
                    exec /bin/ffmpeg  -i rtmp://127.0.0.1:1935/live/$name
             -vf "movie=/etc/nginx/images/logo.png[logo];[0][logo]overlay=0:300"
             -c:v libx264 -f flv rtmp://127.0.0.1:1935/pushh/$name;
            }

    application push {
    live on;
    push rtmp://a.rtmp.youtube.com/live2/djfghjkdfhgkjsdfglsjdfhj;
            }

            application pushh {
            live on;
            push rtmp://127.0.0.1:19350/rtmp/453uy4uty8ryt85ty85yt8;
            }
   }
}


    


    Now for the life of me i just cannot get my brain to work.
i am very new to rtmp and have tried a dozen other ways before coming here for help.

    


    i know this is going to be something i where i am making such a simple mistake

    


    but on the other hand paying over $49 for restream.io for a shoddy service i just have to learn this for my own servers