Recherche avancée

Médias (0)

Mot : - Tags -/images

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (60)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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

Sur d’autres sites (7431)

  • Ffmpeg video output is 0 seconds with correct filesize when uploading to google cloud bucket

    22 août 2022, par Turgut

    I've made a C++ program that lives in gke and takes some videos as input using ffmpeg, then does something with that input using opengl(not relevant), then finally encodes those edited videos as a single output. Normally the program works perfectly fine on my local machine, it encodes just as I want it to with no warnings or valgrind errors whatsoever. Then, after encoding the said video, I want my program to upload that video to the google cloud storage. This is where the problem comes, I have tried 2 methods for this : First, I tried using curl to upload to the cloud using a signed url. Second, I tried mounting the google storage using gcsfuse(I was already mounting the bucket to access the inputs in question). Both of those methods yielded undefined, weird behaviour's ranging from : Outputing a 0byte or 44byte file, (This is the most common one :) encoding in the correct file size 500mb but the video is 0 seconds long, outputing a 0.4 second video or just encoding the desired output normally (really rare).

    


    From the logs I can't see anything unusual, everything seems to work fine and ffmpeg does not give any errors or warnings, so does valgrind. Everything seems to work normally, even when I use curl to upload the video to the cloud the output is perfectly fine when it first encodes it (before sending it with curl) but the video gets messed up when curl uploads it to the cloud.

    


    I'm using the muxing.c example of ffmpeg to encode my video with the only difference being :

    


    void video_encoder::fill_yuv_image(AVFrame *frame, struct SwsContext *sws_context) {
    const int in_linesize[1] = { 4 * width };
    //uint8_t* dest[4] = { rgb_data, NULL, NULL, NULL };
    sws_context = sws_getContext(
            width, height, AV_PIX_FMT_RGBA,
            width, height, AV_PIX_FMT_YUV420P,
            SWS_BICUBIC, 0, 0, 0);

    sws_scale(sws_context, (const uint8_t * const *)&rgb_data, in_linesize, 0,
            height, frame->data, frame->linesize);
}


    


    rgb_data is the data I got after editing the inputs. Again, this works fine and I don't think there are any errors here.

    


    I'm not sure where the error is and since the code is huge I can't provide a replicable example. I'm just looking for someone to point me to the right direction.

    


    Running the cloud's output in mplayer wields this result (This is when the video is the right size but is 0 seconds long, the most common one.) :

    


    MPlayer 1.4 (Debian), built with gcc-11 (C) 2000-2019 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /media/c36c2633-d4ee-4d37-825f-88ae54b86100.
libavformat version 58.76.100 (external)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f2cba1168e0]moov atom not found
LAVF_header: av_open_input_stream() failed
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f2cba1168e0]moov atom not found
LAVF_header: av_open_input_stream() failed
RAWDV file format detected.
VIDEO:  [DVSD]  720x480  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
X11 error: BadMatch (invalid parameter attributes)
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.134.100 (external)
[dvvideo @ 0x7f2cb987a380]Requested frame threading with a custom get_buffer2() implementation which is not marked as thread safe. This is not supported anymore, make your callback thread-safe.
Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV)
==========================================================================
Load subtitles in /media/
==========================================================================
Opening audio decoder: [libdv] Raw DV Audio Decoder
Unknown/missing audio format -> no sound
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[dvaudio @ 0x7f2cb987a380]Decoder requires channel count but channels not set
Could not open codec.
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x56444152.
Audio: no sound
Starting playback...
[dvvideo @ 0x7f2cb987a380]could not find dv frame profile
Error while decoding frame!
[dvvideo @ 0x7f2cb987a380]could not find dv frame profile
Error while decoding frame!
V:   0.0   2/  2 ??% ??% ??,?% 0 0 


Exiting... (End of file)




    


    Edit : Since the code runs on a VM, I'm using xvfb-run ro start my application, but again even when using xvfb-run it works completely fine on when not encoding to the cloud.

    


  • ERROR : "Cannot Find FFMPEG" on Google Cloud Compute Engine Debian Wheezy 7.8 Managed Instance even though it's installed

    4 octobre 2015, par DynamoBooster

    I wrote a Node.JS application that uses the fluent-ffmpeg module to watermark videos uploaded on the platform. I pushed the code to a my Google Cloud Compute Engine project, and every time I get Error : Cannot Find FFMPEG. I ssh’d into the instance once it was created and ran these commands to install FFMPEG before actually testing out the code. I am not sure what is causing the error because after this I am positive that FFMPEG is installed.

    sudo apt-get update
    sudo apt-get install -y ffmpeg
    export FFMPEG_PATH="/usr/bin/ffmpeg"
    export FFPROBE_PATH="/usr/bin/ffprobe"

    Below is my FFMPEG code

    function generate_thumbnail(name, path){
     logging.info("Generating Thumbnail");
     ffmpeg(path)
      .setFfmpegPath('/usr/bin/ffmpeg')
      .setFfprobePath('/usr/bin/ffprobe')
      .on('end', function() {
           upload_thumbnail(name);
           logging.info("Thumbnail Generated and uploaded");
           return;
       })
     .on('error', function(err, stdout, stderr) {
           logging.info('ERROR: ' + err.message);
           logging.info('STDERR:' + stderr);
     })
     .on('start', function(commandLine) {
          logging.info(commandLine);
     })
     .screenshots({
       count: 1,
       filename: name + '_thumbnail.png',
       folder: 'public/images/thumbnails/'
     });
    }
  • ERROR : "Cannot Find FFMPEG" on Google Cloud Compute Engine Debian Wheezy 7.8 Managed Instance even though it's installed

    17 mai 2021, par DynamoBooster

    I wrote a Node.JS application that uses the fluent-ffmpeg module to watermark videos uploaded on the platform. I pushed the code to a my Google Cloud Compute Engine project, and every time I get Error : Cannot Find FFMPEG. I ssh'd into the instance once it was created and ran these commands to install FFMPEG before actually testing out the code. I am not sure what is causing the error because after this I am positive that FFMPEG is installed.

    



    sudo apt-get update
sudo apt-get install -y ffmpeg
export FFMPEG_PATH="/usr/bin/ffmpeg"
export FFPROBE_PATH="/usr/bin/ffprobe"


    



    Below is my FFMPEG code

    



    function generate_thumbnail(name, path){
  logging.info("Generating Thumbnail");
  ffmpeg(path)
   .setFfmpegPath('/usr/bin/ffmpeg') 
   .setFfprobePath('/usr/bin/ffprobe')
   .on('end', function() {
        upload_thumbnail(name);
        logging.info("Thumbnail Generated and uploaded");
        return;
    })
  .on('error', function(err, stdout, stderr) {
        logging.info('ERROR: ' + err.message);
        logging.info('STDERR:' + stderr);
  })
  .on('start', function(commandLine) {
       logging.info(commandLine);
  })
  .screenshots({
    count: 1,
    filename: name + '_thumbnail.png',
    folder: 'public/images/thumbnails/'
  });
}