Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (41)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (4997)

  • Safari on Mac and IOS 14 Won't Play HTML 5 MP4 Video

    10 mars 2021, par Glen Elkins

    So i have developed a chat application that uses node for the back-end. When a user selects a video on their iphone it usually is .mov format so when it's sent to the node server it's then converted to mp4 with ffmpeg. All that works fine, then if i load up my chat again in Chrome on my mac the video plays just fine as the mp4.

    


    enter image description here

    


    This screenshot shows the video embed is there, set to mp4 yet it won't play in Safari on my mac or my phone, in fact it just shows the video as 0 seconds long yet i can play it in chrome and also download the mp4 file by accessing the embed url directly.

    


    Any ideas ? I had it convert to mp4 to prevent things like this, but safari doesn't seem to even like mp4 files.

    


    The back-end part that serves the private file is in Symfony 4 (PHP) :

    


    /**
     * @Route("/private/files/download/{base64Path}", name="downloadFile")
     * @param string $base64Path
     * @param Request $request
     * @return Response
     */
    public function downloadFile(string $base64Path, Request $request) : Response
    {


        // get token
        if(!$token = $request->query->get('token')){
            return new Response('Access Denied',403);
        }



        /** @var UserRepository $userRepo */
        $userRepo = $this->getDoctrine()->getRepository(User::class);

        /** @var User $user */
        if(!$user = $userRepo->findOneBy(['deleted'=>false,'active'=>true,'systemUser'=>false,'apiKey'=>$token])){
            return new Response('Access Denied',403);
        }



        // get path
        if($path = base64_decode($base64Path)){

            // make sure the folder we need exists
            $fullPath = $this->getParameter('private_upload_folder') . '/' . $path;



            if(!file_exists($fullPath)){
                return new Response('File Not Found',404);
            }

        

            $response = new Response();
            $response->headers->set('Content-Type', mime_content_type($fullPath));
            $response->headers->set('Content-Disposition', 'inline; filename="' . basename($fullPath) . '"');
            $response->headers->set('Content-Length', filesize($fullPath));
            $response->headers->set('Pragma', "no-cache");
            $response->headers->set('Expires', "0");
            $response->headers->set('Content-Transfer-Encoding', "binary");

            $response->sendHeaders();

            $response->setContent(readfile($fullPath));

            return $response;
        }

        return new Response('Invalid Path',404);
    }


    


    This works fine everywhere except safari when trying to embed the video. It's done like this because the videos are not public and need an access token.

    


    UPDATE : Here is a test link of an mp4, you'll have to allow the insecure certificate as it's on a quick test sub domain. If you open it in chrome, you'll see a 3 second video of my 3d printer curing station, if you load the same link in safari, you'll see it doesn't work

    


    https://tester.nibbrstaging.com/private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032

    


    The server runs on cPanel with Apache and i think it might be something to do with the video needs streaming ?

    


    UPDATED CODE THAT WORKS IN SAFARI BUT NOW BROKEN IN CHROME :

    


    Chrome is now giving Content-Length : 0 but it's working fine in safari.

    


    public function downloadFile(string $base64Path, Request $request) : ?Response
    {

        ob_clean();

        // get token
        if(!$token = $request->query->get('token')){
            return new Response('Access Denied',403);
        }


        

        /** @var UserRepository $userRepo */
        $userRepo = $this->getDoctrine()->getRepository(User::class);

        /** @var User $user */
        if(!$user = $userRepo->findOneBy(['deleted'=>false,'active'=>true,'systemUser'=>false,'apiKey'=>$token])){
            return new Response('Access Denied',403);
        }



        // get path
        if($path = base64_decode($base64Path)){

            // make sure the folder we need exists
            $fullPath = $this->getParameter('private_upload_folder') . '/' . $path;



            if(!file_exists($fullPath)){
                return new Response('File Not Found',404);
            }


            $filesize = filesize($fullPath);
            $mime = mime_content_type($fullPath);

            header('Content-Type: ' . $mime);

            if(isset($_SERVER['HTTP_RANGE'])){

                // Parse the range header to get the byte offset
                $ranges = array_map(
                    'intval', // Parse the parts into integer
                    explode(
                        '-', // The range separator
                        substr($_SERVER['HTTP_RANGE'], 6) // Skip the `bytes=` part of the header
                    )
                );



                // If the last range param is empty, it means the EOF (End of File)
                if(!$ranges[1]){
                    $ranges[1] = $filesize - 1;
                }

                header('HTTP/1.1 206 Partial Content');
                header('Accept-Ranges: bytes');
                header('Content-Length: ' . ($ranges[1] - $ranges[0])); // The size of the range

                // Send the ranges we offered
                header(
                    sprintf(
                        'Content-Range: bytes %d-%d/%d', // The header format
                        $ranges[0], // The start range
                        $ranges[1], // The end range
                        $filesize // Total size of the file
                    )
                );

                // It's time to output the file
                $f = fopen($fullPath, 'rb'); // Open the file in binary mode
                $chunkSize = 8192; // The size of each chunk to output

                // Seek to the requested start range
                fseek($f, $ranges[0]);

                // Start outputting the data
                while(true){
                    // Check if we have outputted all the data requested
                    if(ftell($f) >= $ranges[1]){
                        break;
                    }

                    // Output the data
                    echo fread($f, $chunkSize);

                    // Flush the buffer immediately
                    @ob_flush();
                    flush();
                }
            }else{

                // It's not a range request, output the file anyway
                header('Content-Length: ' . $filesize);

                // Read the file
                @readfile($filesize);

                // and flush the buffer
                @ob_flush();
                flush();



            }

        }else {

            return new Response('Invalid Path', 404);
        }
    }


    


    I have notice in chrome that it's sending the range header like this :

    


    Range : bytes=611609-

    


    Where safari sends

    


    Range : bytes=611609-61160

    


    So for some reason chrome is missing the second range amount, that obviously means my code can't find a range number for the second one.

    


    Doesn’t matter what I do I can’t get it working in both chrome and safari. Safari wants the byte range part , chrome seems to request it then sends a new request for the full file but even the full file part of the code gives a 500 error. If I take out the byte range bit then it works fine in chrome but not safari.

    


    UPDATE :

    


    Here is some strange things going on in chrome :

    


    For the video i am testing with it makes 3 range requests :

    


    REQUEST 1 HEADERS - asking for bytes 0- (to the end of the file)

    


    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1

Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Accept-Encoding: identity;q=1, *;q=0
Accept: */*
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: video
Referer: https://gofollow.vip/
Accept-Language: en-US,en;q=0.9
Range: bytes=0-


    


    RESPONSE GIVES IT BACK ALL THE BYTES IN THE FILE AS THAT'S WHAT WAS ASKED FOR BY CHROME :

    


    HTTP/1.1 206 Partial Content
Date: Wed, 10 Mar 2021 12:35:54 GMT
Server: Apache
Accept-Ranges: bytes
Content-Length: 611609
Content-Range: bytes 0-611609/611610
Vary: User-Agent
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: video/mp4


    


    SECOND REQUEST HEADERS : NOW IT'S ASKING FOR 589824 to the end of the file :

    


    Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Accept-Encoding: identity;q=1, *;q=0
Accept: */*
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: video
Referer: https://gofollow.vip/
Accept-Language: en-US,en;q=0.9
Range: bytes=589824-


    


    RESPONSE OBLIGES :

    


    HTTP/1.1 206 Partial Content
