Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (17)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

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

Sur d’autres sites (4195)

  • Having trouble obtaining the time from RTP Timestamps obtained through OpenCV

    24 août 2019, par Fr0sty

    I am finding it a bit difficult trying to understand whether or not the hack around with FFmpeg and OpenCV really provided a RTP timestamp. My last post helped a little bit but got me stuck in trying to validate the timestamps obtained through this work around by modifying ffmpeg and opencv.

    FFmpeg version : 4.1.0
    OpenCV version : 3.4.1

    import cv2
    import time
    from datetime import datetime, date

    uri = 'rtsp://admin:password@192.168.1.66:554/Streaming/Channels/101'
    cap = cv2.VideoCapture(uri)
    '''One is the offset between the two epochs. Unix uses an epoch located at 1/1/1970-00:00h (UTC) and NTP uses 1/1/1900-00:00h.
    This leads to an offset equivalent to 70 years in seconds (there are 17 leap years between the two dates so the offset is'''
    time_offset = 2208988800 # (70*365 + 17)*86400 = 2208988800 (in seconds)
    # offset = 3775484294
    days = 43697
    pdat = "1900-01-01 00:00:00:00"
    mdat = "2019-08-23 22:02:44:00" # str(datetime.now()) + str(datetime.now().time())
    pdate = datetime.strptime(pdat, "%Y-%m-%d %H:%M:%S:%f").date()
    mdate = datetime.strptime(mdat, "%Y-%m-%d %H:%M:%S:%f").date()
    delta = (mdate - pdate).days
    offset = delta * 86400
    def time_delta(s):
       return (s - time_offset)

    while True:
       frame_exists, curr_frame = cap.read()
       if frame_exists:
           seconds = cap.getRTPTimeStampSeconds()
           fraction = cap.getRTPTimeStampFraction()
           timestamp = cap.getRTPTimeStampTs()
           unix_offset = seconds - time_offset
           msec = int((int(fraction) / 0xFFFFFFFF) * 1000.0)
           ts = float(str(unix_offset) + "." + str(msec))
           # print("Timestamp per Frame:%i" % timestamp)
           print((datetime.fromtimestamp(float(ts) + offset)))
    cap.release()

    My Output :

    On August 23, 2019 at 22:02

    ...
    2019-08-23 13:59:52.781000
    2019-08-23 13:59:52.726000
    2019-08-23 13:59:52.671000
    2019-08-23 13:59:52.616000
    2019-08-23 13:59:52.561000
    2019-08-23 13:59:52.506000
    2019-08-23 13:59:52.451000
    2019-08-23 13:59:52.396000
    2019-08-23 13:59:52.342000
    2019-08-23 13:59:52.287000
    2019-08-23 13:59:52.232000
    2019-08-23 13:59:52.177000
    2019-08-23 13:59:52.122000
    2019-08-23 13:59:52.067000
    2019-08-23 13:59:52.012000
    2019-08-23 13:59:53.570000
    2019-08-23 13:59:53.020000
    2019-08-23 13:59:53.847000
    2019-08-23 13:59:53.792000

    I’ve noticed how the time increments weirdly (that’s not suppose to happen in the real, current time), such as the last two lines and a few others in between in the output. A bit flabbergasted as to what went wrong. Also trying this out on multiple IP cameras, with each showing a different timestamp probably related to when they were turned on.

  • ffmpeg - over 1000 files into a mp4

    20 octobre 2013, par Fabrizio

    I am using FreeBSD and ffmpeg and I am trying to convert over 1000 files into an mp4. Keep in mind that I am completely NEW to ffmpeg and that in the future I might have up to 3600 images.

    I was thinking that simply executing :

    ffmpeg -i /usr/local/www/tmp/phpFa5LT3/*.jpg -r 2 output.mp4

    would work, but I keep getting

    ffmpeg version 0.7.12, Copyright (c) 2000-2011 the FFmpeg developers
     built on Jun  9 2013 12:48:13 with gcc 4.2.1 20070831 patched [FreeBSD]
     configuration: --prefix=/usr/local --mandir=/usr/local/man --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --cc=cc --extra-cflags='-msse -I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-pthread --disable-debug --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libcelt --disable-libdirac --disable-libfaac --enable-libfreetype --enable-frei0r --disable-libgsm --disable-libmp3lame --enable-libopencv --enable-libopenjpeg --disable-librtmp --enable-libschroedinger --disable-ffplay --disable-libspeex --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
     libavutil    50. 43. 0 / 50. 43. 0
     libavcodec   52.123. 0 / 52.123. 0
     libavformat  52.111. 0 / 52.111. 0
     libavdevice  52.  5. 0 / 52.  5. 0
     libavfilter   1. 80. 0 /  1. 80. 0
     libswscale    0. 14. 1 /  0. 14. 1
     libpostproc  51.  2. 0 / 51.  2. 0
    Input #0, image2, from '20131019205500.jpg':
     Duration: 00:00:00.50, start: 0.000000, bitrate: N/A
       Stream #0.0: Video: mjpeg, yuvj420p, 320x240 [PAR 96:96 DAR 4:3], 2 tbr, 2 tbn, 2 tbc
    Too many output files

    When I try :

    ffmpeg -y -f image2 -r 4 -i /usr/local/www/tmp/phpFa5LT3/%14d.jpg output.mp4

    I get :

    [same output but last line reads]
    /usr/local/www/tmp/phpFa5LT3/%12d.jpg: No such file or directory

    If I reduce the number of files to just a 100 or so, I can do it without any problems... Do you know what the problem might be ?

    #ulimit -a
    cpu time               (seconds, -t)  unlimited
    file size           (512-blocks, -f)  unlimited
    data seg size           (kbytes, -d)  33554432
    stack size              (kbytes, -s)  524288
    core file size      (512-blocks, -c)  unlimited
    max memory size         (kbytes, -m)  unlimited
    locked memory           (kbytes, -l)  unlimited
    max user processes              (-u)  5547
    open files                      (-n)  230400
    virtual mem size        (kbytes, -v)  unlimited
    swap limit              (kbytes, -w)  unlimited
    sbsize                   (bytes, -b)  unlimited
    pseudo-terminals                (-p)  unlimited
  • ffmpeg wave audio and avi video format merge

    12 mai 2016, par Eranga Dayarathne

    when i used in cmd for merge that it merge successfully ,here is sample code,

    ffmpeg -i "D :\Developments\Video Capture\My video capture\WindowsFormsApplication1\bin\Debug\Video\uuu.wav" -i "D :\Developments\Video Capture\My video capture\WindowsFormsApplication1\bin\Debug\Video\1.avi" -acodec copy -vcodec copy "D :\Developments\Video Capture\My video capture\WindowsFormsApplication1\bin\Debug\Video\output.avi"

    but here is sample code i used in c# application form,

      string Path_FFMPEG = Application.StartupPath + "\\ffmpeg.exe";
           string Wavefile = Application.StartupPath + "\\Video\\uuu.wav";
           string video1 = Application.StartupPath + "\\Video\\1.avi";
           string file = Application.StartupPath + "\\Video\\text.txt";
           string strResult = Application.StartupPath + "\\Video\\output.avi";
           System.Diagnostics.Process proc = new System.Diagnostics.Process();
           try
           {

               proc.StartInfo.FileName = Path_FFMPEG;
               proc.StartInfo.Arguments = string.Format("ffmpeg -i {0} -i {1} -acodec copy -vcodec copy {2}", Wavefile, video1, strResult);
               proc.StartInfo.UseShellExecute = false;
               proc.StartInfo.CreateNoWindow = false;
               proc.StartInfo.RedirectStandardOutput = true;
               proc.StartInfo.RedirectStandardError = true;

               proc.Start();

               string StdOutVideo = proc.StandardOutput.ReadToEnd();
               string StdErrVideo = proc.StandardError.ReadToEnd();
           }
           catch { }
           finally
           {
               proc.WaitForExit();
               proc.Close();
           }

    here is outpu error....

    FFmpeg version SVN-r23607, Copyright (c) 2000-2010 the FFmpeg developers
    built on Jun 15 2010 04:09:35 with gcc 4.4.2
    configuration : —target-os=mingw32 —enable-runtime-cpudetect —enable-avisynth —enable-gpl —enable-version3 —enable-bzlib —enable-libgsm —enable-libfaad —enable-pthreads —enable-libvorbis —enable-libtheora —enable-libspeex —enable-libmp3lame —enable-libopenjpeg —enable-libxvid —enable-libschroedinger —enable-libx264 —extra-libs=’-lx264 -lpthread’ —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-librtmp —extra-libs=’-lrtmp -lpolarssl -lws2_32 -lwinmm’ —arch=x86 —cross-prefix=i686-mingw32- —cc=’ccache i686-mingw32-gcc’ —enable-memalign-hack
    libavutil 50.19. 0 / 50.19. 0
    libavcodec 52.76. 0 / 52.76. 0
    libavformat 52.68. 0 / 52.68. 0
    libavdevice 52. 2. 0 / 52. 2. 0
    libavfilter 1.20. 0 / 1.20. 0
    libswscale 0.11. 0 / 0.11. 0
    Unable to find a suitable output format for ’ffmpeg’

    please help me to fix this problem..