Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (25)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

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

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (6475)

  • Cannot suppress ffmpeg output from ruby

    3 avril 2014, par Danny

    I have ruby on rails app that allows users to upload videos. When a video is added, I have a before_save filter that uses ffmpeg to generate a series of thumbnails. The problem is that ffmpeg is producing tons of console output when I'm saving a video item in the rails console, and when I run my tests.

    My environment :

    • Host Machine : OS X 10.9.2
    • Vagrant Box : Ubuntu 10.04.4
    • ffmpeg version : SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3
    • ruby version : 1.9.3-p194

    Command I'm running :

    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg`

    This version of ffmpeg on my VM doesn't seem to care about the "-v 0" option. I've also tried "-loglevel quiet" which causes ffmpeg to error, indicating that the option isn't recognized (both loglevel and v work on my host machine's ffmpeg).

    Tried using both exec() and system(), which both caused execution to hang. Tried to redirecting output to a file by doing :

    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg > #{thumbnail_path}/output.txt`

    Still see output. Next I tried :

    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg &> dev/null`

    Still seeing output ! Finally I tried :

    $stdout.reopen("#{thumbnail_path}/output.txt", "w")
    $stderr.reopen("#{thumbnail_path}/error.txt", "w")
    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg`
    $stdout = STDOUT
    $stderr = STDERR

    Holy cow, that worked ! Well, sort of. No more verbose output when running tests, BUT somehow anytime this runs I get kicked out of the rails console.

    Does anyone have a more elegant solution ?

  • ffmpeg fails when running non-interactively

    16 juillet 2020, par sfink

    I was showing my kid some basic scripting with ffmpeg to show him how much easier it is with automation.

    


    Which, of course, failed miserably.

    


    Specifically, we wrote a simple python script that outputs something like :

    


    ffmpeg -ss 0:00:00 -t 1:00:00 -i wholebook.mp3 'Part 01.opus'
ffmpeg -ss 1:00:00 -t 1:00:00 -i wholebook.mp3 'Part 02.opus'
ffmpeg -ss 2:00:00 -t 1:00:00 -i wholebook.mp3 'Part 03.opus'
.
.
.


    


    Which works fine, so then I piped it to bash : python script.py | bash

    


    ffmpeg converted the first part, then started spewing errors and data dumps for most of the rest. (Ok, it got part 15 right, too.)

    


    Copy/pasting each command in turn works fine.

    


    Changing the output to .mp3 didn't matter ; it seems like it's erroring out while reading the input.

    


    Why is piping these commands to bash failing ?

    


    Update : it's not just piping it to bash. If, instead of cutting & pasting each command and waiting for it to finish, he cuts & pastes the whole series of commands into the terminal (running bash), it fails in the same way.

    


    The error output starts with :

    


    stream #0:
  keyframe=1
  duration=0.026
  dts=426.005  pts=426.005
  size=418
stream #0:
  keyframe=1
  duration=0.026
  dts=426.031  pts=426.031
  size=418
stream #0:
  keyframe=1
  duration=0.026
  dts=426.057  pts=426.057
  size=418


    


    and continues for many thousands of lines. At some point, it switches to :

    


    stream #0:
  keyframe=1
  duration=0.026
  dts=764.473  pts=764.473
  size=418
