Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

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

Autres articles (51)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • 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 (11295)

  • Encoding raw YUV420P to h264 with AVCodec on iOS

    4 janvier 2013, par Wade

    I am trying to encode a single YUV420P image gathered from a CMSampleBuffer to an AVPacket so that I can send h264 video over the network with RTMP.

    The posted code example seems to work as avcodec_encode_video2 returns 0 (Success) however got_output is also 0 (AVPacket is empty).

    Does anyone have any experience with encoding video on iOS devices that might know what I am doing wrong ?

    - (void) captureOutput:(AVCaptureOutput *)captureOutput
    didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
           fromConnection:(AVCaptureConnection *)connection {

     // sampleBuffer now contains an individual frame of raw video frames
     CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);

     CVPixelBufferLockBaseAddress(pixelBuffer, 0);

     // access the data
     int width = CVPixelBufferGetWidth(pixelBuffer);
     int height = CVPixelBufferGetHeight(pixelBuffer);
     int bytesPerRow = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0);
     unsigned char *rawPixelBase = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0);


     // Convert the raw pixel base to h.264 format
     AVCodec *codec = 0;
     AVCodecContext *context = 0;
     AVFrame *frame = 0;
     AVPacket packet;

     //avcodec_init();
     avcodec_register_all();
     codec = avcodec_find_encoder(AV_CODEC_ID_H264);

     if (codec == 0) {
       NSLog(@"Codec not found!!");
       return;
     }

     context = avcodec_alloc_context3(codec);

     if (!context) {
       NSLog(@"Context no bueno.");
       return;
     }

     // Bit rate
     context->bit_rate = 400000; // HARD CODE
     context->bit_rate_tolerance = 10;
     // Resolution
     context->width = width;
     context->height = height;
     // Frames Per Second
     context->time_base = (AVRational) {1,25};
     context->gop_size = 1;
     //context->max_b_frames = 1;
     context->pix_fmt = PIX_FMT_YUV420P;

     // Open the codec
     if (avcodec_open2(context, codec, 0) < 0) {
       NSLog(@"Unable to open codec");
       return;
     }


     // Create the frame
     frame = avcodec_alloc_frame();
     if (!frame) {
       NSLog(@"Unable to alloc frame");
       return;
     }
     frame->format = context->pix_fmt;
     frame->width = context->width;
     frame->height = context->height;


     avpicture_fill((AVPicture *) frame, rawPixelBase, context->pix_fmt, frame->width, frame->height);

     int got_output = 0;
     av_init_packet(&packet);
     avcodec_encode_video2(context, &packet, frame, &got_output)

     // Unlock the pixel data
     CVPixelBufferUnlockBaseAddress(pixelBuffer, 0);
     // Send the data over the network
     [self uploadData:[NSData dataWithBytes:packet.data length:packet.size] toRTMP:self.rtmp_OutVideoStream];
    }

    Note : It is known that this code has memory leaks because I am not freeing the memory that is dynamically allocated.

    UPDATE

    I updated my code to use @pogorskiy method. I only try to upload the frame if got output returns 1 and clear the buffer once I am done encoding video frames.

  • rtpdec : Don’t pass non-const pointers to fmtp attribute parsing functions

    24 février 2015, par Martin Storsjö
    rtpdec : Don’t pass non-const pointers to fmtp attribute parsing functions
    

    This makes it clear that the individual parsing functions can’t
    touch the parsed out value.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavformat/rtpdec.c
    • [DH] libavformat/rtpdec.h
    • [DH] libavformat/rtpdec_amr.c
    • [DH] libavformat/rtpdec_dv.c
    • [DH] libavformat/rtpdec_h264.c
    • [DH] libavformat/rtpdec_hevc.c
    • [DH] libavformat/rtpdec_ilbc.c
    • [DH] libavformat/rtpdec_latm.c
    • [DH] libavformat/rtpdec_mpeg4.c
    • [DH] libavformat/rtpdec_xiph.c
  • Error decoding stream invalid data found

    10 avril 2018, par bluemoon odd

    I have a software that first extract a video to jpg photo
    than we can insert any text or image auto in all jpg files
    extracted before than i try to rebuild the video with that images but
    its seems my frames extracted after to insert the text on it and re save the each file again with string option so i will have the output 0 , 1, 2 , 3 , etc.
    But wen i try to rebuild the video its look like the photo are not well encoded, how can i solve this error
    And Here is the image of the ffmpeg error
    ffmpeg error
    this is the code i use to rebuild the video with ffmpeg

    Public Class Form3
    Dim frame As Long 'individual frames
    Dim tempdir As String = "C:\mediapubisert\" ' images temp directory

    Private Sub SaveFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles SaveFileDialog1.FileOk
       Dim args As String 'declare args
       args = "-r 1/.1 -i " &amp; tempdir &amp; "\%01d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p " &amp; Chr(34) &amp; SaveFileDialog1.FileName &amp; Chr(34) 'set ffmpeg arguments
       Dim proc As New Process
       Dim proci As New ProcessStartInfo
       proci.FileName = My.Application.Info.DirectoryPath &amp; "\ffmpeg.exe"
       proci.Arguments = args
       proci.WindowStyle = ProcessWindowStyle.Hidden
       proci.CreateNoWindow = True
       proci.UseShellExecute = False
       proc.StartInfo = proci
       proc.Start()
       Do Until proc.HasExited = True
           Me.Text = "Saving"
       Loop
       Me.Text = "Media Pub Insert"

       MsgBox("Done")

       'IO.Directory.Delete(tempdir, True)
    End Sub

    Private Sub renameFilesInFolder()
       Dim sourcePath As String = "C:\mediapubisert\"
       Dim searchPattern As String = "*.jpg"
       Dim i As Integer = 0
       For Each fileName As String In Directory.GetFiles(sourcePath, searchPattern, SearchOption.AllDirectories)
           File.Move(Path.Combine(sourcePath, fileName), Path.Combine(sourcePath, "" &amp; i &amp; ".JPG"))
           i += 1
       Next
    End Sub

    Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       If (Not System.IO.Directory.Exists(tempdir)) Then
           System.IO.Directory.CreateDirectory(tempdir)
       End If
       renameFilesInFolder()
    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       SaveFileDialog1.ShowDialog()
    End Sub


    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
       renameFilesInFolder()
    End Sub

    End Class