Recherche avancée

Médias (91)

Autres articles (91)

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

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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (17047)

  • ffmpeg live stream to Youtube command line

    30 juin 2020, par brainoverflowse

    Would anyone assist myself with creating the correct ffmpeg command line for an audio and video rtsp camera feed that is 1440 and scale it to 1080 with a max bitrate of 10000 ?

    


  • Freezing frames and demux errors

    23 novembre 2015, par f.rodrigues

    I’m trying to join some video clips using ffmpeg via python script using subprocess.

    Here’s a section of the code :

    def join_videos(videos):
       # videos is a list of tuples with (file_name, start_point, duration)
       path = os.path.dirname(__file__)

       # create a new video file containg only the desired bit, it will be named output_N.mov
       for out_n, (file_name, start, duration) in enumerate(videos, 1):
           video_path = path + "/VIDEOS/" + file_name
           ## essentialy ffmpeg -i %PATH_TO_VIDEO -ss %STARTING_POINT -c copy -t %DURATION output_%NUMBER.mov
           command = ["ffmpeg", "-i",video_path,"-ss", str(start),"-c","copy","-t",str(duration),"output_%i.mov"%out_n]
           subprocess.Popen(command, stderr=subprocess.PIPE, stdout=subprocess.PIPE)

       # get the list of files with this pattern
       files = glob.glob("output_*.mov")
       # add them to a text file
       with open("to_merge_tmp.txt", 'w') as f:
           for file_name in files:
               f.write("file '{path}/{file_name}'\n".format(**locals()))
       # use 'ffmpeg' to concatenate
       command = "ffmpeg -f concat -i to_merge_tmp.txt -c copy final.mov"
       subprocess.Popen(command.split(" "), stderr=subprocess.PIPE, stdout=subprocess.PIPE)

    I issue a new video to be made using a list of file names and desired start point and duration.

    ex :

    videos = [('video1.mov', 15.5, 10), # video1, starting at 15.5 seconds, duration of 10 seconds
             ('video2.mov', 10.7, 5),
             ('video3.mov', 0, 20)]
    join_videos(videos)

    this will generate a final.mov file with the parts joined together (one after the other)

    The program runs fine. No errors or anything.

    But when I try to play it, I have some frames that stay for too long (freezing), the audio plays normaly.

    I made a second script to play it programmaticly using the python bindings for VLC

    Here’s it :

    import vlc

    instance = vlc.Instance()
    media = instance.media_new("final.mov")
    player = instance.media_player_new()
    player.set_media(media)
    player.play()

    while player.is_playing():
        pass

    instance.vlm_release()
    player.release()
    instance.release()

    With this I get a bunch of warning when playing the files.

    for instance, this happens and the video doesn’t play (demux error)

    [0x7f4e64009528] mp4 demux error: MP4 plugin discarded (no moov,foov,moof box)  
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f4e64025be0] moov atom not found
    [0x7f4e64009528] avformat demux error: Could not open /medi /.../final.mov: Unknown error 1052488119

    And this happens, the video plays but with the freezing frames.

    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Non-reference picture received and no reference available
    [h264 @ 0x7fe76c0e5280] decode_slice_header error
    [h264 @ 0x7fe76c0e5280] concealing 1080 DC, 1080 AC, 1080 MV errors
    Non-reference picture received and no reference available
    [h264 @ 0x7fe76c0e5820] decode_slice_header error
    [h264 @ 0x7fe76c0e5820] concealing 1080 DC, 1080 AC, 1080 MV errors
    [0x7fe740001248] main vout display error: Failed to resize display

    or this one, which stops the playback midway and crashes the program.

    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Non-reference picture received and no reference available
    [h264 @ 0x7f5c3c0c0000] decode_slice_header error
    [h264 @ 0x7f5c3c0c0000] concealing 1080 DC, 1080 AC, 1080 MV errors
    Non-reference picture received and no reference available
    [h264 @ 0x7f5c3c0c0440] decode_slice_header error
    [h264 @ 0x7f5c3c0c0440] concealing 1080 DC, 1080 AC, 1080 MV errors
    [h264 @ 0x7f5c3c0c0440] Reinit context to 1280x720, pix_fmt: 12
    Non-reference picture received and no reference available
    [h264 @ 0x7f5c3c0c09e0] decode_slice_header error
    Non-reference picture received and no reference available
    [h264 @ 0x7f5c3c0befa0] decode_slice_header error

    I don’t know whats going on, I’m pretty sure it’s how the ffmpeg joins the files.

    EDIT

    As I found here, the moov atom not found error happens when a video recorder crashes when creating the file. But I find it hard to understand why this happens and doesn’t show any error when creating those files.

  • Android ffmpeg very slow to transcode

    23 mars 2016, par Nat

    In Android phones (different phone models) it takes ffmpeg 5x the length of the video to transcode. A 1-minute video takes near 5 minutes to transcode. I have tried the following to improve performance and nothing has helped,

    -b:v 16K to 1024K
    -s 180x120 to 1920x1080
    -preset ultrafast
    -profile:v baseline
    -r 24 to 100
    maxrate 64K to 512K
    rate 64K to 512K
    -threads 0 to 16

    Nothing seems to help. Of course, some of them bring the speed up to 3x from 5x.

    Please help as I have run out of options.

    My current code is,

    ffmpeg -y -i /storage/emulated/0/DCIM/Camera/VID_20150819_220414.mp4 -strict experimental -s 480x270 -vcodec libx264 -r 24 -c:a copy /storage/emulated/0/Android/data/<myapp>/cache/VID_-K-qMCldTSzZomKakNzq.mp4
    </myapp>

    Console log -----

    configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib
    libavutil      51. 54.100 / 51. 54.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavcodec     54. 23.100 / 54. 23.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavformat    54.  6.100 / 54.  6.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavdevice    54.  0.100 / 54.  0.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libavfilter     2. 77.100 /  2. 77.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libswscale      2.  1.100 /  2.  1.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libswresample   0. 15.100 /  0. 15.100
    10-05 10:29:22.288: V/VideoEditor(7655): shellOut:   libpostproc    52.  0.100 / 52.  0.100
    10-05 10:29:22.740: V/VideoEditor(7655): shellOut: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DCIM/Camera/VID_20151002_152817.mp4':
    10-05 10:29:22.740: V/VideoEditor(7655): shellOut:   Metadata:
    10-05 10:29:22.741: V/VideoEditor(7655): shellOut:     major_brand     : mp42
    10-05 10:29:22.741: V/VideoEditor(7655): shellOut:     minor_version   : 0
    10-05 10:29:22.742: V/VideoEditor(7655): shellOut:     compatible_brands: isommp42
    10-05 10:29:22.742: V/VideoEditor(7655): shellOut:     creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.743: V/VideoEditor(7655): shellOut:   Duration: 00:01:14.13, start: 0.000000, bitrate: 17112 kb/s
    10-05 10:29:22.745: V/VideoEditor(7655): shellOut:     Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 16991 kb/s, SAR 65536:65536 DAR 16:9, 29.84 fps, 29.85 tbr, 90k tbn, 180k tbc
    10-05 10:29:22.745: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.747: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.748: V/VideoEditor(7655): shellOut:       handler_name    : VideoHandle
    10-05 10:29:22.749: V/VideoEditor(7655): shellOut:     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 96 kb/s
    10-05 10:29:22.749: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.750: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.751: V/VideoEditor(7655): shellOut:       handler_name    : SoundHandle
    10-05 10:29:22.760: V/VideoEditor(7655): shellOut: [buffer @ 0xb5caa0a0] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 sar:65536/65536 sws_param:flags=2
    10-05 10:29:22.760: V/VideoEditor(7655): shellOut: [buffersink @ 0xb5caa0d0] No opaque field provided
    10-05 10:29:22.802: V/VideoEditor(7655): shellOut: [scale @ 0xb5caa100] w:1920 h:1080 fmt:yuv420p sar:65536/65536 -> w:720 h:404 fmt:yuv420p sar:404/405 flags:0x4
    10-05 10:29:22.803: V/VideoEditor(7655): shellOut: [libx264 @ 0xb5c28000] using SAR=1/1
    10-05 10:29:22.818: V/VideoEditor(7655): shellOut: [libx264 @ 0xb5c28000] using cpu capabilities: ARMv6 NEON
    10-05 10:29:22.904: V/VideoEditor(7655): shellOut: [libx264 @ 0xb5c28000] profile High, level 3.0
    shellOut: [libx264 @ 0xb5c28000] 264 - core 125 r680+1521 37be552 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    10-05 10:29:22.909: V/VideoEditor(7655): shellOut: Output #0, mp4, to '/storage/emulated/0/Android/data/com.myapp/cache/VID_-K-t2E4MtV_RTw4a1JXb.mp4':
    10-05 10:29:22.910: V/VideoEditor(7655): shellOut:   Metadata:
    10-05 10:29:22.911: V/VideoEditor(7655): shellOut:     major_brand     : mp42
    10-05 10:29:22.912: V/VideoEditor(7655): shellOut:     minor_version   : 0
    10-05 10:29:22.913: V/VideoEditor(7655): shellOut:     compatible_brands: isommp42
    10-05 10:29:22.913: V/VideoEditor(7655): shellOut:     creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.914: V/VideoEditor(7655): shellOut:     encoder         : Lavf54.6.100
    10-05 10:29:22.916: V/VideoEditor(7655): shellOut:     Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 720x404 [SAR 1:1 DAR 180:101], q=-1--1, 512 kb/s, 24 tbn, 24 tbc
    10-05 10:29:22.916: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.917: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.918: V/VideoEditor(7655): shellOut:       handler_name    : VideoHandle
    10-05 10:29:22.919: V/VideoEditor(7655): shellOut:     Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, mono, 96 kb/s
    10-05 10:29:22.920: V/VideoEditor(7655): shellOut:     Metadata:
    10-05 10:29:22.921: V/VideoEditor(7655): shellOut:       creation_time   : 2015-10-02 22:29:32
    10-05 10:29:22.922: V/VideoEditor(7655): shellOut:       handler_name    : SoundHandle
    10-05 10:29:22.922: V/VideoEditor(7655): shellOut: Stream mapping:
    10-05 10:29:22.923: V/VideoEditor(7655): shellOut:   Stream #0:0 -> #0:0 (h264 -> libx264)
    10-05 10:29:22.924: V/VideoEditor(7655): shellOut:   Stream #0:1 -> #0:1 (copy)
    10-05 10:29:22.924: V/VideoEditor(7655): shellOut: Press [q] to stop, [?] for help
    10-05 10:29:23.637: V/VideoEditor(7655): shellOut: frame=    6 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s    
    10-05 10:29:24.205: V/VideoEditor(7655): shellOut: frame=   12 fps= 10 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s    
    10-05 10:29:24.735: I/chromium(7655): [INFO:CONSOLE(25)] "No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.", source: file:///android_asset/www/plugins/cordova-plugin-whitelist/whitelist.js (25)
    10-05 10:29:24.756: V/VideoEditor(7655): shellOut: frame=   17 fps=9.8 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=1    
    10-05 10:29:25.327: V/VideoEditor(7655): shellOut: frame=   22 fps=9.5 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=2    
    10-05 10:29:25.904: V/VideoEditor(7655): shellOut: frame=   26 fps=9.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=4