Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (89)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (10807)

  • Android JavaCV FFmpeg webstream to local static website

    26 mars 2017, par Thomas Devoogdt

    For my integrated test I’m working on an application that needs to provide a live stream to a locally hosted website. I’ve already built a working site that run’s on nanohttpd. This application performs also special image processing. Therefore I use JavaCV. The library is working perfectly and all cpp bindings are working too.

    My question : How to set up a live stream that can directly be played in a static site hosted by nanohttpd ? - I am on the right way ?

    My code :

    init :

    private void initLiveStream() throws FrameRecorder.Exception {
       /* ~~~ https://github.com/bytedeco/javacv/issues/598 ~~~ */
       frameRecorder = new FFmpegFrameRecorder("http://localhost:9090", imageWidth, imageHeight, 0);
       frameRecorder.setVideoOption("preset", "ultrafast");
       frameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
       frameRecorder.setAudioCodec(0);
       frameRecorder.setPixelFormat(avutil.AV_PIX_FMT_YUV420P);
       frameRecorder.setFormat("webm");
       frameRecorder.setGopSize(10);
       frameRecorder.setFrameRate(frameRate);
       frameRecorder.setVideoBitrate(5000);
       frameRecorder.setOption("content_type","video/webm");
       frameRecorder.setOption("listen", "1");
       frameRecorder.start();
    }

    In my CameraView :

    @Override
    public void onPreviewFrame(byte[] data, Camera camera) {
       Camera.Size size = camera.getParameters().getPreviewSize();
       Frame frame = new AndroidFrameConverter().convert(data, size.width, size.height);
       try {
            if(frameRecorder!=null){
                frameRecorder.record(frame);
            }
        } catch (FrameRecorder.Exception e) {
            e.printStackTrace();
        }
    }

    Here is one of the stack traces that ar shown frequently in my search to the solution :

    org.bytedeco.javacv.FrameRecorder$Exception: avio_open error() error -111: Could not open 'http://localhost:9090'

    I couldn’t find any other thread addressing this specific issue.

    Thanks in advance

    EDIT

    Thanks to Chester Cobus, Here is my used code :

    Websocket :

    //Constructor
    AsyncHttpServer serverStream = new AsyncHttpServer();
    List<websocket> sockets = new ArrayList&lt;>();

    //http://stackoverflow.com/a/33021907/5500092
    //I'm planning to use more sockets. This is the only uniform expression I found.
    serverStream.websocket("/((?:[^/]*/)*)(.*)", new AsyncHttpServer.WebSocketRequestCallback() {
        @Override
        public void onConnected(final WebSocket webSocket, AsyncHttpServerRequest request) {
            String uri = request.getPath();
            if (uri.equals("/live")) {
                sockets.add(webSocket);

                //Use this to clean up any references to your websocket
                webSocket.setClosedCallback(new CompletedCallback() {
                    @Override
                    public void onCompleted(Exception ex) {
                        try {
                            if (ex != null)
                                Log.e("WebSocket", "Error");
                        } finally {
                            sockets.remove(webSocket);
                        }
                    }
                });
            }
        }
    });

    //Updater (Observer pattern)
    @Override
    public void updated(byte[] data) {
       for (WebSocket socket : sockets) {
            socket.write(new ByteBufferList(data));
       }
    }
    </websocket>

    Record Acitivy

    private long start_time = System.currentTimeMillis();

    @Override
    public void onPreviewFrame(byte[] data, Camera camera) {
       long now_time = System.currentTimeMillis();
       if ((now_time - start_time) > 250) {
           start_time = now_time;
           //https://forums.xamarin.com/discussion/40991/onpreviewframe-issue-converting-preview-byte-to-android-graphics-bitmap
           Camera.Size size = camera.getParameters().getPreviewSize();
           YuvImage image = new YuvImage(data, ImageFormat.NV21, size.width, size.height, null);
           ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
           image.compressToJpeg(new Rect(0, 0, size.width, size.height), 60, byteArrayOutputStream);
           MainActivity.getWebStreamer().updated(byteArrayOutputStream.toByteArray());
       }
    }

    JavaScript

    var socket;
    var imageElement;

    /**
    * path - String.Format("ws://{0}:8090/live", Window.Location.HostName)
    * image - HTMLImageElement
    */
    function imageStreamer(path, image) {
       imageElement = image;
       socket = new WebSocket(path);

       socket.onmessage = function(msg) {
           var arrayBuffer = msg.data;
           var reader = new FileReader();
           reader.onload = function(e) {
               imageElement.src = e.target.result;
           };
           reader.readAsDataURL(arrayBuffer);
       };
    }
  • How do I upscale an iOS App Preview video to 1080 x 1920 ? [closed]

    12 avril 2024, par Benjamin Thiel

    I just captured a video of my new app running on an iPhone 6 using QuickTime Player and a Lightning cable. Afterwards I created an App Preview project in iMovie, exported it and could successfully upload it to iTunes Connect.

    &#xA;&#xA;

    Apple requires developers to upload App Previews in different resolutions dependent on screen size, namely :

    &#xA;&#xA;

      &#xA;
    • iPhone 5(S) : 1080 x 1920 or 640 x 1136
    • &#xA;

    • iPhone 6 : 750 x 1334 (what I have)
    • &#xA;

    • iPhone 6+ : 1080 x 1920
    • &#xA;

    &#xA;&#xA;

    Obviously, 1080 x 1920 is killing two birds with one stone. I know that upscaling isn't the perfect solution, but it's meeting my needs. Since I don't own a 6+, another recording session won't do the trick.

    &#xA;&#xA;

    Unfortunately, iTunes Connect is extremely picky about what to accept. Here's what I tried, to no avail :

    &#xA;&#xA;

      &#xA;
    • Handbrake, iMovie, QuickTime do not support upscaling
    • &#xA;

    • MPEG Streamclip
    • &#xA;

    • ffmpeg -i input.mp4 -acodec copy -vf scale=1080:1920 output.mp4
    • &#xA;

    &#xA;&#xA;

    Strangely enough, iTunes Connect keeps complaining about the wrong resolution when I try to upload the output.mp4 of ffmpeg.

    &#xA;

  • How do I upscale an iOS App Preview video to 1080 x 1920 ?

    30 août 2016, par Benjamin Thiel

    I just captured a video of my new app running on an iPhone 6 using QuickTime Player and a Lightning cable. Afterwards I created an App Preview project in iMovie, exported it and could successfully upload it to iTunes Connect.

    Apple requires developers to upload App Previews in different resolutions dependent on screen size, namely :

    • iPhone 5(S) : 1080 x 1920 or 640 x 1136
    • iPhone 6 : 750 x 1334 (what I have)
    • iPhone 6+ : 1080 x 1920

    Obviously, 1080 x 1920 is killing two birds with one stone. I know that upscaling isn’t the perfect solution, but it’s meeting my needs. Since I don’t own a 6+, another recording session won’t do the trick.

    Unfortunately, iTunes Connect is extremely picky about what to accept. Here’s what I tried, to no avail :

    • Handbrake, iMovie, QuickTime do not support upscaling
    • MPEG Streamclip
    • ffmpeg -i input.mp4 -acodec copy -vf scale=1080:1920 output.mp4

    Strangely enough, iTunes Connect keeps complaining about the wrong resolution when I try to upload the output.mp4 of ffmpeg.