Recherche avancée

Médias (91)

Autres articles (54)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

Sur d’autres sites (3792)

  • Concatenating *.mkv files using ffmpeg

    25 mars 2020, par Daniel F

    I’ve just about lost my mind on this, I’m sure I’m missing something simple.

    I have two *.mkv files generated by OBS. Even better, I’ve just copied one file twice, so I am sure I have the same bitrate, fps, tbn, whatever.

    then I do :

    ffmepg -i "concat:file1.mkv|file1_copy.mkv" -c copy test.mkv

    It runs and my screen fills with yellow messages :

       ffmpeg -i "concat:file1.mkv|file1_copy.mkv" -c copy test.mkv
    ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.1.1 (GCC) 20190807
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    Input #0, matroska,webm, from 'concat:file1.mkv|file1_copy.mkv':
     Metadata:
       ENCODER         : Lavf58.20.100
     Duration: 00:00:09.15, start: 0.000000, bitrate: 2006 kb/s
       Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
       Metadata:
         DURATION        : 00:00:09.150000000
       Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
       Metadata:
         title           : simple_aac_recording
         DURATION        : 00:00:09.102000000
    Output #0, matroska, to 'test.mkv':
     Metadata:
       encoder         : Lavf58.29.100
       Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 60 tbr, 1k tbn, 1k tbc (default)
       Metadata:
         DURATION        : 00:00:09.150000000
       Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, fltp (default)
       Metadata:
         title           : simple_aac_recording
         DURATION        : 00:00:09.102000000
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [matroska,webm @ 00000156ce7f14c0] File extends beyond end of segment.
    [matroska @ 00000156cef62040] Non-monotonous DTS in output stream 0:0; previous: 9100, current: 0; changing to 9100. This may result in incorrect timestamps in the output file.
    [matroska @ 00000156cef62040] Non-monotonous DTS in output stream 0:0; previous: 9100, current: 67; changing to 9100. This may result in incorrect timestamps in the output file.
    [matroska @ 00000156cef62040] Non-monotonous DTS in output stream 0:0; previous: 9100, current: 33; changing to 9100. This may result in incorrect timestamps in the output file.
    [matroska @ 00000156cef62040] Non-monotonous DTS in output stream 0:1; previous: 9102, current: 0; changing to 9102. This may result in incorrect timestamps in the output file.
    [matroska @ 00000156cef62040] Non-monotonous DTS in output stream 0:0; previous: 9100, current: 17; changing to 9100. This may result in incorrect timestamps in the output file.

    ############## thousands of the above lines here #####################

    frame= 1098 fps=0.0 q=-1.0 Lsize=    2241kB time=00:00:09.11 bitrate=2013.0kbits/s speed=24.9x
    video:2068kB audio:159kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.607770%

    When opened, the timestamps only go to the end of the first segment, even though the video continues afterwards. Normally this would be fine, but I’m recording instructional videos and it would be nice for users to be able to skip around them. This occurs even if I re-encode the videos (which I shouldn’t need, since they are identical) or re-encode the output.

    Everything I have read online says :

    • re-encode*into .mkv to fix this, since .mkv has a fixed tbn - it’s already .mkv

    • the problem is different bitrates/tbs/fps/whatever - for now, they’re the same video twice

    • use -fflags +genpts, -use_wallclock_as_timestamps 1, vsync 0 -enc_time_base -1 - none of these do anything as far as I can tell, either before -i or after -c copy

    I’ve run out of ideas. What am I doing wrong.

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


    


  • Matching a specific media format with ffmpeg/avconv

    5 mai 2020, par Markus A.

    I need to encode a video from static images in such a way that it format-matches another one so I can splice the video streams together.

    



    Here is the mediainfo of the file I'm trying to match :

    



    Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.1
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : 7
Duration                                 : 2mn 46s
Bit rate                                 : 1 614 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Stream size                              : 32.0 MiB (87%)
Color primaries                          : BT.601 PAL
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601


    



    So far, what I have been able to come up with is the following :

    



    avconv -f image2 -framerate 1.2 -i loop_%d.tif -c:v libx264 -preset veryslow -profile:v baseline -level:v 31 -b:v 1614K -refs 1 loop.flv


    



    This gets me to :

    



    Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.1
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : 7
Duration                                 : 2s 917ms
Bit rate                                 : 1 614 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 1.200 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 1.459
Stream size                              : 575 KiB
Writing library                          : x264 core 142 r2431 a5831aa
Encoding settings                        : cabac=0 / ref=1 / deblock=1:0:0 / analyse=0x1:0x131 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / 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=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=abr / mbtree=1 / bitrate=1614 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00


    



    Which, unfortunately, still isn't good enough as VLC Media Player crashes hard (just closes), logging main error: Failed to compensate for the format changes, removing all filters; main error: Failed to create video converter as soon as the stream splice occurs. I tried splicing another stream in that does have the exact same encoding, and it works fine. I'm also making sure to only splice on key-frames and I am including the NALU containing the AVCDecoderConfigRecord, so I'm pretty sure I'm not doing anything else wrong, especially since a couple other programs are fine with the splice. It's just VLC that expects an even closer match.

    



    Here are things I've tried :

    



      

    • Adding -vsync 2 to get variable frame rate mode. Doesn't change anything.
    • 


    • Adding -color_primaries bt470bg -color_trc gamma28 -colorspace bt470bg to try to get BT.601 PAL settings (several websites mentioned this). Doesn't change anything.
    • 


    • Adding -s ntsc to set the standard to NTSC. This also changes the resolution to 720x480 (not OK), and specifying -s 1280x720 in addition gets rid of the NTSC tag again.
    • 


    



    If anyone knows what flags I need to supply to get closer, that would be super-helpful ! The stream I'm trying to match is encoded on an Android device (it's a live-stream), so I'm assuming it is built using the standard Android MediaCoder framework, in case that helps.