Date: Wed, 10 Mar 2021 12:35:55 GMT
Server: Apache
Accept-Ranges: bytes
Content-Length: 21785
Content-Range: bytes 589824-611609/611610
Vary: User-Agent
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: video/mp4


    


    THEN IT'S MAKING THIS 3rd REQUEST THAT GIVES AN INTERNAL SERVER ERORR, THIS TIME IT'S LITERALLY ASKING FOR THE LAST BYTE :

    


    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1

Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Accept-Encoding: identity;q=1, *;q=0
Accept: */*
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: video
Referer: https://gofollow.vip/
Accept-Language: en-US,en;q=0.9
Range: bytes=611609-


    


    RESPONSE - THE CONTENT LENGTH IS 0 BECAUSE THERE IS NO DIFFERENCE BETWEEN THE REQUESTED BYTES AND THE BYTES RETURNED :

    


    HTTP/1.1 500 Internal Server Error
Date: Wed, 10 Mar 2021 12:35:56 GMT
Server: Apache
Accept-Ranges: bytes
Cache-Control: max-age=0, must-revalidate, private
X-Frame-Options: DENY
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Referrer-Policy: origin
Strict-Transport-Security: max-age=31536000; includeSubDomains
Expires: Wed, 10 Mar 2021 12:35:56 GMT
Content-Length: 0
Content-Range: bytes 611609-611609/611610
Vary: User-Agent
Connection: close
Content-Type: text/html; charset=UTF-8


    


  • Decoding Video using FFMpeg for android

    29 novembre 2014, par Rahul Upadhyay

    I tried to decode video using FFMpeg library from the sample examples available on internet, i figure it out with new version of ffmpeg,
    here is the code which I called from my class file,

      private static native int decodeVideo(String filename);
      decodeVideo(getString(R.string._sdcard_abc_3gp));

    now in .c file located in JNI dir,I wrote this code,

    jint Java_ru_dzakhov_ffmpeg_test_MainActivity_decodeVideo(JNIEnv* env, jobject
    javaThis,jstring filename) {  
     AVFormatContext *pFormatCtx;
     int             i, videoStream;
     AVCodecContext  *pCodecCtx;
     AVCodec         *pCodec;
     AVFrame         *pFrame;
     AVFrame         *pFrameRGB;
     AVPacket        packet;
     int             frameFinished;
     int             numBytes;
     uint8_t         *buffer;

     // Register all formats and codecs
     av_register_all();

     // Open video file

         const jbyte *str;
         str = (*env)->GetStringUTFChars(env, filename, NULL);

         if(av_open_input_file(&pFormatCtx, str, NULL, 0, NULL)!=0)
         {
             LOGI("Can't open file '%s'\n", str);
             return 1;
         }
         else
         {
             LOGI("File is opened\n");
             LOGI("File '%s', Codec %s",pFormatCtx->filename,pFormatCtx->iformat->name);
         }


     // Dump information about file onto standard error

     LOGI("dump_format");
     dump_format(pFormatCtx, 0, filename, 0);
     LOGI("dump_format DONE");
     // Find the first video stream
     videoStream=-1;
     for(i=0; inb_streams; i++)
       if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO)
         //if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)
         {
             LOGI("videoStream:: %d",videoStream);
         videoStream=i;
         break;
       }
     if(videoStream==-1)
       return -1; // Didn't find a video stream

     // Get a pointer to the codec context for the video stream
     pCodecCtx=pFormatCtx->streams[videoStream]->codec;

     // Find the decoder for the video stream
     pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
     if(pCodec==NULL) {
       fprintf(stderr, "Unsupported codec!\n");
       LOGI("Unsupported codec!\n");
       return -1; // Codec not found
     }
     // Open codec
     if(avcodec_open(pCodecCtx, pCodec)<0){
         LOGI("Codec Opened!\n");
       return -1; // Could not open codec
     }
     // Allocate video frame
     pFrame=avcodec_alloc_frame();

     // Allocate an AVFrame structure
     pFrameRGB=avcodec_alloc_frame();
     if(pFrameRGB==NULL){

         LOGI("checking --->>> pFrameRGB==NULL\n");
       return -1;
     }
     // Determine required buffer size and allocate buffer

     LOGI("Determine required buffer size and allocate buffer\n");
     numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
                                 pCodecCtx->height);

     LOGI("numBytes %d",numBytes);

     buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));

     // Assign appropriate parts of buffer to image planes in pFrameRGB
     // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
     // of AVPicture
     avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
                    pCodecCtx->width, pCodecCtx->height);

     // Read frames and save first five frames to disk
     i=0;
     while(av_read_frame(pFormatCtx, &packet)>=0) {
       // Is this a packet from the video stream?
       if(packet.stream_index==videoStream) {
         // Decode video frame
           avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished,&packet);
                              //packet.data, packet.size);

         // Did we get a video frame?
         if(frameFinished) {
           // Convert the image from its native format to RGB
           /*Temporarily down
            *
            * img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24,
                       (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx->width,pCodecCtx->height);*/

           // Save the frame to phone memory
             LOGI("Saving Frame\n");
            SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, ++i);
            LOGI("After Saving Frame\n");
         }
       }

       // Free the packet that was allocated by av_read_frame
       av_free_packet(&packet);
     }

     // Free the RGB image
     av_free(buffer);
     av_free(pFrameRGB);

     // Free the YUV frame
     av_free(pFrame);

     // Close the codec
     avcodec_close(pCodecCtx);

     // Close the video file
     av_close_input_file(pFormatCtx);

     return 0;
    }

    after compiling the code i get this in log,

    07-04 10:58:38.961: D/dalvikvm(1010): Trying to load lib /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so 0x4051e878
    07-04 10:58:38.971: D/dalvikvm(1010): Added shared lib /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so 0x4051e878
    07-04 10:58:38.971: D/dalvikvm(1010): No JNI_OnLoad found in /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so 0x4051e878, skipping init
    07-04 10:58:39.011: I/System.out(1010): Creating Engine
    07-04 10:58:39.011: I/mylib(1010): initiated
    07-04 10:58:39.011: I/System.out(1010): Decoding Video
    07-04 10:58:39.011: I/System.out(1010): passing video::/sdcard/NativeMedia.ts
    07-04 10:58:39.101: W/dalvikvm(231): disableGcForExternalAlloc: false
    07-04 10:58:39.121: I/DEBUG(71): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    07-04 10:58:39.121: I/DEBUG(71): Build fingerprint: 'htc_asia_india/htc_icong/icong:2.3.3/GRI40/68450.5:user/release-keys'
    07-04 10:58:39.121: I/DEBUG(71): pid: 1010, tid: 1010  >>> ru.dzakhov.ffmpeg.test <<<
    07-04 10:58:39.121: I/DEBUG(71): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 8102de90
    07-04 10:58:39.121: I/DEBUG(71):  r0 0000ac28  r1 40521b98  r2 40526340  r3 42157cc8
    07-04 10:58:39.121: I/DEBUG(71):  r4 bee7d368  r5 00000004  r6 40521b98  r7 42157c88
    07-04 10:58:39.121: I/DEBUG(71):  r8 bee7d348  r9 42157c80  10 42157c6c  fp 42f0f04c
    07-04 10:58:39.121: I/DEBUG(71):  ip 8102de91  sp bee7d348  lr 80018378  pc 8102de90  cpsr a0000030
    07-04 10:58:39.121: I/DEBUG(71):  d0  4140000041600000  d1  3ff0000041680000
    07-04 10:58:39.121: I/DEBUG(71):  d2  bf80000000000000  d3  0000000000000000
    07-04 10:58:39.121: I/DEBUG(71):  d4  0000000000000000  d5  3ff000003f800000
    07-04 10:58:39.121: I/DEBUG(71):  d6  bff000003f800000  d7  4160000000000000
    07-04 10:58:39.121: I/DEBUG(71):  d8  0000000000000000  d9  0000000000000000
    07-04 10:58:39.121: I/DEBUG(71):  d10 0000000000000000  d11 0000000000000000
    07-04 10:58:39.121: I/DEBUG(71):  d12 0000000000000000  d13 0000000000000000
    07-04 10:58:39.121: I/DEBUG(71):  d14 0000000000000000  d15 0000000000000000
    07-04 10:58:39.121: I/DEBUG(71):  scr 20000012
    07-04 10:58:39.221: I/DEBUG(71):          #00  pc 0002de90  /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so
    07-04 10:58:39.221: I/DEBUG(71):          #01  pc 0004f13c  /system/lib/libdvm.so
    07-04 10:58:39.221: I/DEBUG(71):          #02  pc 0001d584  /system/lib/libdvm.so
    07-04 10:58:39.221: I/DEBUG(71):          #03  pc 00022b8c  /system/lib/libdvm.so
    07-04 10:58:39.221: I/DEBUG(71):          #04  pc 00021a80  /system/lib/libdvm.so
    07-04 10:58:39.221: I/DEBUG(71):          #05  pc 0006060a  /system/lib/libdvm.so
    07-04 10:58:39.221: I/DEBUG(71):          #06  pc 0006828e  /system/lib/libdvm.so
    07-04 10:58:39.221: I/DEBUG(71):          #07  pc 0001d584  /system/lib/libdvm.so
    07-04 10:58:39.221: I/DEBUG(71):          #08  pc 00022b8c  /system/lib/libdvm.so
    07-04 10:58:39.231: I/DEBUG(71):          #09  pc 00021a80  /system/lib/libdvm.so
    07-04 10:58:39.231: I/DEBUG(71):          #10  pc 0006045c  /system/lib/libdvm.so
    07-04 10:58:39.231: I/DEBUG(71):          #11  pc 0004c430  /system/lib/libdvm.so
    07-04 10:58:39.231: I/DEBUG(71):          #12  pc 00037638  /system/lib/libandroid_runtime.so
    07-04 10:58:39.231: I/DEBUG(71):          #13  pc 00038456  /system/lib/libandroid_runtime.so
    07-04 10:58:39.231: I/DEBUG(71):          #14  pc 00008ca2  /system/bin/app_process
    07-04 10:58:39.231: I/DEBUG(71):          #15  pc 00014f24  /system/lib/libc.so
    07-04 10:58:39.231: I/DEBUG(71): code around pc:
    07-04 10:58:39.231: I/DEBUG(71): 8102de70 003d9cd0 00000408 0029e598 0029e5de
    07-04 10:58:39.231: I/DEBUG(71): 8102de80 0029e5d8 0029e5d8 0029e5cc 0029e5c8
    07-04 10:58:39.231: I/DEBUG(71): 8102de90 4ff0e92d b0994604 f0004615 6823f945
    07-04 10:58:39.231: I/DEBUG(71): 8102dea0 46294620 32a4f8d3 47982200 46044f81
    07-04 10:58:39.231: I/DEBUG(71): 8102deb0 a8172300 22004621 9300447f f9c0f060
    07-04 10:58:39.231: I/DEBUG(71): code around lr:
    07-04 10:58:39.231: I/DEBUG(71): 80018358 3497c004 3488c004 3afffff9 e2888004
    07-04 10:58:39.231: I/DEBUG(71): 80018368 eafffff9 e899000c e594c008 e12fff3c
    07-04 10:58:39.231: I/DEBUG(71): 80018378 e3550000 1594c00c 188c0003 e914a3f0
    07-04 10:58:39.231: I/DEBUG(71): 80018388 e1a05e22 e5946004 e3a02000 e4d6c001
    07-04 10:58:39.231: I/DEBUG(71): 80018398 e35c0000 0a000007 e2822001 e35c0044
    07-04 10:58:39.231: I/DEBUG(71): stack:
    07-04 10:58:39.231: I/DEBUG(71):     bee7d308  000001b4  
    07-04 10:58:39.231: I/DEBUG(71):     bee7d30c  c0000000  
    07-04 10:58:39.231: I/DEBUG(71):     bee7d310  80018540  /system/lib/libdvm.so
    07-04 10:58:39.231: I/DEBUG(71):     bee7d314  0000cf98  
    07-04 10:58:39.231: I/DEBUG(71):     bee7d318  42157c6c  
    07-04 10:58:39.231: I/DEBUG(71):     bee7d31c  afd139d9  /system/lib/libc.so
    07-04 10:58:39.231: I/DEBUG(71):     bee7d320  0002de91  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d324  0000000e  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d328  80018540  /system/lib/libdvm.so
    07-04 10:58:39.241: I/DEBUG(71):     bee7d32c  00000070  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d330  42157c6c  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d334  00238100  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d338  00000000  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d33c  00000000  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d340  df002777  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d344  e3a070ad  
    07-04 10:58:39.241: I/DEBUG(71): #00 bee7d348  423692b4  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d34c  0000cf98  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d350  40521b98  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d354  8102de91  /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so
    07-04 10:58:39.241: I/DEBUG(71):     bee7d358  80018540  /system/lib/libdvm.so
    07-04 10:58:39.241: I/DEBUG(71):     bee7d35c  0000cf98  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d360  bee7d368  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d364  800499df  /system/lib/libdvm.so
    07-04 10:58:39.241: I/DEBUG(71):     bee7d368  42157c80  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d36c  42d58795  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d370  8102de91  /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so
    07-04 10:58:39.241: I/DEBUG(71):     bee7d374  bee7d418  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d378  00016de0  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d37c  0000ac28  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d380  00000001  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d384  bee7d418  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d388  42157c80  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d38c  40521b98  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d390  423692b4  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d394  800499a1  /system/lib/libdvm.so
    07-04 10:58:39.241: I/DEBUG(71):     bee7d398  42157c80  
    07-04 10:58:39.241: I/DEBUG(71):     bee7d39c  8004f13f  /system/lib/libdvm.so
    07-04 10:58:39.241: I/DEBUG(71): #01 bee7d3a0  00000002  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3a4  0000000e  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3a8  bee7d418  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3ac  0000cf98  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3b0  400198b8  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3b4  42d5861c  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3b8  42157c98  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3bc  bee7d410  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3c0  40521b98  
    07-04 10:58:39.251: I/DEBUG(71):     bee7d3c4  8001d588  /system/lib/libdvm.so

    Unable to understand what’s exact problem is there ?
    Here SaveFrame function is used it looks like,

    void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame) {
     FILE *pFile;
     char szFilename[32];
     int  y;

     // Open file
     LOGI("Opening file!");
     sprintf(szFilename, "frame%d.ppm", iFrame);

     pFile=fopen(szFilename, "wb");
     if(pFile==NULL)
       return;

     // Write header
     fprintf(pFile, "P6\n%d %d\n255\n", width, height);
     //LOGI("width::"+width+"Height::"+height);
     // Write pixel data
     for(y=0; ydata[0]+y*pFrame->linesize[0], 1, width*3, pFile);
     }
     // Close file
     fclose(pFile);
    }

    in log I didn’t get any Log which i placed in the code !

    Please help me out,

    Thanks

  • Revision 37300 : On documente cet inclure On lui ajoute une option et on corrige certaines ...

    15 avril 2010, par kent1@… — Log

    On documente cet inclure
    On lui ajoute une option et on corrige certaines erreurs