Recherche avancée

Médias (91)

Autres articles (73)

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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (12174)

  • Different results using qt-faststart and "ffmpeg -movflags +faststart"

    31 mars 2020, par Juan Ignacio Sánchez

    I have a set of videos generated by security cameras, which have the MOOV atom at the end of the file, like this :

    ftyp (32 bytes)
    free (8 bytes)
    mdat (29647845 bytes)
    moov (42054 bytes)

    I want to serve these files using progressive downloads (pseudo streaming) and it’s the only acceptable way to do it.

    Knowing that I tried to use tools like qt-faststart or directly ffmpeg with the corresponding flags (-movflags +faststart). Other detail is that I’m running this on a low profile machine, and FFmpeg takes like 6 8 seconds to finish (even using -c copy) and the other tool results to be much more efficient since it only moves some bytes, taking less than a second to finish. The thing here is that qt-faststart produces a video that can’t be pseudo streamed but ffmpeg does it. Here are some comparisons :

    ffmpeg :

    ftyp (32 bytes)
    moov (42422 bytes)
    free (8 bytes)
    mdat (29647845 bytes)

    qt-faststart :

    ftyp (32 bytes)
    moov (42054 bytes)
    free (8 bytes)
    mdat (29647845 bytes)

    As you can see, FFmpeg adds some extra bytes on the MOOV atom, can anyone point me in some research direction ? Thank you all.

  • FFmpeg eats all the memory and crash within a minute while recording chrome activity

    17 avril 2020, par Thomas Petit

    I'm using ffmpeg to capture the activity of chrome (thanks to chrome driver) and record it into an mp4 file. However, the memory consumed by ffmpeg is quickly blowing up, and after a minute or so my 8GB of memory get saturated and I have to reboot the PC.

    



    Unbuntu 16.0
ALSA loopback (installed by modprobe snd-aloop)
ffmpeg version 4.2.2-1ubuntu1 16.04.york0

    



    This is the command line to ffmpeg :

    



        ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 
-i :0.0+0,0 -f alsa -thread_queue_size 4096 -i plug:cloop -acodec aac -strict -2 -ar 44100 
-c:v libx264 -preset veryfast -profile:v main -level 3.1 -pix_fmt yuv420p -r 30 
-crf 25 -g 60 -tune zerolatency -f mp4 file.mp4


    



    If I remove all the sound input (-i plug:cloop -acodec aac -strict -2 -ar 44100) then the memory is OK, stable, but the file generated can't be played with VLC or media player.

    



    The logs from ffmpeg looks normal to me :

    



    root$ ffmpeg -rtbufsize 15M -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i hw:0 -acodec ac3_fixed -strict -2 -ar 44100 -c:v libx264 -preset veryfast -profile:v main -level 3.1 -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f mp4 /tmp/recordings/stuff.mp4
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, x11grab, from ':0.0+0,0':
  Duration: N/A, start: 1587042601.295126, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720, 30 fps, 30 tbr, 1000k tbn, 30 tbc
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, alsa, from 'hw:0':
  Duration: N/A, start: 1587042601.304179, bitrate: 1536 kb/s
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[libx264 @ 0x928ee0] using cpu capabilities: MMX2 SSE Cache64
[libx264 @ 0x928ee0] profile Main, level 3.1
Output #0, mpegts, to '/tmp/recordings/stuff.ts':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720, q=-1--1, 30 fps, 90k tbn, 30 tbc
    Metadata:
      encoder         : Lavc56.60.100 libx264
    Stream #0:1: Audio: ac3 (ac3_fixed), 44100 Hz, stereo, s16p, 192 kb/s
    Metadata:
      encoder         : Lavc56.60.100 ac3_fixed
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> ac3 (ac3_fixed))
Press [q] to stop, [?] for help
frame=    7 fps=0.0 q=21.0 size=       5kB time=00:00:00.23 bitrate= 180.5kbits/s frame=   15 fps= 15 q=21.0 size=      15kB time=00:00:00.50 bitrate= 240.6kbits/s frame=   21 fps= 14 q=21.0 size=      21kB time=00:00:00.70 bitrate= 249.2kbits/s frame=   28 fps= 14 q=21.0 size=      28kB time=00:00:00.93 bitrate= 246.5kbits/s frame=   35 fps= 13 q=21.0 size=      35kB time=00:00:01.16 bitrate= 244.9kbits/s frame=   42 fps= 13 q=21.0 size=      44kB time=00:00:01.40 bitrate= 260.0kbits/s frame=   49 fps= 13 q=21.0 size=      51kB time=00:00:01.63 bitrate= 256.9kbits/s frame=   56 fps= 13 q=21.0 size=      58kB time=00:00:01.86 bitrate= 254.6kbits/s frame=   63 fps= 13 q=22.0 size=      66kB time=00:00:02.10 bitrate= 255.7kbits/s frame=   70 fps= 13 q=21.0 size=      75kB time=00:00:02.33 bitrate= 263.0kbits/s frame=   77 fps= 13 q=21.0 size=      82kB time=00:00:02.56 bitrate= 261.3kbits/s frame=   79 fps= 13 q=21.0 Lsize=      85kB time=00:00:02.63 bitrate= 264.4kbits/s
video:8kB audio:61kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 22.604090%
[libx264 @ 0x928ee0] frame I:2     Avg QP: 5.10  size:   760
[libx264 @ 0x928ee0] frame P:77    Avg QP: 6.78  size:    88
[libx264 @ 0x928ee0] mb I  I16..4: 99.9%  0.0%  0.1%
[libx264 @ 0x928ee0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
[libx264 @ 0x928ee0] coded y,uvDC,uvAC intra: 0.0% 0.1% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x928ee0] i16 v,h,dc,p: 91%  0%  9%  0%
[libx264 @ 0x928ee0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%  0%  0%  0%  0%  0%  0%
[libx264 @ 0x928ee0] i8c dc,h,v,p: 98%  2%  0%  0%
[libx264 @ 0x928ee0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x928ee0] kb/s:25.23
Exiting normally, received signal 2.


    



    This is my .asoundrc file.

    



    # playback PCM device: using loopback subdevice 0,0
pcm.amix {
  type dmix
  ipc_key 219345
  slave.pcm "hw:Loopback,0,0"
}

# capture PCM device: using loopback subdevice 0,1
pcm.asnoop {
  type dsnoop
  ipc_key 219346
  slave.pcm "hw:Loopback,0,1"
}

# duplex device combining our PCM devices defined above
pcm.aduplex {
  type asym
  playback.pcm "amix"
  capture.pcm "asnoop"
}

# ------------------------------------------------------
# for jack alsa_in and alsa_out: looped-back signal at other ends
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}

