Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (99)

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

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (9850)

  • ValueError : I/O operation on closed file with ffmpeg

    22 mars 2018, par AstroCoda

    I’m trying to get this (minimal working example) code to compile in a virtual environment on Anaconda which I’ve set up in a supercomputing cluster :

    import numpy as np
    import matplotlib
    matplotlib.use("Agg")
    import matplotlib.pyplot as plt
    import matplotlib.animation as manimation

    FFMpegWriter = manimation.writers['ffmpeg']
    metadata = dict(title='Movie Test', artist='Matplotlib',
               comment='Movie support!')
    writer = FFMpegWriter(fps=15, metadata=metadata)

    fig = plt.figure()
    l, = plt.plot([], [], 'k-o')

    plt.xlim(-5, 5)
    plt.ylim(-5, 5)

    x0, y0 = 0, 0

    with writer.saving(fig, "writer_test.mp4", 100):
       for i in range(100):
           x0 += 0.1 * np.random.randn()
           y0 += 0.1 * np.random.randn()
           l.set_data(x0, y0)
           writer.grab_frame()

    The thing is, this code works absolutely fine on my local machine (MacOSX) - Anaconda distribution ; Python 2.7 ; same matplotlib and numpy version, and I have ffmpeg on Anaconda ; I have ffmpeg on the cluster as well, albeit at a different version to the one on Python (but no issue with this on my local machine). When I run the code on the cluster, I get :

    Traceback (most recent call last):
     File "movie_test.py", line 25, in <module>
       writer.grab_frame()
     File "~/anaconda2/envs/test_movie/lib/python2.7/contextlib.py", line 35, in __exit__
       self.gen.throw(type, value, traceback)
     File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 241, in saving
       self.finish()
     File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 367, in finish
       self.cleanup()
     File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 405, in cleanup
       out, err = self._proc.communicate()
     File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 927, in communicate
       stdout, stderr = self._communicate(input, endtime, timeout)
     File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1713, in _communicate
       orig_timeout)
     File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1769, in _communicate_with_poll
       register_and_append(self.stdout, select_POLLIN_POLLPRI)
     File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1748, in register_and_append
       poller.register(file_obj.fileno(), eventmask)
    ValueError: I/O operation on closed file
    </module>

    All the searches I’ve made correspond to relatively simple text write in/out operations, but not for videos. Thanks in advance for the help !

  • Ignore streams when finding stream info

    17 mars 2018, par CSNewman

    I’m trying to speed up the start of ffmpeg when processing my live stream, and have narrowed down the issue to the ‘avformat_find_stream_info’ function. The source I’m trying to process seems to have a number of streams that ffmpeg is unable to determine what they are and therefore spends a while trying to find information about them (The entire analyse window). I know ahead of time that I only want to find information about stream #0:0 and #0:1, and I will be disregarding the other streams anyways.

    I managed to work around this using the API by setting the number of streams before the find information call and then restoring the value afterwards.

    inputContext->nb_streams = (uint) 2;
    if (ffmpeg.avformat_find_stream_info(inputContext, null) &lt; 0)
    {
       throw new InvalidOperationException("Could not read stream information.");
    }
    inputContext->nb_streams = oldSize;

    However, I would prefer to use the CLI interface of ffmpeg.

    My current command

    ffmpeg -find_stream_info false -i http://192.168.1.112:5004/auto/v1 -c copy -map 0:v:0 -map 0:a:0 -ignore_unknown   -f hls -hls_flags delete_segments  -segment_list playlist.m3u8 -segment_list_type hls -segment_list_size 10 -segment_list_flags +live -segment_time 10 -f segment stream%%05d.ts

    Giving the following input (Unneeded logging removed)

    [mpeg2video @ 000001ce79423440] Invalid frame dimensions 0x0.
       Last message repeated 9 times
    [mpegts @ 000001ce7941b740] Could not find codec parameters for stream 5 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    [mpegts @ 000001ce7941b740] Could not find codec parameters for stream 6 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    [mpegts @ 000001ce7941b740] Could not find codec parameters for stream 7
    (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    [mpegts @ 000001ce7941b740] Could not find codec parameters for stream 8
    (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, mpegts, from 'http://192.168.1.112:5004/auto/v1':
     Duration: N/A, start: 91296.182311, bitrate: N/A
     Program 4165
       Stream #0:0[0x65]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x66](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
       Stream #0:2[0x6a](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 64 kb/s (visual impaired) (dependent)
       Stream #0:3[0x69](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:4[0x98]: Audio: mp2 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16p, 128 kb/s
       Stream #0:5[0x1c21]: Unknown: none ([11][0][0][0] / 0x000B)
       Stream #0:6[0x1c33]: Unknown: none ([11][0][0][0] / 0x000B)
       Stream #0:7[0x1bbf]: Unknown: none ([5][0][0][0] / 0x0005)
       Stream #0:8[0x1bc1]: Unknown: none ([5][0][0][0] / 0x0005)

    I’m unsure if there’s a way to achieve the same functionality with the CLI, however I’m open changing how my setup works.

    One idea that I considered was running two ffmpeg instances, one to strip the unneeded streams (and not find the stream info) and then have another that takes that stripped stream and performs the rest of the functionality.

    Any insight here would be grateful, thanks in advance.

  • create Accord.Video.FFMPEG object intial error

    14 mars 2018, par lokcyi

    I create an project with C# Visual studio 2013 and reference Accord.Video.FFMPEG.dll.
    The Configure of projects Target Platforms is set to x86.
    It is ok while compileing.
    But,It would throw run time error when application running.
    The exception is below. showing =>This application cannot be run in 64-bits
    I have no idea what wrong with the error ?


    System.TypeInitializationException   IsTransient=false
     Message='<module>' 的型別初始設定式發生例外狀況。
     Source=VideoMarkerAccord
     TypeName=<module>
     StackTrace:
          於 VideoMarker.Form1.test()
          於 VideoMarker.Form1.ConvertVedio(Int32 iFps, Int32 bitrate, Int32 width, Int32 height, Int32 iSpeed, String sOutputPath, String xml, String sVCode) 於 d:\Projects\AForge\VideoMarkerAccord\VideoMarker\Form1.cs: 行 201
          於 VideoMarker.Form1.btnConvertVedio_Click(Object sender, EventArgs e) 於 d:\Projects\AForge\VideoMarkerAccord\VideoMarker\Form1.cs: 行 181
          於 System.Windows.Forms.Control.OnClick(EventArgs e)
          於 System.Windows.Forms.Button.OnClick(EventArgs e)
          於 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
          於 System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
          於 System.Windows.Forms.Control.WndProc(Message&amp; m)
          於 System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)
          於 System.Windows.Forms.Button.WndProc(Message&amp; m)
          於 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
          於 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
          於 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
          於 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
          於 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
          於 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
          於 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
          於 System.Windows.Forms.Application.Run(Form mainForm)
          於 VideoMarker.Program.Main() 於 d:\Projects\AForge\VideoMarkerAccord\VideoMarker\Program.cs: 行 18
          於 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
          於 System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
          於 System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
          於 System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
          於 System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
          於 System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
          於 System.Activator.CreateInstance(ActivationContext activationContext)
          於 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
          於 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
          於 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
          於 System.Threading.ThreadHelper.ThreadStart()
     InnerException: <crtimplementationdetails>.ModuleLoadException
          _HResult=-2146233088
          _message=The C++ module failed to load during process initialization.

          IsTransient=false
          Message=The C++ module failed to load during process initialization.

          Source=msvcm90
          StackTrace:
               於 <crtimplementationdetails>.ThrowModuleLoadException(String errorMessage, Exception innerException)
               於 <crtimplementationdetails>.ThrowModuleLoadException(String , Exception )
               於 <crtimplementationdetails>.LanguageSupport.Initialize(LanguageSupport* )
               於 .cctor()
          InnerException: System.InvalidOperationException
               _HResult=-2146233079
               _message=This application cannot be run in 64-bits.
               IsTransient=false
               Message=This application cannot be run in 64-bits.
               Source=Accord.Video.FFMPEG
               StackTrace:
                    於 _init.{ctor}(_init* )
                    於 ?A0xbe509209.??__E?A0xbe509209@_initializer@@YMXXZ()
                    於 _initterm_m((fnptr)* pfbegin, (fnptr)* pfend)
                    於 <crtimplementationdetails>.LanguageSupport.InitializePerProcess(LanguageSupport* )
                    於 <crtimplementationdetails>.LanguageSupport._Initialize(LanguageSupport* )
                    於 <crtimplementationdetails>.LanguageSupport.Initialize(LanguageSupport* )
               InnerException:
    </crtimplementationdetails></crtimplementationdetails></crtimplementationdetails></crtimplementationdetails></crtimplementationdetails></crtimplementationdetails></crtimplementationdetails></module></module>