Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (36)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

  • Is H.264 used with CRF 0 really strictly lossless ?

    23 décembre 2017, par Mephisto

    I am surprised by how small files are when encoded in ffmpeg with the libx264 codec in Constant Rate Factor mode equals zero (-crf 0) that, according to the documentation, is "lossless".

    I would like to make sure what the word "lossless" here means. I would like to know if it follows my personal definition of lossless video : After encoding a video, you can confidently bet the life of your mother that, once you play it, the numerical values in the pixels of the restored video will be identically equal (within maybe a factor 0.00001 due to the floating point arithmetic) to the original.

    Does the H.264 lossless encoding follow my definition, or do they call it "lossless" because it is visually very close, very beautiful, whatever... ?

  • Choppy Audio while playing Video from StreamingAssets in Unity's VideoPlayer

    8 novembre 2017, par Saad Anees

    I have been trying to load video that I recorded from AVPro Movie Capture (Free Version). The video file was in GB so I converted it using ffmpeg command -y -i RawVideo.avi -qscale 7 FinalVideo.avi and saved it to StreamingAssets. I got the desired result. Now I want to play that converted video file in video player for preview. But the problem is when video is played from URL the audio is very choppy. I played it in windows player and VLC and it was fine. The problem occurs only in Unity’s VideoPlayer.

    PreviewVideo Class :

    public class PreviewVideo : MonoBehaviour
    {

       public GameObject VideoSelection;
       public GameObject RecordingCanvas;
       public GameObject FacebookCanvas;
       public GameObject Home;
       public Sprite pauseImage;
       public Sprite playImage;
       public VideoPlayer videoPlayer;
       public GameObject EmailCanvas;

       // Use this for initialization
       void Start ()
       {

       }

       public void Referesh()
       {
           videoPlayer.gameObject.GetComponent<spriterenderer> ().sprite = Resources.Load<sprite> ("Thumbnails/" + StaticVariables.VideoToPlay);

           videoPlayer.url = Application.streamingAssetsPath + "/FinalVideo.avi";
       }

       public void PlayVideo()
       {
           if (!videoPlayer.isPlaying) {
               videoPlayer.Play ();
           }
       }

       public void Back ()
       {
           this.gameObject.SetActive (false);
           VideoSelection.SetActive (true);
       }

       public void HomeBtn ()
       {
           SceneManager.LoadScene (0);
       }

       public void SendEmailDialogue()
       {
           EmailCanvas.SetActive (true);
           this.gameObject.SetActive (false);
       }

       public void FacebookShare()
       {
           FacebookCanvas.SetActive (true);
       }
    }
    </sprite></spriterenderer>

    Refresh() is called from RecordingCanvas class :

    public class RecordingCanvas : MonoBehaviour {

       public GameObject VideoSelection;
       public GameObject PreviewVideo;
       public GameObject Home;
       public GameObject canvas;
       public RawImage rawImage;
       public GameObject videoThumbnail;
       float _seconds;
       bool canStart = false;
       public SpriteRenderer NumSprite;
       public VideoPlayer videoPlayer;
       WebCamTexture webcamTexture;
       Process process;
       void Start ()
       {
           Refresh ();
       }

       public void Refresh()
       {
           _seconds = 0;
           NumSprite.gameObject.SetActive(true);
           webcamTexture = new WebCamTexture (1280, 720);
           webcamTexture.Stop ();
           rawImage.texture = webcamTexture;
           rawImage.material.mainTexture = webcamTexture;
           webcamTexture.Play ();
           videoPlayer.loopPointReached += VideoEndReached;

           videoPlayer.gameObject.GetComponent<spriterenderer> ().sprite = Resources.Load<sprite> ("Thumbnails/" + StaticVariables.VideoToPlay);
           videoThumbnail.GetComponent<spriterenderer> ().sprite = Resources.Load<sprite> ("Thumbnails/" + StaticVariables.VideoToPlay);
           videoPlayer.clip = Resources.Load<videoclip> ("Videos/" + StaticVariables.VideoToPlay);
       }

       void Update()
       {
           _seconds += Time.deltaTime;
           print ((int)_seconds);
           if (_seconds &lt; 1) {
               NumSprite.sprite = Resources.Load<sprite> ("Numbers/3");
           }
           else if(_seconds &lt;2)
               NumSprite.sprite = Resources.Load<sprite>("Numbers/2");
           else if(_seconds &lt;3)
               NumSprite.sprite = Resources.Load<sprite>("Numbers/1");


           if (_seconds >= 3 &amp;&amp; _seconds &lt;=4 ) {
               canStart = true;
           }

           if (canStart) {
               NumSprite.gameObject.SetActive(false);
               canStart = false;
               FindObjectOfType<capturegui> ().StartCapture();
               videoPlayer.Play ();
               videoThumbnail.SetActive (false);
           }

       }

       IEnumerator StartConversion()
       {
           yield return new WaitForSeconds (1.5f);
           process = new Process();

           if (File.Exists (Application.streamingAssetsPath + "/FinalVideo.avi"))
               File.Delete(Application.streamingAssetsPath + "/FinalVideo.avi");

           process.StartInfo.WorkingDirectory = Application.streamingAssetsPath;
           process.StartInfo.FileName = Application.streamingAssetsPath + "/ffmpeg.exe";
           process.StartInfo.Arguments = " -y -i " + StaticVariables.RawVideo + ".avi " + "-qscale 7 " + StaticVariables.FinalVideo + ".avi";
           process.StartInfo.CreateNoWindow = false;
           process.EnableRaisingEvents = true;
           process.Exited += new EventHandler(Process_Exited);
           process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
           process.Start();
           process.WaitForExit ();
           canvas.SetActive (false);
           PreviewVideo.SetActive (true);
           FindObjectOfType<previewvideo> ().Referesh ();
           File.Copy (Application.streamingAssetsPath + "/FinalVideo.avi", @"C:\xampp\htdocs\facebook\images\FinalVideo.avi", true);
           this.gameObject.SetActive (false);
       }

       void Process_Exited(object sender, EventArgs e)
       {
           process.Dispose ();
       }

       void VideoEndReached(UnityEngine.Video.VideoPlayer vp)
       {
           videoPlayer.Stop ();
           FindObjectOfType<capturegui> ().StopCapture();
           webcamTexture.Stop ();
           canvas.SetActive (true);
           StartCoroutine(StartConversion ());
       }

    }
    </capturegui></previewvideo></capturegui></sprite></sprite></sprite></videoclip></sprite></spriterenderer></sprite></spriterenderer>

    I am using Unity version 2017.1.1p4 personal edition. Windows 10 with high end PC. I am making this app for standalone PC.

    I am stuck here. Can’t proceed further. Please help me with this issue.

  • FFmpeg stream giving me "Alsa" errors

    14 mars 2019, par Sherman B.

    Of late I have been trying different ways of telling my Raspberry Pi to send video to YouTube live stream. One of the things I wanted to be able to do is boot the Pi up, and it automatically starts the live stream on its own. The advantages to this are huge (won’t have to tote around keyboard/mouse to start the stream, or have to ssh into the Pi to start the stream).

    Now what I did to accomplish this was to make a Python program that pipes the stream from my encoder(FFmpeg) directly to the stream. My goal was to make the program work, and then, set it to run automatically. But every time I run the file in my terminal this is my result :

    Traceback (most recent call last):
     File "stream.py", line 22, in <module>
       stream.stdin.close()
    NameError: name 'stream' is not defined
    [h264 @ 0x19ed450] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    pi@raspberrypi:~ $ Input #0, h264, from 'pipe:':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: h264, none, 25 tbr, 1200k tbn, 50 tbc
    Unknown input format: 'alsa'
    </module>

    Now I think I can fix I can fix some of those errors, but the biggest thing that worries me there is : the fact that "alsa" is unknown. I installed "libsasound" which is supposed to make Alsa usable, but that clearly did not help.

    I am using Python 3.

    This is my syntax for this program :

    import subprocess
    import picamera
    import time
    YOUTUBE="rtmp://a.rtmp.youtube.com/live2/"
    KEY = ("MY PERSONAL ENCODER KEY")
    stream_cmd = 'ffmpeg -f h264 -r 25 -i - -itsoffset 5.5 -fflags nobuffer -f alsa -ac 1 -i hw:1,0 -vcodec copy -acodec aac -ac 1 -ar 8000 -ab 32k -map 0:0 -map 1:0 -strict experimental -f flv ' + YOUTUBE + KEY
    stream_pipe = subprocess.Popen(stream_cmd, shell=True, stdin=subprocess.PIPE)
    camera = picamera.PiCamera(resolution=(640, 480), framerate=25)
    try:
     now = time.strftime("%Y-%m-%d-%H:%M:%S")
     camera.framerate = 25
     camera.vflip = True
     camera.hflip = True
     camera.start_recording(stream.stdin, format='h264', bitrate = 2000000)
     while True:
        camera.wait_recording(1)
    except KeyboardInterrupt:
        camera.stop_recording()
    finally:
     camera.close()
     stream.stdin.close()
     stream.wait()
     print("Camera safely shut down")
     print("Good bye")

    Now maybe I am missing something simple here, but I don’t know what. I have tried many ideas (e.g. replacing Alsa with some other input, naming the "stream" function.) I have no idea.