Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (72)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (6603)

  • ffmpeg got stuck while trying to crossfade merge two videos

    30 juin 2017, par Jeflopo

    I’m trying to do a crossfade merge (1s) between two videos. An intro (39secs duration) video with the main video. When I executed the command it started working without throwing errors but at some frame ffmpeg gets stuck.

    I read a lot of q/a here in stackoverflow, and the official docs but I can’t solve this so :

    This is the command :

    ffmpeg -i "inputs/intro.mp4" -i "inputs/240p.mp4" -an -filter_complex \
       "[0:v]trim=start=0:end=38,setpts=PTS-STARTPTS[firstclip]; \
       [0:v]trim=start=38:end=39,setpts=PTS-STARTPTS[fadeoutsrc]; \
       [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; \
       [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; \
       [fadeinsrc]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[fadein]; \
       [fadeoutsrc]format=pix_fmts=yuva420p, fade=t=out:st=0:d=1:alpha=1[fadeout]; \
       [fadein]fifo[fadeinfifo]; \
       [fadeout]fifo[fadeoutfifo]; \
       [fadeoutfifo][fadeinfifo]overlay[crossfade]; \
       [firstclip][crossfade][secondclip]concat=n=3[output]; \
       [0:a][1:a] acrossfade=d=1 [audio]" -vcodec libx264 -map "[output]" -map "[audio]" "outputs/240p.mp4"

    Here’s the raw command (the exact command I used) :

    ffmpeg -i "inputs/intro.mp4" -i "inputs/240p.mp4" -an -filter_complex "[0:v]trim=start=0:end=38,setpts=PTS-STARTPTS[firstclip]; [0:v]trim=start=38:end=39,setpts=PTS-STARTPTS[fadeoutsrc]; [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; [fadeinsrc]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[fadein]; [fadeoutsrc]format=pix_fmts=yuva420p, fade=t=out:st=0:d=1:alpha=1[fadeout]; [fadein]fifo[fadeinfifo]; [fadeout]fifo[fadeoutfifo]; [fadeoutfifo][fadeinfifo]overlay[crossfade]; [firstclip][crossfade][secondclip]concat=n=3[output]; [0:a][1:a] acrossfade=d=1 [audio]" -vcodec libx264 -map "[output]" -map "[audio]" "outputs/240p.mp4"

    The "error" is reproducible with and without the -an and the acrossfade filters.

    This is the output :

    PS C:\scripts\ffmpeg> ffmpeg -i "inputs/intro.mp4" -i "inputs/240p.mp4" -an -filter_complex "[0:v]trim=start=0:end=38,setpts=PTS-STARTPTS[firstclip]; [0:v]trim=start=38:end=39,setpts=PTS-STARTPTS[fadeoutsrc]; [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; [fadeinsrc]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[fadein]; [fadeoutsrc]format=pix_fmts=yuva420p, fade=t=out:st=0:d=1:alpha=1[fadeout]; [fadein]fifo[fadeinfifo]; [fadeout]fifo[fadeoutfifo]; [fadeoutfifo][fadeinfifo]overlay[crossfade]; [firstclip][crossfade][secondclip]concat=n=3[output]; [0:a][1:a] acrossfade=d=1 [audio]" -map "[output]" -map "[audio]" "outputs/240p.mp4"
    ffmpeg version N-86669-gc1d1274 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.1.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --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-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 67.100 / 55. 67.100
     libavcodec     57.100.102 / 57.100.102
     libavformat    57. 75.100 / 57. 75.100
     libavdevice    57.  7.100 / 57.  7.100
     libavfilter     6. 94.100 /  6. 94.100
     libswscale      4.  7.101 /  4.  7.101
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'inputs/intro.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.72.101
     Duration: 00:06:24.45, start: 0.000000, bitrate: 491 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 426x240 [SAR 1:1 DAR 71:40], 353 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 130 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'inputs/240p.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.40.101
     Duration: 00:06:24.43, start: 0.000000, bitrate: 375 kb/s
       Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 426x240 [SAR 1:1 DAR 71:40], 243 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 (h264) -> trim
     Stream #0:0 (h264) -> trim
     Stream #0:1 (aac) -> acrossfade:crossfade0
     Stream #1:0 (h264) -> trim
     Stream #1:0 (h264) -> trim
     Stream #1:1 (aac) -> acrossfade:crossfade1
     concat -> Stream #0:0 (libx264)
     acrossfade -> Stream #0:1 (aac)
    Press [q] to stop, [?] for help
    [libx264 @ 00000000026b2240] using SAR=1/1
    [libx264 @ 00000000026b2240] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 00000000026b2240] profile High, level 2.1
    [libx264 @ 00000000026b2240] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=7 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'outputs/240p.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.75.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 426x240 [SAR 1:1 DAR 71:40], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.100.102 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
       Metadata:
         encoder         : Lavc57.100.102 aac
    frame=10369 fps=503 q=28.0 size=   24064kB time=00:06:55.68 bitrate= 474.2kbits/s speed=20.2x

    At frame 10000 it gets stuck... I waited for 1hour but it keeps stuck.

    I’ve updated ffmpeg :

    ffmpeg -version
    ffmpeg version N-86669-gc1d1274 Copyright (c) 2000-2017 the FFmpeg developers
    built with gcc 7.1.0 (GCC)
    configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --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-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
    libavutil      55. 67.100 / 55. 67.100
    libavcodec     57.100.102 / 57.100.102
    libavformat    57. 75.100 / 57. 75.100
    libavdevice    57.  7.100 / 57.  7.100
    libavfilter     6. 94.100 /  6. 94.100
    libswscale      4.  7.101 /  4.  7.101
    libswresample   2.  8.100 /  2.  8.100
    libpostproc    54.  6.100 / 54.  6.100

    I used these references :

  • Ramp- Slow Motion in IOS

    26 juin 2013, par 2vision2

    I have to do "ramp-slow motion" in a video file along with audio, in-between some frames and need to store the ramped video as a new video.

    Ref : http://www.youtube.com/watch?v=BJ3_xMGzauk (watch from 0 to 10s)

    From my analysis, I've found that AVFoundation framework can be helpful.

    Ref :
    http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html

    Copy and pasted from the above link :

    "
    Editing
    AV Foundation uses compositions to create new assets from existing pieces of media (typically, one or more video and audio tracks). You use a mutable composition to add and remove tracks, and adjust their temporal orderings. You can also set the relative volumes and ramping of audio tracks ; and set the opacity, and opacity ramps, of video tracks. A composition is an assemblage of pieces of media held in memory. When you export a composition using an export session, it's collapsed to a file.
    On iOS 4.1 and later, you can also create an asset from media such as sample buffers or still images using an asset writer.

    "

    Questions :
    Can I "ramp-slow mote" the video/audio file using the AVFoundation framework ? Or Is there any other package available ? If i want to handle audio and video separately, please guide me how to do ?

  • How to reencode flash stream to MP4 or/and WebM inside server implementation ?

    18 avril 2013, par user2294505

    Hi guys, lets start with this that I'm totally new in video streaming.

    Currently I have to support one server implemented in C that work as mediator between stream producers and stream consumers. In my case I have one remote machine that generate flash stream and one or more clients that can watch it. The server work as proxy for all of them. We are using our server side implementation for rtmp protocol and for asynchronous work over HTTP we are using libevent library. All this construction work fine in common case.

    Now we need to transfer this stream to HTML5 clients and we need to support new formats. Our decision was that MP4 and WebM are enough for us. Base of the HTTP request our internal implementation recognized what type of stream client need. For example when the client need MP4 URI is something like this :

    http://192.168.0.5/video.mp4?blah-blah-blah

    where "blah-blah-blah" are few parameters to impersonate client. We have already implemented mechanism that convert input frames to raw pictures and this implementation work fine when we stream JPEGs as again we are using libavformat library to encode raw picture to JPEG. In case with JPEGs the contents of the stream data must contain HTTP meta data with description of every picture. The client stream request is same as this for MP4 stream but instead video.mp4 we are uising jpegstream.htm

    Now I need to convert this input stream to MP4 and/or WebM and here start my problems. For generating Mp4 and WebM videos I'm using ffmpeg libraries and base of one of ffmpeg examples (muxing) I'm trying to convert already generated pictures to currently selected new format. More or less this conversion is OK but after than I don't know why I can't send video to consumer. I'm using next code to prepare avio context :

    int iSize = 4 * 1024;
    unsigned char *ptrBuf = ( unsigned char * )av_malloc( iSize );
    ptrOFC->pb = avio_alloc_context( ptrBuf, iSize, 1, ptrTCDObj, NULL, write_pkg, NULL );
    if ( !ptrTCDObj->ptrOFC->pb ) {
       goto ERROR;
    }
    avformat_write_header( ptrOFC, NULL );

    When the server receive frame from flash we are converting it to corresponding output format with code like this :

    iResult = avcodec_encode_video2( ptrTCDataObj->m_ptrOCC, &packet, pictureFrame, &iGotPacket ) ;

    and write it to stream when succeed and packet exist with :

    av_interleaved_write_frame( ptrOFC, &packet );

    Here our code expect to receive in one moment call to write_pkg function. But nothing happen here :-(. Situation is 100% same if I'm using direct write with av_write_frame. The write_pkg function has very simple body :

    int write_pkg( void *ptrOpaque, uint8_t *ptrBuffer, int iBufferSize )
    {
       STransCoderData_t *ptrTCDObj = ( STransCoderData_t * ) ptrOpaque;
       struct evbuffer *ptrFrameOut;
       ptrFrameOut = evbuffer_new();
       evbuffer_add( ptrFrameOut, ptrBuffer,( size_t ) iBufferSize );
       http_client_write_video( ptrFrameOut, ptrTCDObj->m_ptrHTTPClient, NULL );
       evbuffer_free( ptrFrameOut );
       return iBufferSize;
    }

    Structure STransCoderData_t and function http_client_write_video is not interesting in this moment because we don't reach them for now :-(

    For test consumer I'm using VLC player as open network stream :

    http://192.168.0.5/video.mp4?blah-blah-blah

    VLC don't show anything even errors.

    Any ideas, comments and help are welcome.