Recherche avancée

Médias (91)

Autres articles (24)

  • 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

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (9067)

  • Android FFmpeg - Mux encoded h264 frames from MediaCodec

    27 janvier 2019, par Bob Ross

    I’m trying to capture h264 frames from Android camera (encoded by MediaCodec) and pass them to an FFmpeg process running on the same device.

    I currently do it by writing the encoded byte arrays I receive from the MediaCodec to a file called out.h264.

    Like so :

       FileOutputStream fosVideo = new ...

       ...

       // encoder callback
       @Override
       public void onVideoData(ByteBuffer h264Buffer, MediaCodec.BufferInfo info) {
           fosVideo.write(h264Buffer);
       }

    While the h264 file is being written to is I start the FFmpeg process and provide the h264 file as input.

    ffmpeg -re -i out.h264 -c:v copy -r 30 -loglevel 48 a.mp4

    I also tried

    ffmpeg -re -framerate 25 -i out.h264 -c:v copy -r 30 -loglevel 48 a.mp4

    The FFmpeg process runs anywhere between 10 seconds to a few minutes and then stops abruptly with :

    frame=  330 fps= 29 q=31.0 size=     512kB time=00:00:10.98 bitrate= 381.8kbits/s dup=55 drop=0 speed=0.972x    
    [h264 @ 0xf1863800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    [h264 @ 0xf1863b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    [h264 @ 0xf1863f00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    *** 1 dup!
    [h264 @ 0xf1864280] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    Clipping frame in rate conversion by 0.199989
    [h264 @ 0xf1864600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    [h264 @ 0xf1862a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    [h264 @ 0xf1862d80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    [h264 @ 0xf1863100] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    *** 1 dup!
    Clipping frame in rate conversion by 0.199989
    *** 1 dup!
    frame=  347 fps= 29 q=31.0 size=     768kB time=00:00:11.53 bitrate= 545.5kbits/s dup=58 drop=0 speed=0.974x    
    Clipping frame in rate conversion by 0.199989
    [out_0_0 @ 0xf182e1e0] EOF on sink link out_0_0:default.
    No more output streams to write to, finishing.
    frame=  349 fps= 29 q=24.8 Lsize=     920kB time=00:00:17.68 bitrate= 426.1kbits/s dup=58 drop=0 speed=1.48x    
    video:631kB audio:282kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.732886%
    Input file #0 (/storage/emulated/0/MOVIES/out.h264):
    Input stream #0:0 (video): 291 packets read (6065016 bytes); 291 frames decoded;
    Total: 291 packets (6065016 bytes) demuxed
    Input file #1 (/storage/emulated/0/MOVIES/out.aac):
    Input stream #1:0 (audio): 830 packets read (289119 bytes);
    Total: 830 packets (289119 bytes) demuxed
    Output file #0 (/storage/emulated/0/hls/a.mp4):
    Output stream #0:0 (video): 349 frames encoded; 349 packets muxed (645952 bytes);
    Output stream #0:1 (audio): 830 packets muxed (289119 bytes);
    Total: 1179 packets (935071 bytes) muxed
    291 frames successfully decoded, 0 decoding errors

    Even though the out.h264 file is still being recorded into.
    It is as if the ffmpeg process thinks that the file has ended.

    Any idea what could it be ?

  • 2 GB Should Be Enough For Me

    31 août 2010, par Multimedia Mike — General

    My new EeePC 1201PN netbook has 2 GB of RAM. Call me shortsighted but I feel like “that ought to be enough for me”. I’m not trying to claim that it ought to be enough for everyone. I am, however, questioning the utility of swap space for those skilled in the art of computing.



    Technology marches on : This ancient 128 MB RAM module is larger than my digital camera’s battery charger… and I just realized that comparison doesn’t make any sense

    Does anyone else have this issue ? It has gotten to the point where I deliberately disable swap partitions on Linux desktops I’m using ('swapoff -a'), and try not to allocate a swap partition during install time. I’m encountering Linux installers that seem to be making it tougher to do this, essentially pleading with you to create a swap partition– “Seriously, you might need 8 total gigabytes of virtual memory one day.” I’m of the opinion that if 2 GB of physical memory isn’t enough for my normal operation, I might need to re-examine my processes.

    In the course of my normal computer usage (which is definitely not normal by the standard of a normal computer user), swap space is just another way for the software to screw things up behind the scenes. In this case, the mistake is performance-related as the software makes poor decisions about what needs to be kept in RAM.

    And then there are the netbook-oriented Linux distributions that insisted upon setting aside as swap 1/2 gigabyte of the already constrained 4 gigabytes of my Eee PC 701′s on-board flash memory, never offering the choice to opt out of swap space during installation. Earmarking flash memory for swap space is generally regarded as exceptionally poor form. To be fair, I don’t know that SSD has been all that prevalent in netbooks since the very earliest units in the netbook epoch.

    Am I alone in this ? Does anyone else prefer to keep all of their memory physical in this day and age ?

  • ffmpeg cannot find stream but stream does exist

    10 avril 2023, par rayen saidani

    ima using ffmpeg to add text to the video the problem is this command works some times and some times it just dont feel like working

    


    this the error that iam getting
Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_subtitles_0

    


    this the command iam trying to run to add text to the video the srt file is always there when i run the commmand i tryed to run :
ffmpeg -i  ./vid/${id}.3.mp4   -lavfi "subtitles=${id}.srt:force_style='Alignment=0,OutlineColor=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=18,MarginL=100,Marginv=100'"  -c:1 copy ./ready/${id}.4.mp4

    


    this the function :

    


    const addtext=async(id)=>{
  
  return new Promise(async(resolve,reject)=>{
    const command1 =await `ffmpeg -i  ./vid/${id}.3.mp4   -lavfi "subtitles=${id}.srt:force_style='Alignment=0,OutlineColor=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=18,MarginL=100,Marginv=100'"  -c:1 copy ./ready/${id}.4.mp4 `;
    await exec(command1, (error, stdout, stderr) => {
    if (error) {
        reject(`stderr: ${error.message}`)
    }
    resolve(id)
  })
 })  
}


    


    this the error that iam getting
Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_subtitles_0

    


    this the command iam trying to run to add text to the video the srt file is always there when i run the commmand i tryed to run :
ffmpeg -i  ./vid/${id}.3.mp4   -lavfi "subtitles=${id}.srt:force_style='Alignment=0,OutlineColor=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=18,MarginL=100,Marginv=100'"  -c:1 copy ./ready/${id}.4.mp4