Recherche avancée

Médias (91)

Autres articles (56)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (4232)

  • How to trim a file with FFMpeg programmatically ? (libavformat, avutils, ...)

    5 février 2016, par user361526

    I’m building an iOS app where re-encoding and trimming a video in the background is necessary.

    I can not use iOS libraries (AVFoundation) since they rely on the GPU and no app can access the GPU if it’s backgrounded.

    Due to this issue I switched to FFMpeg and compiled it (alongside libx264) and integrated it on my iOS app.

    To sum things up what I need is :

    1. Trim the video for the first 10 seconds
    2. re-scale the video

    After a couple of weeks - and banging my head against the wall quite often - I managed to :

    • split the video container into streams (demuxing)
    • copy the audio stream into the output stream (no decoding or encoding)
    • decode the video stream, run the necessary filters per frame, encode each resulting frame and remux it to the output stream (I decode the h264, filter it, re-encode it back to h264)

    If I were to run ffmpeg through the command line I would run it like this :

    ffmpeg -i input.MOV -ss 0 -t 10  -vf scale=320:240 -c:v libx264 -preset ultrafast -c:a copy output.mkv

    My concern is how to trim the video ? Although I could count the number of video frames that I encode/decode and based on the FPS decide when to stop I cannot do the same with the audio since I’m only demuxing and remuxing it.

    Ideally - before scaling the video - I would run a process to trim the video by copying the 10 seconds of each stream (video and audio) into a new video container.

    How to I achieve this through the AV libraries ?

  • Exactly what is ` /dev/null ` when read is done by null ? [duplicate]

    26 décembre 2015, par Faron

    This question already has an answer here :

    '> /dev/null' is very common syntax and that’s something that is not a new concept ; but, I have came to this scripting and couldn’t figure the logic behind '< /dev/null' especially with FFMpeg.

    I wrote dozens of scripts that handles FFMpeg, and I found that in order for script itself to successfully call and execute FFMpeg on its own, adding ’< /dev/null’ at end of command line of ffmpeg. For example :

    ffmpeg -i $INPUT -c:v copy -c:a copy output.mp4 < /dev/null

    But if I didn’t add that sytnax at end of the command, script couldn’t "push" the execution over to FFMpeg. I understood the whole concept when it comes to "write" as > for all null, stdout, stdin, but... read by null ? scratching on head

    So, what is < /dev/null exactly ?

  • ffmpeg failing to expand drawtext

    26 novembre 2015, par charlie80

    I am trying to overlay a seconds:milliseconds timestamp on my video, but I have been breaking my head over this for some hours without any result. If I write :

    ffmpeg -f lavfi -i testsrc=duration=5:size=800x600:rate=30 -vf drawtext="fontfile=C\\:/Windows/Fonts/arial.ttf:text='%{pts}': x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -preset ultrafast output.mp4

    the %{pts} does not get expanded, and only shows the literal text {pts} on the frame.

    Please note that I have read a ton of guides around the web (ffmpeg docs/guides/wikis, stackoverflow, blogs, etc.) on this timestamp overlay stuff, but none of the solutions/syntaxes work : it simply overlays the literal text.

    Some context :

    • using Windows 7x64 and TCC/LE
    • ffmpeg Zeranoe build version git-12a419d (2015-11-23)

    The full output log :

    [E:\]ffmpeg -f lavfi -i testsrc=duration=5:size=800x600:rate=30 -vf drawtext="fontfile=C\\:/Windows/Fonts/arial.ttf:text=%{pts}: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -preset ultrafast output.mp4
    ffmpeg version N-76822-g12a419d Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 5.2.0 (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-libdcadec --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-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55.  9.100 / 55.  9.100
     libavcodec     57. 16.100 / 57. 16.100
     libavformat    57. 19.100 / 57. 19.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 15.100 /  6. 15.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, lavfi, from 'testsrc=duration=5:size=800x600:rate=30':
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 800x600 [SAR 1:1 DAR 4:3], 30 tbr, 30 tbn, 30 tbc
    File 'output.mp4' already exists. Overwrite ? [y/N] y
    No pixel format specified, yuv444p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 00000000003f83c0] using SAR=1/1
    [libx264 @ 00000000003f83c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
    [libx264 @ 00000000003f83c0] profile High 4:4:4 Predictive, level 3.1, 4:4:4 8-bit
    [libx264 @ 00000000003f83c0] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    Output #0, mp4, to 'output.mp4':
     Metadata:
       encoder         : Lavf57.19.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 800x600 [SAR 1:1 DAR 4:3], q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.16.100 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=  150 fps= 61 q=-1.0 Lsize=     185kB time=00:00:05.00 bitrate= 303.2kbits/s
    video:184kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.755086%
    [libx264 @ 00000000003f83c0] frame I:1     Avg QP:20.00  size: 18409
    [libx264 @ 00000000003f83c0] frame P:149   Avg QP:16.11  size:  1135
    [libx264 @ 00000000003f83c0] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 00000000003f83c0] mb P  I16..4:  0.7%  0.0%  0.0%  P16..4:  5.1%  0.0%  0.0%  0.0%  0.0%    skip:94.2%
    [libx264 @ 00000000003f83c0] coded y,u,v intra: 5.0% 3.3% 2.8% inter: 1.1% 1.0% 0.9%
    [libx264 @ 00000000003f83c0] i16 v,h,dc,p: 81%  6%  2% 11%
    [libx264 @ 00000000003f83c0] kb/s:299.93

    [E:\]