Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (37)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (6277)

  • 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

    


  • 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

    


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