Recherche avancée

Médias (91)

Autres articles (67)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

Sur d’autres sites (10307)

  • libavcodec on media entirely in memory

    11 janvier 2019, par Nick

    I’m dealing with small micro videos that exist entirely in memory (as a string). So far, I haven’t been able to get avcodec to properly decode h264 in this way.

    I tried a custom AVIOContext that operates on containerized media :

    struct Stream { char* str; size_t pos; size_t size; };

    static int ReadStream(void* opaque, uint8* buf, int buf_size) {
     Stream* strm = reinterpret_cast(opaque);
     int read = strm->size-strm->pos;
     read = read < buf_size ? read : buf_size;
     memcpy(buf, strm->str+sto-æ>pos, read);
     memset(buf+read, 0, buf_size-read);
     strm->pos += read;
     return read;
    }

    static int64_t SeekStream(void *opaque, int64_t offset, int whence) {
     Stream* strm = reinterpret_cast(opaque);
     if (whence == AVSEEK_SIZE) {
       return strm->size;
     } else if (whence == SEEK_END) {
       strm->pos = strm->size;
     } else if (whence == SEEK_SET) {
       strm->pos = 0;
     }
     strm->pos += offset;
     return strm->pos;
    }

    int main(int argc, char *argv[]) {
     string content;
     GetContents("test.mp4", &content);

     avcodec_register_all();

     uint8* buff = (uint8*)malloc(4096 + AV_INPUT_BUFFER_PADDING_SIZE);
     Stream strm = { const_cast(content.data()), 0, content.size() };
     void* opaque = reinterpret_cast(&strm);

     AVFormatContext* fmtctx = avformat_alloc_context();
     AVIOContext* avctx = avio_alloc_context(buff, 4096, 0, opaque, &ReadStream, nullptr, &SeekStream);
     AVInputFormat* ifmt = av_find_input_format("mp4");
     AVDictionary* opts = nullptr;

     fmtctx->pb = avctx;
     avformat_open_input(&fmtctx, "", ifmt, &opts);
     avformat_find_stream_info(fmtctx, &opts);
    }

    But that always segfaults at find_stream_info.

    I also tried pre-demuxing the video stream into raw h264 and just sending the stream packets (e.g.) :

    int main(int argc, char *argv[]) {
     string content;
     GetContents("test.h264", &content);
     uint8* data = reinterpret_cast(const_cast(content.c_str()));

     avcodec_register_all();

     AVCodec* codec = avcodec_find_decoder(AV_CODEC_ID_H264);
     AVCodecContext* ctx = avcodec_alloc_context3(codec);

     ctx->width = 1080;
     ctx->height = 1920;
     avcodec_open2(ctx, codec, nullptr);

     AVPacket* pkt = av_packet_alloc();    
     AVFrame* frame = av_frame_alloc();

     pkt->data = data;
     pkt->size = 4096;
     avcodec_send_packet(ctx, pkt);
     data += 4096;
    }

    But that just gives a nondescript "error while decoding MB # #, bytestream #". Note that I’ve removed the error checking from the allocs, etc. to simplify the code, but I am checking to make sure everything is allocated and instantiated correctly.

    Any suggestions for where my misunderstanding or misuse of avcodec is ?

  • Unable to play webM file on chromium with Media Source Extensions. Works in firefox and vlc

    23 octobre 2018, par raul

    I’m currently trying to implement a video player using Media Source Extensions. Currently just a very simple proof of concept, following a tutorial I found here.

    I cloned their repo with all source code from github here and am testing the implementation on Chromium and Firefox with various video files.

    Everything worked well with the example webm files in the repo for both browsers.

    Next I tried to convert a video I downloaded from some random site using ffmpeg and mse-tools to "align the clusters" of the webm file using the following commands :

    ffmpeg -i randomvideo.mp4 -c:v libvpx -c:a libvorbis output.webm
    mse_webm_remuxer output.webm aligned.webm

    Again, all was well on both browsers.

    Finally, I wanted to convert a very simple animation I created in blender (rendered with h264 in mp4).

    I tried converting the resulting file using the same process as above and the file played normally on firefox, but did not load on chromium.

    I assume I am commiting some error when converting the file, but inspecting the attributes of the final file with vlc and ffprobe, I could not find any obvious problems.

    Any ideas as to what I am doing wrong ?

    One final test I did was to go to this site to get some sample webm files.

    I downloaded the "Big Buck Bunny Trailer in WebM" and "Elephants Dream as WebM File".

    Both files worked in firefox, but the "Elephants Dream" file would not play in chromium.

    I am on a linux machine (Arch Linux distro) with the following versions of the browsers :

    Chromium Version 69.0.3497.100 (Official Build) Arch Linux (64-bit)

    Firefox 62.0.3 (64-bit)

    I have shared the file I created from the blender animation (very small - only 36 KB) on google drive here in case anyone wants to check it out.

  • javax.media.NoDataSinkException

    23 novembre 2022, par Divya

    I am trying to convert Jpeg images into .mov video file

    



     package com.ecomm.pl4mms.test;&#xA;&#xA;import java.io.*;&#xA;import java.util.*;&#xA;import java.awt.Dimension;&#xA;&#xA;import javax.media.*;&#xA;import javax.media.control.*;&#xA;import javax.media.protocol.*;&#xA;import javax.media.protocol.DataSource;&#xA;import javax.media.datasink.*;&#xA;import javax.media.format.VideoFormat;&#xA;import javax.media.format.JPEGFormat;&#xA;&#xA;public class JpegImagesToMovie implements ControllerListener, DataSinkListener {&#xA;&#xA;    public boolean doItPath(int width, int height, int frameRate, Vector inFiles, String outputURL) {&#xA;        // Check for output file extension.&#xA;        if (!outputURL.endsWith(".mov") &amp;&amp; !outputURL.endsWith(".MOV")) {&#xA;            // System.err.println("The output file extension should end with a&#xA;            // .mov extension");&#xA;            prUsage();&#xA;        }&#xA;&#xA;        // Generate the output media locators.&#xA;        MediaLocator oml;&#xA;&#xA;        if ((oml = createMediaLocator("file:" &#x2B; outputURL)) == null) {&#xA;            // System.err.println("Cannot build media locator from: " &#x2B;&#xA;            // outputURL);&#xA;            //System.exit(0);&#xA;        }&#xA;&#xA;        boolean success = doIt(width, height, frameRate, inFiles, oml);&#xA;&#xA;        System.gc();&#xA;        return success;&#xA;    }&#xA;&#xA;    public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {&#xA;        try {&#xA;            System.out.println(inFiles.size());&#xA;            ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);&#xA;&#xA;            Processor p;&#xA;&#xA;            try {&#xA;                // System.err.println("- create processor for the image&#xA;                // datasource ...");&#xA;                System.out.println("processor");&#xA;                p = Manager.createProcessor(ids);&#xA;                System.out.println("success");&#xA;            } catch (Exception e) {&#xA;                // System.err.println("Yikes! Cannot create a processor from the&#xA;                // data source.");&#xA;                return false;&#xA;            }&#xA;&#xA;            p.addControllerListener(this);&#xA;&#xA;            // Put the Processor into configured state so we can set&#xA;            // some processing options on the processor.&#xA;            p.configure();&#xA;            if (!waitForState(p, p.Configured)) {&#xA;                System.out.println("Issue configuring");&#xA;                // System.err.println("Failed to configure the processor.");&#xA;                p.close();&#xA;                p.deallocate();&#xA;                return false;&#xA;            }&#xA;            System.out.println("Configured");&#xA;&#xA;            // Set the output content descriptor to QuickTime.&#xA;            p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));&#xA;System.out.println(outML);&#xA;            // Query for the processor for supported formats.&#xA;            // Then set it on the processor.&#xA;            TrackControl tcs[] = p.getTrackControls();&#xA;            Format f[] = tcs[0].getSupportedFormats();&#xA;            System.out.println(f[0].getEncoding());&#xA;            if (f == null || f.length &lt;= 0) {&#xA;                 System.err.println("The mux does not support the input format: " &#x2B; tcs[0].getFormat());&#xA;                p.close();&#xA;                p.deallocate();&#xA;                return false;&#xA;            }&#xA;&#xA;            tcs[0].setFormat(f[0]);&#xA;&#xA;            // System.err.println("Setting the track format to: " &#x2B; f[0]);&#xA;&#xA;            // We are done with programming the processor. Let&#x27;s just&#xA;            // realize it.&#xA;            p.realize();&#xA;            if (!waitForState(p, p.Realized)) {&#xA;                // System.err.println("Failed to realize the processor.");&#xA;                p.close();&#xA;                p.deallocate();&#xA;                return false;&#xA;            }&#xA;&#xA;            // Now, we&#x27;ll need to create a DataSink.&#xA;            DataSink dsink;&#xA;            if ((dsink = createDataSink(p, outML)) == null) {&#xA;                // System.err.println("Failed to create a DataSink for the given&#xA;                // output MediaLocator: " &#x2B; outML);&#xA;                p.close();&#xA;                p.deallocate();&#xA;                return false;&#xA;            }&#xA;&#xA;            dsink.addDataSinkListener(this);&#xA;            fileDone = false;&#xA;&#xA;            // System.err.println("start processing...");&#xA;&#xA;            // OK, we can now start the actual transcoding.&#xA;            try {&#xA;                p.start();&#xA;                dsink.start();&#xA;            } catch (IOException e) {&#xA;                p.close();&#xA;                p.deallocate();&#xA;                dsink.close();&#xA;                // System.err.println("IO error during processing");&#xA;                return false;&#xA;            }&#xA;&#xA;            // Wait for EndOfStream event.&#xA;            waitForFileDone();&#xA;&#xA;            // Cleanup.&#xA;            try {&#xA;                dsink.close();&#xA;            } catch (Exception e) {&#xA;            }&#xA;            p.removeControllerListener(this);&#xA;&#xA;            // System.err.println("...done processing.");&#xA;&#xA;            p.close();&#xA;&#xA;            return true;&#xA;        } catch (NotConfiguredError e) {&#xA;            // TODO Auto-generated catch block&#xA;            e.printStackTrace();&#xA;        }&#xA;&#xA;        return false;&#xA;    }&#xA;&#xA;    /**&#xA;     * Create the DataSink.&#xA;     */&#xA;    DataSink createDataSink(Processor p, MediaLocator outML) {&#xA;System.out.println("In data sink");&#xA;        DataSource ds;&#xA;&#xA;        if ((ds = p.getDataOutput()) == null) {&#xA;         System.out.println("Something is really wrong: the processor does not have an output DataSource");&#xA;            return null;&#xA;        }&#xA;&#xA;        DataSink dsink;&#xA;&#xA;        try {&#xA;             System.out.println("- create DataSink for: " &#x2B; ds.toString()&#x2B;ds.getContentType());&#xA;            dsink = Manager.createDataSink(ds, outML);&#xA;            dsink.open();&#xA;            System.out.println("Done data sink");&#xA;        } catch (Exception e) {&#xA;             System.err.println("Cannot create the DataSink: " &#x2B;e);&#xA;             e.printStackTrace();&#xA;            return null;&#xA;        }&#xA;&#xA;        return dsink;&#xA;    }&#xA;&#xA;    Object waitSync = new Object();&#xA;    boolean stateTransitionOK = true;&#xA;&#xA;    /**&#xA;     * Block until the processor has transitioned to the given state. Return&#xA;     * false if the transition failed.&#xA;     */&#xA;    boolean waitForState(Processor p, int state) {&#xA;        synchronized (waitSync) {&#xA;            try {&#xA;                while (p.getState() &lt; state &amp;&amp; stateTransitionOK)&#xA;                    waitSync.wait();&#xA;            } catch (Exception e) {&#xA;            }&#xA;        }&#xA;        return stateTransitionOK;&#xA;    }&#xA;&#xA;    /**&#xA;     * Controller Listener.&#xA;     */&#xA;    public void controllerUpdate(ControllerEvent evt) {&#xA;&#xA;        if (evt instanceof ConfigureCompleteEvent || evt instanceof RealizeCompleteEvent&#xA;                || evt instanceof PrefetchCompleteEvent) {&#xA;            synchronized (waitSync) {&#xA;                stateTransitionOK = true;&#xA;                waitSync.notifyAll();&#xA;            }&#xA;        } else if (evt instanceof ResourceUnavailableEvent) {&#xA;            synchronized (waitSync) {&#xA;                stateTransitionOK = false;&#xA;                waitSync.notifyAll();&#xA;            }&#xA;        } else if (evt instanceof EndOfMediaEvent) {&#xA;            evt.getSourceController().stop();&#xA;            evt.getSourceController().close();&#xA;        }&#xA;    }&#xA;&#xA;    Object waitFileSync = new Object();&#xA;    boolean fileDone = false;&#xA;    boolean fileSuccess = true;&#xA;&#xA;    /**&#xA;     * Block until file writing is done.&#xA;     */&#xA;    boolean waitForFileDone() {&#xA;        synchronized (waitFileSync) {&#xA;            try {&#xA;                while (!fileDone)&#xA;                    waitFileSync.wait();&#xA;            } catch (Exception e) {&#xA;            }&#xA;        }&#xA;        return fileSuccess;&#xA;    }&#xA;&#xA;    /**&#xA;     * Event handler for the file writer.&#xA;     */&#xA;    public void dataSinkUpdate(DataSinkEvent evt) {&#xA;&#xA;        if (evt instanceof EndOfStreamEvent) {&#xA;            synchronized (waitFileSync) {&#xA;                fileDone = true;&#xA;                waitFileSync.notifyAll();&#xA;            }&#xA;        } else if (evt instanceof DataSinkErrorEvent) {&#xA;            synchronized (waitFileSync) {&#xA;                fileDone = true;&#xA;                fileSuccess = false;&#xA;                waitFileSync.notifyAll();&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    public static void main(String arg[]) {&#xA;        try {&#xA;            String args[] = { "-w 100 -h 100 -f 100 -o F:\\test.mov F:\\Text69.jpg F:\\Textnew.jpg" };&#xA;            if (args.length == 0)&#xA;                prUsage();&#xA;&#xA;            // Parse the arguments.&#xA;            int i = 0;&#xA;            int width = -1, height = -1, frameRate = 1;&#xA;            Vector inputFiles = new Vector();&#xA;            String outputURL = null;&#xA;&#xA;            while (i &lt; args.length) {&#xA;&#xA;                if (args[i].equals("-w")) {&#xA;                    i&#x2B;&#x2B;;&#xA;                    if (i >= args.length)&#xA;                        width = new Integer(args[i]).intValue();&#xA;                } else if (args[i].equals("-h")) {&#xA;                    i&#x2B;&#x2B;;&#xA;                    if (i >= args.length)&#xA;                        height = new Integer(args[i]).intValue();&#xA;                } else if (args[i].equals("-f")) {&#xA;                    i&#x2B;&#x2B;;&#xA;                    if (i >= args.length)&#xA;                        frameRate = new Integer(args[i]).intValue();&#xA;                } else if (args[i].equals("-o")) {&#xA;                    System.out.println("in ou");&#xA;                    i&#x2B;&#x2B;;&#xA;                    System.out.println(i);&#xA;                    if (i >= args.length)&#xA;                        outputURL = args[i];&#xA;                    System.out.println(outputURL);&#xA;                } else {&#xA;                    System.out.println("adding"&#x2B;args[i]);&#xA;                    inputFiles.addElement(args[i]);&#xA;                }&#xA;                i&#x2B;&#x2B;;&#xA;&#xA;            }&#xA;            inputFiles.addElement("F:\\Textnew.jpg");&#xA;            outputURL = "F:\\test.mov";&#xA;            System.out.println(inputFiles.size() &#x2B; outputURL);&#xA;            if (outputURL == null || inputFiles.size() == 0)&#xA;                prUsage();&#xA;&#xA;            // Check for output file extension.&#xA;            if (!outputURL.endsWith(".mov") &amp;&amp; !outputURL.endsWith(".MOV")) {&#xA;                System.err.println("The output file extension should end with a .mov extension");&#xA;                prUsage();&#xA;            }&#xA;            width = 100;&#xA;            height = 100;&#xA;            if (width &lt; 0 || height &lt; 0) {&#xA;                System.err.println("Please specify the correct image size.");&#xA;                prUsage();&#xA;            }&#xA;&#xA;            // Check the frame rate.&#xA;            if (frameRate &lt; 1)&#xA;                frameRate = 1;&#xA;&#xA;            // Generate the output media locators.&#xA;            MediaLocator oml;&#xA;            oml = createMediaLocator(outputURL);&#xA;            System.out.println("Media" &#x2B; oml);&#xA;            if (oml == null) {&#xA;                System.err.println("Cannot build media locator from: " &#x2B; outputURL);&#xA;                // //System.exit(0);&#xA;            }&#xA;            System.out.println("Before change");&#xA;System.out.println(inputFiles.size());&#xA;            JpegImagesToMovie imageToMovie = new JpegImagesToMovie();&#xA;            boolean status = imageToMovie.doIt(width, height, frameRate, inputFiles, oml);&#xA;            System.out.println("Status"&#x2B;status);&#xA;            //System.exit(0);&#xA;        } catch (Exception e) {&#xA;            // TODO Auto-generated catch block&#xA;            e.printStackTrace();&#xA;        }&#xA;    }&#xA;&#xA;    static void prUsage() {&#xA;        System.err.println(&#xA;                "Usage: java JpegImagesToMovie -w <width> -h <height> -f  -o <output url="url"> <input jpeg="jpeg" file="file" 1="1" /> <input jpeg="jpeg" file="file" 2="2" /> ...");&#xA;        //System.exit(-1);&#xA;    }&#xA;&#xA;    /**&#xA;     * Create a media locator from the given string.&#xA;     */&#xA;    static MediaLocator createMediaLocator(String url) {&#xA;        System.out.println(url);&#xA;        MediaLocator ml;&#xA;&#xA;        if (url.indexOf(":") > 0 &amp;&amp; (ml = new MediaLocator(url)) != null)&#xA;            return ml;&#xA;&#xA;        if (url.startsWith(File.separator)) {&#xA;            if ((ml = new MediaLocator("file:" &#x2B; url)) != null)&#xA;                return ml;&#xA;        } else {&#xA;            String file = "file:" &#x2B; System.getProperty("user.dir") &#x2B; File.separator &#x2B; url;&#xA;            if ((ml = new MediaLocator(file)) != null)&#xA;                return ml;&#xA;        }&#xA;&#xA;        return null;&#xA;    }&#xA;&#xA;    ///////////////////////////////////////////////&#xA;    //&#xA;    // Inner classes.&#xA;    ///////////////////////////////////////////////&#xA;&#xA;    /**&#xA;     * A DataSource to read from a list of JPEG image files and turn that into a&#xA;     * stream of JMF buffers. The DataSource is not seekable or positionable.&#xA;     */&#xA;    class ImageDataSource extends PullBufferDataSource {&#xA;&#xA;        ImageSourceStream streams[];&#xA;&#xA;        ImageDataSource(int width, int height, int frameRate, Vector images) {&#xA;            streams = new ImageSourceStream[1];&#xA;            streams[0] = new ImageSourceStream(width, height, frameRate, images);&#xA;        }&#xA;&#xA;        public void setLocator(MediaLocator source) {&#xA;        }&#xA;&#xA;        public MediaLocator getLocator() {&#xA;            return null;&#xA;        }&#xA;&#xA;        /**&#xA;         * Content type is of RAW since we are sending buffers of video frames&#xA;         * without a container format.&#xA;         */&#xA;        public String getContentType() {&#xA;            return ContentDescriptor.RAW;&#xA;        }&#xA;&#xA;        public void connect() {&#xA;        }&#xA;&#xA;        public void disconnect() {&#xA;        }&#xA;&#xA;        public void start() {&#xA;        }&#xA;&#xA;        public void stop() {&#xA;        }&#xA;&#xA;        /**&#xA;         * Return the ImageSourceStreams.&#xA;         */&#xA;        public PullBufferStream[] getStreams() {&#xA;            return streams;&#xA;        }&#xA;&#xA;        /**&#xA;         * We could have derived the duration from the number of frames and&#xA;         * frame rate. But for the purpose of this program, it&#x27;s not necessary.&#xA;         */&#xA;        public Time getDuration() {&#xA;            return DURATION_UNKNOWN;&#xA;        }&#xA;&#xA;        public Object[] getControls() {&#xA;            return new Object[0];&#xA;        }&#xA;&#xA;        public Object getControl(String type) {&#xA;            return null;&#xA;        }&#xA;    }&#xA;&#xA;    /**&#xA;     * The source stream to go along with ImageDataSource.&#xA;     */&#xA;    class ImageSourceStream implements PullBufferStream {&#xA;&#xA;        Vector images;&#xA;        int width, height;&#xA;        VideoFormat format;&#xA;&#xA;        int nextImage = 0; // index of the next image to be read.&#xA;        boolean ended = false;&#xA;&#xA;        public ImageSourceStream(int width, int height, int frameRate, Vector images) {&#xA;            this.width = width;&#xA;            this.height = height;&#xA;            this.images = images;&#xA;&#xA;            format = new JPEGFormat(new Dimension(width, height), Format.NOT_SPECIFIED, Format.byteArray,&#xA;                    (float) frameRate, 75, JPEGFormat.DEC_422);&#xA;        }&#xA;&#xA;        /**&#xA;         * We should never need to block assuming data are read from files.&#xA;         */&#xA;        public boolean willReadBlock() {&#xA;            return false;&#xA;        }&#xA;&#xA;        /**&#xA;         * This is called from the Processor to read a frame worth of video&#xA;         * data.&#xA;         */&#xA;        public void read(Buffer buf) throws IOException {&#xA;&#xA;            // Check if we&#x27;ve finished all the frames.&#xA;            if (nextImage >= images.size()) {&#xA;                // We are done. Set EndOfMedia.&#xA;                System.err.println("Done reading all images.");&#xA;                buf.setEOM(true);&#xA;                buf.setOffset(0);&#xA;                buf.setLength(0);&#xA;                ended = true;&#xA;                return;&#xA;            }&#xA;&#xA;            String imageFile = (String) images.elementAt(nextImage);&#xA;            nextImage&#x2B;&#x2B;;&#xA;&#xA;            System.err.println("  - reading image file: " &#x2B; imageFile);&#xA;&#xA;            // Open a random access file for the next image.&#xA;            RandomAccessFile raFile;&#xA;            raFile = new RandomAccessFile(imageFile, "r");&#xA;&#xA;            byte data[] = null;&#xA;&#xA;            // Check the input buffer type &amp; size.&#xA;&#xA;            if (buf.getData() instanceof byte[])&#xA;                data = (byte[]) buf.getData();&#xA;&#xA;            // Check to see the given buffer is big enough for the frame.&#xA;            if (data == null || data.length &lt; raFile.length()) {&#xA;                data = new byte[(int) raFile.length()];&#xA;                buf.setData(data);&#xA;            }&#xA;&#xA;            // Read the entire JPEG image from the file.&#xA;            raFile.readFully(data, 0, (int) raFile.length());&#xA;&#xA;            System.err.println("    read " &#x2B; raFile.length() &#x2B; " bytes.");&#xA;&#xA;            buf.setOffset(0);&#xA;            buf.setLength((int) raFile.length());&#xA;            buf.setFormat(format);&#xA;            buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);&#xA;&#xA;            // Close the random access file.&#xA;            raFile.close();&#xA;        }&#xA;&#xA;        /**&#xA;         * Return the format of each video frame. That will be JPEG.&#xA;         */&#xA;        public Format getFormat() {&#xA;            return format;&#xA;        }&#xA;&#xA;        public ContentDescriptor getContentDescriptor() {&#xA;            return new ContentDescriptor(ContentDescriptor.RAW);&#xA;        }&#xA;&#xA;        public long getContentLength() {&#xA;            return 0;&#xA;        }&#xA;&#xA;        public boolean endOfStream() {&#xA;            return ended;&#xA;        }&#xA;&#xA;        public Object[] getControls() {&#xA;            return new Object[0];&#xA;        }&#xA;&#xA;        public Object getControl(String type) {&#xA;            return null;&#xA;        }&#xA;    }&#xA;}&#xA;</output></height></width>

    &#xA;&#xA;

    I am getting

    &#xA;&#xA;

        Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@d7b1517&#xA;javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@d7b1517&#xA;    at javax.media.Manager.createDataSink(Manager.java:1894)&#xA;    at com.ecomm.pl4mms.test.JpegImagesToMovie.createDataSink(JpegImagesToMovie.java:168)&#xA;    at com.ecomm.pl4mms.test.JpegImagesToMovie.doIt(JpegImagesToMovie.java:104)&#xA;    at com.ecomm.pl4mms.test.JpegImagesToMovie.main(JpegImagesToMovie.java:330)&#xA;

    &#xA;&#xA;

    Please help me to resolve this and let me what can be the cause of this

    &#xA;&#xA;

    I am using java 1.8 and trying to create video with jpeg images and using

    &#xA;&#xA;

    javax.media to perform this action. and i followed http://www.oracle.com/technetwork/java/javase/documentation/jpegimagestomovie-176885.html&#xA;to write the code

    &#xA;