Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (57)

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

  • Animated line chart with pandas, matplotlib and ffmpeg

    10 avril 2020, par Mark K

    In producing an animated line chart, I have below data and codes.

    



    But when the chart produced, it shows no line. What did I do wrong ?

    



    Thank you.

    



    import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation

title = 'Heroin Overdoses'

data = {'Year' : ["1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016"], 
'Heroin Overdoses' : [280,443,413,486,475,148,197,170,448,103,137,160,483,356,352,300,466,278]}
overdose = pd.DataFrame(data)

Writer = animation.writers['ffmpeg']
writer = Writer(fps=20, metadata=dict(artist='Me'), bitrate=1800)

fig = plt.figure(figsize=(10,6))
plt.xlim(1999, 2016)
plt.ylim(np.min(overdose)[0], np.max(overdose)[0])
plt.xlabel('Year',fontsize=20)
plt.ylabel(title,fontsize=20)
plt.title('Heroin Overdoses per Year',fontsize=20)

def animate(i):
    data = overdose.iloc[:int(i+1)] #select data range
    p = sns.lineplot(x=data.index, y=data[title], data=data, color="r")
    p.tick_params(labelsize=17)
    plt.setp(p.lines,linewidth=7)

ani = matplotlib.animation.FuncAnimation(fig, animate, frames=17, repeat=True)

ani.save('C:\\folder\\line chart.mp4', writer=writer)


    


  • FFmpeg : A few errors including invalid frame size and incomplete frame

    8 février 2019, par Abs

    I use this ffmpeg command to take clips from a large VOB files that is on a DVD :

    ffmpeg.exe -i E:\VTS_02_2.vob -ss 00:00:57 -t 00:16:15 vids\VTS_02_2.vob

    It worked first for a VOB file but then I got these errors :

    c:\ffmpeg>ffmpeg.exe -i E:\VTS_02_2.vob -ss 00:00:57 -t 00:16:15 vids\VTS_02_2.vob
    FFmpeg version SVN-r15625, Copyright (c) 2000-2008 Fabrice Bellard, et al.
     configuration: --enable-memalign-hack --enable-postproc --enable-swscale --enable-g
    l --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libv
    rbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-ffserver --disabl
    -vhook --enable-avisynth --enable-pthreads
     libavutil     49.12. 0 / 49.12. 0
     libavcodec    52. 0. 0 / 52. 0. 0
     libavformat   52.22. 1 / 52.22. 1
     libavdevice   52. 1. 0 / 52. 1. 0
     libswscale     0. 6. 1 /  0. 6. 1
     libpostproc   51. 2. 0 / 51. 2. 0
     built on Oct 16 2008 05:40:02, gcc: 4.2.4 (TDM-1 for MinGW)
    Input #0, mpeg, from 'E:\VTS_02_2.vob':
     Duration: 00:17:11.61, start: 1031.828511, bitrate: 8326 kb/s
       Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 9640
    kb/s, 25.00 tb(r)
       Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    File 'vids\VTS_02_2.vob' already exists. Overwrite ? [y/N] y
    Output #0, svcd, to 'vids\VTS_02_2.vob':
       Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], q=2-31, 200
    kb/s, 25.00 tb(c)
       Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1
    Press [q] to stop encoding
    [ac3 @ 026D3990]frame sync error
    Error while decoding stream #0.1
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    [mpeg2video @ 0141B780]ac-tex damaged at 40 2
    [mpeg2video @ 0141B780]invalid mb type in B Frame at 3 12
    [mpeg2video @ 0141B780]00 motion_type at 15 16
    [mpeg2video @ 0141B780]mb incr damaged
    [mpeg2video @ 0141B780]00 motion_type at 2 21
    [mpeg2video @ 0141B780]00 motion_type at 44 22
    [mpeg2video @ 0141B780]ac-tex damaged at 43 24
    [mpeg2video @ 0141B780]Warning MVs not available
    [mpeg2video @ 0141B780]concealing 765 DC, 765 AC, 765 MV errors
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    [mpeg2video @ 0141B780]ac-tex damaged at 5 9
    [mpeg2video @ 0141B780]00 motion_type at 21 13
    [mpeg2video @ 0141B780]ac-tex damaged at 1 20
    [mpeg2video @ 0141B780]mb incr damaged
    [mpeg2video @ 0141B780]00 motion_type at 30 30
    [mpeg2video @ 0141B780]Warning MVs not available
    [mpeg2video @ 0141B780]concealing 450 DC, 450 AC, 450 MV errors
    [ac3 @ 026D3990]frame CRC mismatch
    [ac3 @ 026D3990]incomplete frame
    [ac3 @ 026D3990]invalid frame size
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    [mpeg2video @ 0141B780]00 motion_type at 38 15
    [mpeg2video @ 0141B780]00 motion_type at 30 34
    [mpeg2video @ 0141B780]Warning MVs not available
    [mpeg2video @ 0141B780]concealing 254 DC, 254 AC, 254 MV errors
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    [mpeg2video @ 0141B780]ac-tex damaged at 7 6
    [mpeg2video @ 0141B780]concealing 1350 DC, 1350 AC, 1350 MV errors
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    [ac3 @ 026D3990]incomplete frame
    [ac3 @ 026D3990]invalid frame size
    frame=    0 fps=  0 q=0.0 size=       0kB time=10000000000.00 bitrate=   0.0kbits/s
    frame=    0 fps=  0 q=0.0 Lsize=       0kB time=10000000000.00 bitrate=   0.0kbits/s

    video:0kB audio:0kB global headers:0kB muxing overhead -1.#IND00%

    Is there a way to force ffmpeg to just give me an output ?

  • why type casting on non-pointer struct give syntax error

    1er avril 2020, par Sany Liew

    I am using Visual C++ express 2008 try to compile code similar to below :

    



    no problem

    



    {
  ...
  AVRational test = {1, 1000};
  ...
}


    



    but has problem when it is as below :

    



    {
  ...
  AVRational test = (AVRational){1, 1000};
  ...
}


    



    gave errors :

    



    1>..\..\..\projects\test\xyz.cpp(1139) : error C2059: syntax error : '{'
1>..\..\..\projects\test\xyz.cpp(1139) : error C2143: syntax error : missing   ';' before '{'
1>..\..\..\projects\test\xyz.cpp(1139) : error C2143: syntax error : missing ';' before '}'


    



    where AVRational (ffmpeg.org library) is defined as :

    



    typedef struct AVRational{
    int num; ///< numerator
    int den; ///< denominator
} AVRational;


    



    FFmpeg come with some pre-define value such as

    



    #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}


    



    which is used as below

    



    av_rescale_q(seek_target, AV_TIME_BASE_Q, pFormatCtx->streams[stream_index]->time_base);


    



    will failed to compile on Visual C++ express 2008

    



    It seem like the same code will be compiled with no error/warning on gcc compiler. Why I get this error on VC++ ? Is it a C/C++ standard way to do casting on struct value ? Anyway I can avoid this error while still able to use the defined AV_TIME_BASE_Q ?