Recherche avancée

Médias (91)

Autres articles (105)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (11433)

  • why am i getting this error when using FFmpeg in a spring boot app on a mac intel device : SIGSEGV (0xb) at pc=0x000000013d71b0e0, pid=49777, tid=42755

    19 juillet 2024, par Godwill Christopher

    I am working with FFmpeg library in spring boot app to stream live recording from an ip camera via RSTP and save to S3 bucket but i am running into the error below.

    


    A fatal error has been detected by the Java Runtime Environment :

    


    SIGSEGV (0xb) at pc=0x000000013d71b0e0, pid=49777, tid=42755

    


    JRE version : OpenJDK Runtime Environment Corretto-19.0.2.7.1 (19.0.2+7) (build 19.0.2+7-FR)
Java VM : OpenJDK 64-Bit Server VM Corretto-19.0.2.7.1 (19.0.2+7-FR, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
Problematic frame :
C [libavutil.56.dylib+0xa0e0] av_strstart+0x10

    


    No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
An error report file with more information is saved as :
/Users/CODA/Desktop/videoSaleService/hs_err_pid49777.log

    


    If you would like to submit a bug report, please visit :
https://github.com/corretto/corretto-19/issues/
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.

    


    Process finished with exit code 134 (interrupted by signal 6:SIGABRT)

    


    public static void main(String[] args) {
    OkHttpClient client = new OkHttpClient();
    try (S3Client s3Client = S3Client.create()) {
        VideoService videoService = new VideoService(new VideoRepositoryImpl(),
                new S3Service(s3Client), new VideoExtractor(client), new ISApiClient());
        videoService.streamLiveVideoRSTP(System.out);
    } catch (IOException e) {
        log.error("Error occurred while streaming live video: {}", e.getMessage(), e);
    } catch (Exception e) {
        log.error("Unexpected error occurred: {}", e.getMessage(), e);
    }
}

public void streamLiveVideoRSTP(OutputStream outputStream) throws IOException {
    File tempFile = File.createTempFile("live_stream", ".mp4");

    try (InputStream inputStream = client.getLiveStreamingVideoRSTP();
         OutputStream fileOutputStream = new FileOutputStream(tempFile)) {
        byte[] buffer = new byte[4096];
        int bytesRead;
        while ((bytesRead = inputStream.read(buffer)) != -1) {
            outputStream.write(buffer, 0, bytesRead);
            fileOutputStream.write(buffer, 0, bytesRead);
        }
    } catch (Exception e) {
        log.error("Error occurred while streaming live video: {}", e.getMessage(), e);
        throw new IOException("Error occurred while streaming live video", e);
    }

    // Upload the captured video file to S3
    try {
        uploadStreamedVideoToS3(tempFile);
    } finally {
        if (tempFile.exists()) {
            if (!tempFile.delete()) {
                log.warn("Failed to delete temporary file: {}", tempFile.getAbsolutePath());
            }
        }
    }
}

private final BlockingQueue frameQueue = new ArrayBlockingQueue<>(10);

public ISApiClient() {
    new Thread(this::startGrabbingFrames).start();
}

public InputStream getLiveStreamingVideoRSTP() {
    return new InputStream() {
        private ByteArrayInputStream currentStream;

        @Override
        public int read() {
            if (currentStream == null || currentStream.available() == 0) {
                byte[] frame = frameQueue.poll();
                if (frame != null) {
                    currentStream = new ByteArrayInputStream(frame);
                } else {
                    return -1;
                }
            }
            return currentStream.read();
        }
    };
}

private void startGrabbingFrames() {
    try (FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(rtspUrl)) {
        frameGrabber.setOption("rtsp_transport", "tcp");
        frameGrabber.start();

        FFmpegFrameFilter frameFilter = new FFmpegFrameFilter("format=yuv420p",
                frameGrabber.getImageWidth(), frameGrabber.getImageHeight());
        frameFilter.setPixelFormat(frameGrabber.getPixelFormat());
        frameFilter.start();

        log.info("Started grabbing frames from RTSP stream.");

        while (true) {
            Frame frame = frameGrabber.grab();
            if (frame != null && frame.image != null) {
                log.info("Frame grabbed: width={} height={} timestamp={}",
                        frame.imageWidth, frame.imageHeight, frame.timestamp);
                frameFilter.push(frame);
                Frame filteredFrame = frameFilter.pull();

                if (filteredFrame != null && filteredFrame.image != null) {
                    log.info("Frame filtered: width={} height={} timestamp={}",
                            filteredFrame.imageWidth, filteredFrame.imageHeight, filteredFrame.timestamp);
                    byte[] imageBytes = convertFrameToBytes(filteredFrame);
                    if (imageBytes.length > 0) {
                        frameQueue.offer(imageBytes);
                        log.info("Frame added to queue, queue size={}", frameQueue.size());
                    }
                }
            }
        }
    } catch (IOException e) {
        log.error("Error grabbing frames: {}", e.getMessage(), e);
    }
}

private byte[] convertFrameToBytes(Frame frame) {
    if (frame == null || frame.image == null) {
        return new byte[0];
    }

    ByteBuffer byteBuffer = null;
    for (Object img : frame.image) {
        if (img instanceof ByteBuffer) {
            byteBuffer = (ByteBuffer) img;
            break;
        }
    }

    if (byteBuffer == null) {
        return new byte[0];
    }

    byte[] bytes = new byte[byteBuffer.remaining()];
    byteBuffer.get(bytes);
    return bytes;
}


    


  • lavu/riscv : grok B as an extension

    22 juillet 2024, par Rémi Denis-Courmont
    lavu/riscv : grok B as an extension
    

    The RISC-V B bit manipulation extension was ratified only two months ago.
    But it is strictly equivalent to the union of the zba, zbb and zbs
    extensions which were defined almost 3 years earlier. Rather than require
    new assembler, we can just match the extension name manually and translate
    it into its constituent parts.

    • [DH] libavutil/riscv/asm.S
  • lavc/h264dsp : use RISC-V B extension

    19 juillet 2024, par Rémi Denis-Courmont
    lavc/h264dsp : use RISC-V B extension
    

    This saves one register and one instruction per transform.
    add16 and add16intra thus become stack-less.

    • [DH] libavcodec/riscv/h264dsp_init.c
    • [DH] libavcodec/riscv/h264idct_rvv.S