Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (94)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

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

Sur d’autres sites (7240)

  • javacv FFMPEG decode memory leak ?

    25 mars 2015, par Liquan Nie

    I’m new to JAVACV and I am using FFMPEG to play some video file as follows
    My enviroument is windows 8 with jdk7 and javacv0.10.

               String file_path ="D:\\1.mp4";
                   
                    // regist all format and codec
                    avformat.av_register_all();
                    avcodec.avcodec_register_all();
                   
                    // open file
                    avformat.AVFormatContext avFormatCtx = avformat.avformat_alloc_context();
                    if (avformat.avformat_open_input(avFormatCtx, file_path, null, null) != 0)
                    {
                            System.out.println("cann't open file\r\n");
                            return;
                    }
                    // find stream info
                    if (avformat.avformat_find_stream_info(avFormatCtx, (AVDictionary)null) < 0)
                    {
                            System.out.println("can't find stream info\r\n");
                            return;
                    }

                    int videoIndex = -1;
                    for(int i=0; i< avFormatCtx.nb_streams();i++)
                    {
                            if(avFormatCtx.streams(i).codec().codec_type() == avutil.AVMEDIA_TYPE_VIDEO)
                            {
                                    videoIndex = i;
                            }
                    }
                    // determ codec
                    avcodec.AVCodecContext avCodecCtx = avFormatCtx.streams(videoIndex).codec();
                    avcodec.AVCodec codec = avcodec.avcodec_find_decoder(avCodecCtx.codec_id());
                    if (codec == null)
                    {
                            System.out.println("codec not found");
                            return;
                    }
                    if(avcodec.avcodec_open2(avCodecCtx, codec, (AVDictionary)null) < 0)
                    {
                            System.out.println("cann't open avcodec\r\n");
                    }
                    avutil.AVFrame frame    = avcodec.avcodec_alloc_frame();
                    avutil.AVFrame frameRGB = avcodec.avcodec_alloc_frame();
                    int numByte = avcodec.avpicture_get_size(avutil.AV_PIX_FMT_RGB24, avCodecCtx.width(), avCodecCtx.height());
                    Pointer outBuffer = avutil.av_malloc(numByte);
                   
                    avcodec.avpicture_fill(new AVPicture(frameRGB), outBuffer.asByteBuffer(), avutil.AV_PIX_FMT_RGB24, avCodecCtx.width(), avCodecCtx.height());
                    avformat.av_dump_format(avFormatCtx, 0, file_path, 0);
                    System.out.println(avFormatCtx.duration());
                    SwsContext img_convert_ctx = swscale.sws_getContext(avCodecCtx.width(), avCodecCtx.height(), avCodecCtx.pix_fmt(), avCodecCtx.width(), avCodecCtx.height(), avutil.AV_PIX_FMT_RGB24, swscale.SWS_BICUBIC, null, null, (double[])null);

                    AVPacket pkt = new AVPacket();
                    int y_size = avCodecCtx.width()*avCodecCtx.height();
                    avcodec.av_new_packet(pkt, y_size);
                    opencv_highgui.cvNamedWindow(WINDOW_NAME);
                   
                    IplImage showImage = opencv_core.cvCreateImage(opencv_core.cvSize(avCodecCtx.width(), avCodecCtx.height()), opencv_core.IPL_DEPTH_8U, 3);
                    // read frames loop
                    int frameNumbers = avformat.av_read_frame(avFormatCtx, pkt);
                System.out.println("frame number is "+frameNumbers);
               
                while (avformat.av_read_frame(avFormatCtx, pkt) >= 0)
                    {
                        //System.out.println(pkt.asByteBuffer());
                            if (pkt.stream_index() == videoIndex)
                            {
                                    IntPointer ip = new IntPointer();
                                    int ret = avcodec.avcodec_decode_video2(avCodecCtx, frame, ip, pkt);
                                    if (ret < 0)
                                    {
                                            System.out.println("codec error\r\n");
                                            return;
                                    }
                                   
                                    if (ip.get()!= 0)
                                    {
                                            swscale.sws_scale(img_convert_ctx, frame.data(), frame.linesize(), 0, avCodecCtx.height(), frameRGB.data(), frameRGB.linesize());
                                            showImage.imageData(frameRGB.data(0));
                                           
                                            showImage.widthStep(frameRGB.linesize().get(0));
                                            opencv_highgui.cvShowImage(WINDOW_NAME, showImage);
                                            opencv_highgui.cvWaitKey(25);
                                    }
                            }
                    }
                   
                    showImage.release();
                    opencv_highgui.cvDestroyWindow(WINDOW_NAME);
                    avutil.av_free(frameRGB);
                    avcodec.avcodec_close(avCodecCtx);
                    avformat.avformat_close_input(avFormatCtx);

    but i run into get this error

    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000767c35ed, pid=11884, tid=3960
    #
    # JRE version: 7.0_13-b20
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode windows-amd64 compressed oops)
    # Problematic frame:
    # C  [avcodec-56.dll+0x4835ed]  avcodec_decode_video2+0xbd
    #
    # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
    #
    # An error report file with more information is saved as:
    # E:\code\android\TestJAVACV\hs_err_pid11884.log
    #
    # If you would like to submit a bug report, please visit:
    #   http://bugreport.sun.com/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\1.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       creation_time   : 1970-01-01 00:00:00
       encoder         : Lavf53.29.100
     Duration: 00:08:30.27, start: 0.000000, bitrate: 160 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 28 kb/s, 15 fps, 15 tbr, 15 tbn, 30 tbc (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : SoundHandler

    and in the log file i found that the enden space heap in jvm has been used 98%. but I don’t know where is the issue, since the document of ffmpeg is not that enough, I feel difficult to know more about how to use it well ,any suggestions ??

    Heap
    PSYoungGen      total 23872K, used 20250K [0x00000000e5600000, 0x00000000e70a0000, 0x0000000100000000)
     eden space 20480K, 98% used [0x00000000e5600000,0x00000000e69c69f8,0x00000000e6a00000)
  • What is the bitrate of my audio file based on ffmpeg output ?

    21 avril 2015, par blueether

    Is it the 40kb/s under Format, or is it the 16kb/s under Stream ? What is the relationship between the Format and the Stream ?
    The below output is for a file generated using Core Audio on an iphone, with an Audio Unit. The output format was specified by an AudioStreamBasicDescription descriptor

    Updated :
    Output from ffprobe -v error -show_format -show_streams 123_1429602551009.051025.m4a :

    [STREAM]
    index=0
    codec_name=aac
    codec_long_name=AAC (Advanced Audio Coding)
    profile=LC
    codec_type=audio
    codec_time_base=1/8000
    codec_tag_string=mp4a
    codec_tag=0x6134706d
    sample_fmt=fltp
    sample_rate=8000
    channels=1
    channel_layout=mono
    bits_per_sample=0
    id=N/A
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/8000
    start_pts=0
    start_time=0.000000
    duration_ts=43008
    duration=5.376000
    bit_rate=16501
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=42
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    TAG:creation_time=1970-04-16 22:36:01
    TAG:language=eng
    [/STREAM]
    [FORMAT]
    filename=123_1429602551009.051025.m4a
    nb_streams=1
    nb_programs=0
    format_name=mov,mp4,m4a,3gp,3g2,mj2
    format_long_name=QuickTime / MOV
    start_time=0.000000
    duration=5.376000
    size=27473
    bit_rate=40882
    probe_score=100
    TAG:major_brand=M4A
    TAG:minor_version=0
    TAG:compatible_brands=M4A mp42isom
    TAG:creation_time=1970-04-16 22:36:01
    TAG:iTunSMPB= 00000000 00000840 00000361 0000000000009C5F 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [/FORMAT]
  • ffmpeg : How can I send a H.265 encoded stream to wowza ?

    24 avril 2015, par Fuzz

    I managed to encode H.265 to an output file like this :

    ffmpeg -i test.m2ts -c:v libx265 -c:a copy output.mp4

    and I managed to stream a H.264 file to wowza like this :

    ffmpeg -re -i sample.mp4 -vcodec libx264 -vprofile default -vprofile baseline -r 24 -g 48 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -f rtsp -muxdelay 0.1 rtsp://username:password@127.0.0.1:1935/ApplicationName/myStream

    But I just cant seem to stream a H.265 to a rtsp stream.

    If I use the libx265 in the command above I get the error :

    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    Any hints would be greatly appreciated.

    Here is the console message with -loglevel verbose

    >ffmpeg -re -i sample.mp4 -vcodec libx265 -vprofile default -vprofile baseline -r 24 -g 48 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -f rtsp -muxdelay 0.1 rtsp://username:password@127.0.0.1:1935/ApplicationName/myStream -l
    oglevel verbose
    ffmpeg version N-69156-gff5b9a1c Copyright (c) 2000-2015 the FFmpeg developers
     built on Jan 20 2015 00:38:00 with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-
    libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
    enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
     libavutil      54. 17.100 / 54. 17.100
     libavcodec     56. 20.100 / 56. 20.100
     libavformat    56. 19.100 / 56. 19.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5.  8.100 /  5.  8.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Routing option strict to both codec and muxer layer
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
     Metadata:
       major_brand     : qt
       minor_version   : 512
       compatible_brands: qt
       creation_time   : 1970-01-01 00:00:00
       encoder         : Lavf52.73.0
     Duration: 00:09:56.46, start: 0.000000, bitrate: 524 kb/s
       Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 424x240 (432x240), 420 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : DataHandler
         encoder         : libx264
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 99 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : DataHandler
    [graph 0 input from stream 0:0 @ 00000000050f6e60] w:424 h:240 pixfmt:yuv420p tb:1/24 fr:24/1 sar:0/1 sws_param:flags=2
    [graph 1 input from stream 0:1 @ 0000000002c38700] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
    [libx265 @ 0000000002c172a0] [Eval @ 000000000022aca0] Undefined constant or missing '(' in 'baseline'
    [libx265 @ 0000000002c172a0] Unable to parse option value "baseline"
    [libx265 @ 0000000002c172a0] Error setting option profile to value baseline.
    Output #0, rtsp, to 'rtsp://username:password@127.0.0.1:1935/ApplicationName/myStream':
     Metadata:
       major_brand     : qt
       minor_version   : 512
       compatible_brands: qt
       encoder         : Lavf52.73.0
       Stream #0:0(eng): Video: hevc, none, q=2-31, 128 kb/s, 24 fps (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : DataHandler
         encoder         : Lavc56.20.100 libx265
       Stream #0:1(eng): Audio: aac, 0 channels, 128 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : DataHandler
         encoder         : Lavc56.20.100 aac
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height