00000000  ff fb 92 64 f0 89 f5 f8 6c 3f 83 2c 4b 52 00 00 ...d....l?.,KR..
00000010  0d 20 00 00 01 19 55 b0 fe ad 31 37 08 00 00 34 . ....U...17...4
00000020  80 00 00 04 71 63 57 34 87 7a a1 ad 69 ab 77 53 ....qcW4.z..i.wS
00000030  fd fb 88 28 d3 10 b2 66 9f 99 dc 82 46 27 44 a2 ...(...f....F'D.
00000040  75 a8 5d b1 83 34 9a 5e bd 72 59 b1 11 1e 0a b8 u.]..4.^.rY.....
00000050  6d e9 d1 61 94 5c b6 92 ac cf 16 4b 74 d4 7c b7 m..a.\.....Kt.|.
00000060  ab c7 7a 6a 6b 7e f1 4e 55 fc 69 dd 2a f0 e1 21 ..zjk~.NU.i.*..!
00000070  09 10 25 09 a8 79 fe d1 da cb 34 06 8a 08 28 21 ..%..y....4...(!
00000080  47 6d 5d b6 06 f1 57 af 59 7b 75 86 60 a8 dd 99 Gm]...W.Y{u.`...
00000090  a4 87 45 aa 90 e1 67 74 78 30 a1 83 08 ce d9 ee ..E...gtx0......
000000a0  4f cf 22 f8 a3 46 4a a1 7c 7b a1 e6 59 df 76 86 O."..FJ.|{..Y.v.
000000b0  53 c5 5e 85 1d 39 57 ac a3 0e c5 03 93 51 f6 c6 S.^..9W......Q..
000000c0  86 2b 9c e1 33 27 59 c8 96 76 db 1c 96 42 58 93 .+..3'Y..v...BX.
000000d0  ce 46 83 44 a2 48 e5 66 0a 60 30 70 27 bc 3f 2a .F.D.H.f.`0p'.?*
000000e0  2d d9 6d 4d d9 79 41 7c d8 fc a9 64 35 af 88 eb -.mM.yA|...d5...
000000f0  15 a4 32 b2 73 0b 18 88 04 81 c9 60 48 ba 97 54 ..2.s......`H..T
00000100  24 89 28 65 e4 8b 0e ce 11 a1 19 39 05 0e 0f 31 $.(e.......9...1
00000110  62 e7 9a 3d 5c 3e b9 64 69 4f f6 f1 1d 19 bb 8f b..=\>.diO......
00000120  e1 29 60 b8 d6 ca 35 f8 ce 50 d4 9f dd 4a e3 d7 .)`...5..P...J..
00000130  79 d3 75 8e 15 67 c9 8b ac d9 a5 6a fa 43 47 10 y.u..g.....j.CG.
00000140  d1 46 fd 9c 93 d8 a3 33 74 2e 80 00 82 94 4c f3 .F.....3t.....L.
00000150  0e 02 8c 07 41 31 48 95 d8 f2 85 89 38 5e 65 37 ....A1H.....8^e7
00000160  76 dd 2b 2e c5 1c 39 13 9b 9b ae ab 25 cc 79 45 v.+...9.....%.yE
00000170  1e 60 1d b0 20 cf d2 12 cc 80 57 9b 99 65 78 9c .`.. .....W..ex.
00000180  82 a3 03 c0 b2 11 6b a5 49 c2 85 bd 3f 90 d5 73 ......k.I...?..s
00000190  13 f4 9e c5 29 23 0a 2a 25 c5 9d eb 5e 9c 95 c9 ....)#.*%...^...
000001a0  ec aa                                           ..
stream #0:
  keyframe=1
  duration=0.026
  dts=764.500  pts=764.500
  size=418
00000000  ff fb 92 64 ea 80 f5 14 69 41 cb 0c 34 72 00 00 ...d....iA..4r..
00000010  0d 20 00 00 01 1b 49 b0 fc ac bd 91 88 00 00 34 . ....I........4
00000020  80 00 00 04 5b 32 ac c2 16 a8 6d 65 8d 09 c5 3b ....[2....me...;
00000030  64 81 da 43 d5 27 4a 3d b1 8d c1 f5 95 ba e9 61 d..C.'J=.......a
00000040  62 a7 6a 5e 5d ab 58 7a 23 b7 8a f5 3f 2a 59 62 b.j^].Xz#...?*Yb
...


    


  • Fast movie creation using MATLAB and ffmpeg

    24 février 2018, par hyiltiz

    I have some time series data that I would like to create into movies. The data could be 2D (about 500x10000) or 3D (500x500x10000). For 2D data, the movie frames are simply line plot using plot, and for 3D data, we can use surf, imagesc, contour etc. Then we create a video file using these frames in MATLAB, then compress the video file using ffmpeg.

    To do it fast, one would try not to render all the images to display, nor save the data to disk then read it back again during the process. Usually, one would use getframe or VideoWriter to create movie in MATLAB, but they seem to easily get tricky if one tries not to display the figures to screen. Some even suggest plotting in hidden figures, then saving them as images to disk as .png files, then compress them using ffmpeg (e.g. with x265 encoder into .mp4). However, saving the output of imagesc in my iMac took 3.5s the first time, then 0.5s after. I also find it not fast enough to save so many files to disk only to ask ffmpeg to read them again. One could hardcopy the data as this suggests, but I am not sure whether it works regardless of the plotting method (e.g. plot, surf etc.), and how one would transfer data over to ffmpeg with minimal disk access.

    This is similiar to this, but immovie is too slow. This post 3 is similar, but advocates writing images to disk then reading them (slow IO).