pcm.cloop {
  type dsnoop
  ipc_key 219348
  slave.pcm "hw:Loopback,1,0"
}

# ------------------------------------------------------
# default device

pcm.!default {
  type plug
  slave.pcm "aduplex"
}


    



    I'm not sure how to debug this kind of issue, any idea why the memory blow up so fast like that ?

    


  • Edit H264 video stream header information ("start_pts" and "start_time")

    27 juin 2020, par David

    I have a video clip that appears to be slightly corrupted. Does not play on VLC but works on Potplayer. I used FFprobe to get information on the video.

    


    The problem appears to be with the start points of the video stream :

    


    time_base=1/90000
start_pts=585050940
start_time=6500.566000
duration_ts=585050940
duration=6500.566000
bit_rate=3123218


    


    I'm just wondering whether it is possible to manually edit the "start_pts" and "start_time" to 0 ? Is there any specific software to do this ? Due to large size of video file, I couldn't load it in Notepad++.

    


    Full ffprobe output shown below :

    


    # ffprobe output

[streams.stream.0]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=unknown
codec_type=video
codec_time_base=1/60
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920
coded_height=1080
closed_captions=0
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=unknown
level=-99
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30/1
avg_frame_rate=30/1
time_base=1/90000
start_pts=585050940
start_time=6500.566000
duration_ts=585050940
duration=6500.566000
bit_rate=3123218
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=195017
nb_read_frames=N/A
nb_read_packets=N/A

[streams.stream.0.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0

[streams.stream.0.tags]
language=und
handler_name=VideoHandler

[streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/48000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=312029184
duration=6500.608000
bit_rate=189376
max_bit_rate=189376
bits_per_raw_sample=N/A
nb_frames=304718
nb_read_frames=N/A
nb_read_packets=N/A

[streams.stream.1.disposition]
default=1
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0

[streams.stream.1.tags]
language=eng
handler_name=SoundHandler

[format]
filename=D\:\\Start\\test.mp4
nb_streams=2
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=6500.608000
size=2703218140
bit_rate=3326726
probe_score=100

[format.tags]
major_brand=isom
minor_version=512
compatible_brands=isomiso2avc1mp41