Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (77)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

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

  • What is the proper way to convert mp4-stream to .avi with FFmpeg ?

    17 avril 2016, par Website Newbie

    I was wondering, what is the "proper" way of encoding online mp4-stream to avi.
    I converted couple of streams, but they won’t work on my xbx360, but all other movies in .avi works ; no matter of the resolution, video codec nor audio codec, they just work.

    So what is the proper way to convert a stream to avi ?

    My current code looks like this :

    bin\ffmpeg -i http://nelonenmedia-ondemand02.nelonenmedia.fi/18/online/video/video_episode_115102918.smil/playlist.m3u8 -vf scale=768:-1 -acodec libmp3lame -vcodec libxvid -vtag XVID -threads 0 -f avi -b:v 1000k "Cybertron\S01E01 Transformers Cybertron.avi"
    bin\ffmpeg -i http://nelonenmedia-ondemand02.nelonenmedia.fi/19/online/video/video_episode_115102919.smil/playlist.m3u8 -vf scale=768:-1 -acodec libmp3lame -vcodec libxvid -vtag XVID -threads 0 -f avi -b:v 1000k "Cybertron\S01E02 Transformers Cybertron.avi"
    ect...

    But that does not work on the xbox360. I have tried different resolutions and pretty much everything ; it just doesn’t work.

  • FFMpeg : write h264 stream to mp4 container without changes

    3 mars 2017, par Bumblebee

    Good day.

    For brevity, the code omits error handling and memory management.

    I want to capture h264 video stream and pack it to mp4 container without changes. Since i don’t control the source of stream, i can not make assumptions about stream structure. In this way i must probe input stream.

       AVProbeData probeData;
       probeData.buf_size = s->BodySize();
       probeData.buf = s->GetBody();
       probeData.filename = "";

       AVInputFormat* inFormat = av_probe_input_format(&probeData, 1);  

    This code correctly defines h264 stream.

    Next, i create input format context,

       unsigned char* avio_input_buffer = reinterpret_cast<unsigned> (av_malloc(AVIO_BUFFER_SIZE));

       AVIOContext* avio_input_ctx = avio_alloc_context(avio_input_buffer, AVIO_BUFFER_SIZE,
           0, this, &amp;read_packet, NULL, NULL);

       AVFormatContext* ifmt_ctx = avformat_alloc_context();
       ifmt_ctx->pb = avio_input_ctx;

       int ret = avformat_open_input(&amp;ifmt_ctx, NULL, inFormat, NULL);
    </unsigned>

    set image size,

       ifmt_ctx->streams[0]->codec->width = ifmt_ctx->streams[0]->codec->coded_width = width;
       ifmt_ctx->streams[0]->codec->height = ifmt_ctx->streams[0]->codec->coded_height = height;

    create output format context,

       unsigned char* avio_output_buffer = reinterpret_cast<unsigned>(av_malloc(AVIO_BUFFER_SIZE));

       AVIOContext* avio_output_ctx = avio_alloc_context(avio_output_buffer, AVIO_BUFFER_SIZE,
           1, this, NULL, &amp;write_packet, NULL);

       AVFormatContext* ofmt_ctx = nullptr;
       avformat_alloc_output_context2(&amp;ofmt_ctx, NULL, "mp4", NULL);
       ofmt_ctx->pb = avio_output_ctx;

       AVDictionary* dict = nullptr;
       av_dict_set(&amp;dict, "movflags", "faststart", 0);
       av_dict_set(&amp;dict, "movflags", "frag_keyframe+empty_moov", 0);

       AVStream* outVideoStream = avformat_new_stream(ofmt_ctx, nullptr);

       avcodec_copy_context(outVideoStream->codec, ifmt_ctx->streams[0]->codec);

       ret = avformat_write_header(ofmt_ctx, &amp;dict);
    </unsigned>

    Initialization is done. Further there is a shifting packets from h264 stream to mp4 container. I dont calculate pts and dts, because source packet has AV_NOPTS_VALUE in them.

       AVPacket pkt;
       while (...)
       {
           ret = av_read_frame(ifmt_ctx, &amp;pkt);
           ret = av_interleaved_write_frame(ofmt_ctx, &amp;pkt);
           av_free_packet(&amp;pkt);
       }

    Further i write trailer and free allocated memory. That is all. Code works and i got playable mp4 file.

    Now the problem : the stream characteristics of the resulting file is not completely consisent with the characteristics of the source stream. In particular, fps and bitrate is higher than it should be.

    As sample, below is output ffplay.exe for source stream

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:/movies/source.mp4':0/0
    Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isom
        creation_time   : 2014-04-14T13:03:54.000000Z
    Duration: 00:00:58.08, start: 0.000000, bitrate: 12130 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661),yuv420p, 1920x1080, 12129 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
        handler_name    : VideoHandler
    Switch subtitle stream from #-1 to #-1 vq= 1428KB sq=    0B f=0/0
    Seek to 49% ( 0:00:28) of total duration ( 0:00:58)       B f=0/0
        30.32 M-V: -0.030 fd=  87 aq=    0KB vq= 1360KB sq=    0B f=0/0  

    and for resulting stream (contains part of source stream)

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:/movies/target.mp4':f=0/0
    Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1iso6mp41
        encoder         : Lavf57.56.101
    Duration: 00:00:11.64, start: 0.000000, bitrate: 18686 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 18683 kb/s, 38.57 fps, 40 tbr, 90k tbn, 50 tbc (default)
    Metadata:
        handler_name    : VideoHandler
    Switch subtitle stream from #-1 to #-1 vq= 2309KB sq=    0B f=0/0
        5.70 M-V:  0.040 fd= 127 aq=    0KB vq= 2562KB sq=    0B f=0/0  

    So there is a question, what i missed when copying stream ? I will be grateful for any help.

    Best regards

  • Flutter_ffmpeg : At least one output file must be specified

    22 mars 2020, par Jehonadab Okpukoro

    I’m trying to crop a video with Flutter_ffmpeg package using this -i $inputPath -filter:v "crop=80:60:200:100" -c $outputPath, but I’m having this error message

    Running FFmpeg with arguments: [-i, /data/user/0/com.timz/app_flutter/Movies/flutter_test/1584827688309.mp4, -filter:v, crop=80:60:200:100, -c, /data/user/0/com.timz/cache/output.mp4].
    I/flutter (20728): ffmpeg version git-2020-01-25-fd11dd500
    I/flutter (20728):  Copyright (c) 2000-2020 the FFmpeg developers
    I/flutter (20728):
    I/flutter (20728):   built with Android (5220042 based on r346389c) clang version 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf643d27dbca1bb228957008617) (https://android.googlesource.com/toolchain/llvm 3c393fe7a7e13b0fba4ac75a01aa683d7a5b11cd) (based on LLVM 8.0.7svn)
    I/flutter (20728):   configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disa
    I/flutter (20728):   libavutil      56. 38.100 / 56. 38.100
    I/flutter (20728):   libavcodec     58. 65.102 / 58. 65.102
    I/flutter (20728):   libavformat    58. 35.101 / 58. 35.101
    I/flutter (20728):   libavdevice    58.  9.103 / 58.  9.103
    I/flutter (20728):   libavfilter     7. 70.101 /  7. 70.101
    I/flutter (20728):   libswscale      5.  6.100 /  5.  6.100
    I/flutter (20728):   libswresample   3.  6.100 /  3.  6.100
    I/flutter (20728): Trailing option(s) found in the command: may be ignored.
    D/flutter-ffmpeg(20728): FFmpeg exited with rc: 1
    I/flutter (20728): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.timz/app_flutter/Movies/flutter_test/1584827688309.mp4':
    I/flutter (20728):   Metadata:
    I/flutter (20728):     major_brand     :
    I/flutter (20728): mp42
    I/flutter (20728):
    I/flutter (20728):     minor_version   :
    I/flutter (20728): 0
    I/flutter (20728):
    I/flutter (20728):     compatible_brands:
    I/flutter (20728): isommp42
    I/flutter (20728):
    I/flutter (20728):     creation_time   :
    I/flutter (20728): 2020-03-21T21:54:56.000000Z
    I/flutter (20728):
    I/flutter (20728):     com.android.version:
    I/flutter (20728): 9
    I/flutter (20728):
    I/flutter (20728):   Duration:
    I/flutter (20728): 00:00:07.17
    I/flutter (20728): , start:
    I/flutter (20728): 0.000000
    I/flutter (20728): , bitrate:
    I/flutter (20728): 3870 kb/s
    I/flutter (20728):
    I/flutter (20728):     Stream #0:0
    I/flutter (20728): (eng)
    I/flutter (20728): : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 720x480, 3854 kb/s
    I/flutter (20728): , SAR 1:1 DAR 3:2
    I/flutter (20728): ,
    I/flutter (20728): 29.44 fps,
    I/flutter (20728): 29.83 tbr,
    I/flutter (20728): 90k tbn,
    I/flutter (20728): 180k tbc
    I/flutter (20728):  (default)
    I/flutter (20728):
    I/flutter (20728):     Metadata:
    I/flutter (20728):       rotate          :
    I/flutter (20728): 270
    I/flutter (20728):
    I/flutter (20728):       creation_time   :
    I/flutter (20728): 2020-03-21T21:54:56.000000Z
    I/flutter (20728):
    I/flutter (20728):       handler_name    :
    I/flutter (20728): VideoHandle
    I/flutter (20728):
    I/flutter (20728):     Side data:
    I/flutter (20728):      
    I/flutter (20728): displaymatrix: rotation of 90.00 degrees
    I/flutter (20728):
    I/flutter (20728):     Stream #0:1
    I/flutter (20728): (eng)
    I/flutter (20728): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 12 kb/s
    I/flutter (20728):  (default)
    I/flutter (20728):
    I/flutter (20728):     Metadata:
    I/flutter (20728):       creation_time   :
    I/flutter (20728): 2020-03-21T21:54:56.000000Z
    I/flutter (20728):
    I/flutter (20728):       handler_name    :
    I/flutter (20728): SoundHandle
    I/flutter (20728):
    I/flutter (20728): At least one output file must be specified

    I’ve been cracking my head with this for the past two days, kindly share your thoughts on what might wrong.