Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (36)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (4745)

  • PHP memory issue when executing FFMPEG in CGI module but works from shell in CentOs

    28 mai 2016, par sam rolfe

    I am trying to execute FFMPEG on my VPS server however it is failing due to memory problems. The PHP calls an shell_exec($cmd) on FFMPEG and this throws the memory allocation error. However if I call the exact same FFMPEG command from shell it works.

    Even STRANGER is if I call the php script with the shell_exec($cmd) from shell - then it works.

    I am sorry if I have not phrased this correctly. But I really feel as though this is a memory issue from the PHP being executed in the browser window via the CGI exe - as when it is run from within the shell it is obviously able to maintain the memory level. I am desperate to get this to work and have been researching all week.

    I looked at system("ulimit -a") ;

    core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 1546994 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 16384 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 400 virtual memory (kbytes, -v) 1048576 file locks (-x) unlimited file locks (-x) unlimited

    The PHP is running as a suphp CGI I have set the php.ini memory to 2G, here are the details of things.

    The basic command insude PHP

    $cmd="ffmpeg -hwaccel auto  -i finn.mp4 -y  -pix_fmt yuv410p -s 320x240  -codec:v h264 -c:a copy  -crf 20 -preset slow  0001_finn_test_2.mp4   null >/dev/null 2> ffmpeg_2.log &";

    Output from error log - I can not post the full log as the formatting will not work :

    ffmpeg version N-80079-g4c82cca-vps15452_20160524 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
     configuration: --prefix=/usr --extra-version=vps15452_20160524 --enable-shared --enable-static --enable-libx264 --enable-libass --enable-fontconfig --enable-libfreetype --enable-gpl --enable-nonfree --enable-version3 --enable-libmp3lame --enable-libvpx --enable-libspeex --enable-libwebp --enable-libfaac --enable-libtheora --enable-libvorbis
     libavutil      55. 24.100 / 55. 24.100
     libavcodec     57. 43.100 / 57. 43.100
     libavformat    57. 37.100 / 57. 37.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 46.100 /  6. 46.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'finn.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2016-01-28 09:16:38
     Duration: 00:00:29.93, start: 0.000000, bitrate: 17060 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16991 kb/s, 30.01 fps, 30 tbr, 90k tbn (default)
       Metadata:
         creation_time   : 2016-01-28 09:16:38
         handler_name    : VideoHandle
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
       Metadata:
         creation_time   : 2016-01-28 09:16:38
         handler_name    : SoundHandle
    Incompatible pixel format 'yuv410p' for codec 'libx264', auto-selecting format 'yuv420p'
    [libx264 @ 0x2560c60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264 @ 0x2560c60] profile High, level 1.3
    [libx264 @ 0x2560c60] 264 - core 148 r2694 3b70645 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 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=7 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=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [mp4 @ 0x255ed00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
       Last message repeated 1 times
    Output #0, mp4, to '0001_finn_test_2.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       encoder         : Lavf57.37.100
       Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 320x240, q=2-31, 30 fps, 15360 tbn (default)
       Metadata:
         creation_time   : 2016-01-28 09:16:38
         handler_name    : VideoHandle
         encoder         : Lavc57.43.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 256 kb/s (default)
       Metadata:
         creation_time   : 2016-01-28 09:16:38
         handler_name    : SoundHandle
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [h264 @ 0x29478c0] decode_slice_header error
    [h264 @ 0x29478c0] no frame!
    [h264 @ 0x298eb60] Cannot allocate memory.
    [h264 @ 0x298eb60] Could not allocate memory
    [h264 @ 0x298eb60] h264_slice_header_init() failedError while decoding stream #0:0: Cannot allocate memory
    [h264 @ 0x298eb60] Cannot allocate memory.
    [h264 @ 0x298eb60] Could not allocate memory
    [h264 @ 0x298eb60] h264_slice_header_init() failedError while decoding stream
    [h264 @ 0x298eb60] h264_slice_header_init() failedError while decoding stream #0:0: Cannot allocate memory
    Error writing trailer of 0001_finn_test_2.mp4: Cannot allocate memoryframe=    0 fps=0.0 q=0.0 Lsize=       1kB time=00:00:09.07 bitrate=   0.8kbits/s speed= 103x    
    video:0kB audio:284kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!
  • Conversion of .iva to .mp4 using ffmpeg

    9 juin 2016, par Rupesh Parab

    The video which I am trying to convert is uploaded at http://www.filedropper.com/video_17

    I am using the following command to convert the file :

    ffmpeg -i archive.iva -c copy -map 0 output.mp4 -vsync 2 -y;

    The file should be around 1 min in length but after conversion is of only 7 secs

    What am I doing wrong ?


    Edit

    Console Output :

    rupesh@rupesh-Lenovo-IdeaPad-Y510P:~/video$ ffmpeg -i archive.iva -c copy -map 0 output.mp4 -vsync 2 -y;
    ffmpeg version N-80026-g936751b Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
     configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
     libavutil      55. 24.100 / 55. 24.100
     libavcodec     57. 42.100 / 57. 42.100
     libavformat    57. 36.100 / 57. 36.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 45.100 /  6. 45.100
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [mjpeg @ 0x3a2eda0] Format mjpeg detected only with low score of 25, misdetection possible!
    Input #0, mjpeg, from 'archive.iva':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 25 fps, 25 tbr, 1200k tbn
    [mp4 @ 0x3a309c0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Output #0, mp4, to 'output.mp4':
     Metadata:
       encoder         : Lavf57.36.100
       Stream #0:0: Video: mjpeg (l[0][0][0] / 0x006C), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, q=2-31, 25 fps, 25 tbr, 1200k tbn
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=  190 fps=0.0 q=-1.0 Lsize=    5909kB time=00:00:07.56 bitrate=6403.2kbits/s speed= 127x    
    video:5908kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.026134%
  • Slow audio-video sync drift when merging wav and mp4 with ffmpeg

    30 mai 2016, par charlie80

    I have an mp4 file with only a single video stream (no audio) and a wav audio file that I would like to add to the video using ffmpeg. The audio and the video have been recorded simultaneously during a conference, the former from a mixer output on a PC and the latter from a digital videocamera.

    I am using this ffmpeg command :

    ffmpeg -i incontro3.mp4 -itsoffset 18.39 -i audio_mix.wav -c:v copy -c:a aac final-video.mp4

    where I’m using the -itsoffset 18.39 option since I know that 18.39s is the video-audio delay.

    The problem I’m experiencing is that in the output file, while the audio is perfectly in sync with the video at the beginning, it slowly drifts out of sync during the movie.

    The output if ffprobe on the video file is :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'incontro3.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.25.100
     Duration: 00:47:22.56, start: 0.000000, bitrate: 888 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 886 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
       Metadata:
         handler_name    : VideoHandler

    and the ffprobe output for the audio file is :

    Input #0, wav, from 'audio_mix.wav':
     Metadata:
       track           : 5
       encoder         : Lavf57.25.100
     Duration: 00:46:32.20, bitrate: 1411 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

    I’m using the latest ffmpeg Zeranoe windows build git-9591ca7 (2016-05-25).

    Thanks in anticipation for any help/ideas !


    UPDATE 1 : It looks like the problem is upstream the video-audio merging, and could be in the concatenation and conversion of the MTS files generated by the video camera into the mp4 video. I will follow up as I make any progress in understanding...


    UPDATE 2 : The problem is not in the initial merging of the MTS files generated by the camera. Or, at least, it occurs identically if I merge them with cat or with ffmpeg -f concat


    UPDATE 3 : Following @Mulvya’s suggestion, I observed that the drift rate is constant (at least as far as I can tell judging by eye). I also tried to superimpose the A/V tracks with another software, and the drift is exactly the same, thereby ruling out ffmpeg as culprit. My (bad) feeling is that the issue could be related to the internal clocks of the digital video camera and the laptop used for audio recording running at slightly different rates (see here the report of an identical issue I just found).