Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (65)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (6803)

  • ffmpeg send udp stream

    26 avril 2017, par Luzwitz

    I stream my screen and i want send stream on a server with udp.

    So, I have this command :

    ffmpeg -ss 00:00:00 -s 1920x1080 -f x11grab -i :0.0+0,0 -copyts -vf "scale=-1:min(ih*1920/iw\,1080),pad=1920:1080:(1920-iw)/2:(1080-ih)/2:black" -c:v libvpx -b:v 4M -crf 16 -quality realtime -cpu-used 8 -c:a libvorbis -f webm udp://127.0.0.1:8080

    And server in C :

    int sock, clientlen, n, port = 8080;
    char buf[1024], *host;

    FILE *file;

    struct sockaddr_in serveraddr;
    struct sockaddr_in clientaddr;
    struct hostent *hostp;

    sock = socket(AF_INET, SOCK_DGRAM, 0);

    bzero((char *) &serveraddr, sizeof(serveraddr));

    serveraddr.sin_family = AF_INET;
    serveraddr.sin_addr.s_addr = htonl(INADDR_ANY);
    serveraddr.sin_port = htons((unsigned short)port);

    if(bind(sock, (struct sockaddr *) &serveraddr, sizeof(serveraddr)) < 0)
       clientlen = sizeof(clientaddr);

    file = fopen("out.webm", "wb"));

    printf("En attente de données...\n");

    while(1)
    {
       bzero(buf, 1024);

       n = recvfrom(sock, buf, 1024, 0, (struct sockaddr *) &clientaddr, &clientlen);

       hostp = gethostbyaddr((const char *)&clientaddr.sin_addr.s_addr, sizeof(clientaddr.sin_addr.s_addr), AF_INET);

       host = inet_ntoa(clientaddr.sin_addr);

       fwrite(buf, n, 1, file);
    }

    And, when i play out.webm, i haven’t video.

  • ffmpeg concat only continues audio, not video

    23 avril 2017, par Stefan

    I’m trying to concat 3 videos with ffmpeg. Here the code I use.

    ffmpeg -f concat -safe 0 -i c:/ffmpeg/data/mylist.txt -c copy output.mp4

    In my first try the first video played for the set time and then nothing more happened. There I tried to sync the audio and ran the following on all videos.

    ffmpeg -i c:/ffmpeg/data/intro.mp4 -af apad -c:v copy -b:a 384k -shortest -avoid_negative_ts make_zero -fflags +genpts intro.mp4

    After running the concat again, now the audio from all 3 files play throughout the video, but only the video from the first video shows throughout the whole video.

    I’ve tried to to get the video tracks in the same encoding with the following without any changed in th concat result.

    ffmpeg -i c:/ffmpeg/data/video1.mp4 -r 24 video1.mp4

    AND

    ffmpeg -i c:/ffmpeg/data/video1.mp4 -af apad -c:v copy -b:v 64k -b:a 384k -shortest -avoid_negative_ts make_zero -fflags +genpts video1.mp4

    Here the ffprobe results for the 3 videos

    * FILE1 - INTRO *

    [STREAM]
    index=0
    codec_name=mpeg4
    codec_long_name=MPEG-4 part 2
    profile=Simple Profile
    codec_type=video
    codec_time_base=9899/237568
    codec_tag_string=mp4v
    codec_tag=0x7634706d
    width=1920
    height=1080
    coded_width=1920
    coded_height=1080
    has_b_frames=0
    sample_aspect_ratio=1:1
    display_aspect_ratio=16:9
    pix_fmt=yuv420p
    level=1
    color_range=N/A
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    quarter_sample=false
    divx_packed=false
    id=N/A
    r_frame_rate=24/1
    avg_frame_rate=237568/9899
    time_base=1/12288
    start_pts=0
    start_time=0.000000
    duration_ts=118788
    duration=9.666992
    bit_rate=7558738
    max_bit_rate=7558738
    bits_per_raw_sample=N/A
    nb_frames=232
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=und
    TAG:handler_name=VideoHandler
    [/STREAM]
    [FORMAT]
    filename=c:/ffmpeg/data/intro.mp4
    nb_streams=1
    nb_programs=0
    format_name=mov,mp4,m4a,3gp,3g2,mj2
    format_long_name=QuickTime / MOV
    start_time=0.000000
    duration=9.667000
    size=9135788
    bit_rate=7560391
    probe_score=100
    TAG:major_brand=isom
    TAG:minor_version=512
    TAG:compatible_brands=isomiso2mp41
    TAG:encoder=Lavf57.72.101
    [/FORMAT]

    * FILE3 - VIDEO1 *

       [STREAM]
    index=0
    codec_name=h264
    codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile=High
    codec_type=video
    codec_time_base=1/48
    codec_tag_string=avc1
    codec_tag=0x31637661
    width=1280
    height=720
    coded_width=1280
    coded_height=720
    has_b_frames=2
    sample_aspect_ratio=1:1
    display_aspect_ratio=16:9
    pix_fmt=yuv420p
    level=31
    color_range=N/A
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    is_avc=true
    nal_length_size=4
    id=N/A
    r_frame_rate=24/1
    avg_frame_rate=24/1
    time_base=1/12288
    start_pts=0
    start_time=0.000000
    duration_ts=470016
    duration=38.250000
    bit_rate=1550579
    max_bit_rate=N/A
    bits_per_raw_sample=8
    nb_frames=918
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=und
    TAG:handler_name=VideoHandler
    [/STREAM]
    [STREAM]
    index=1
    codec_name=aac
    codec_long_name=AAC (Advanced Audio Coding)
    profile=LC
    codec_type=audio
    codec_time_base=1/44100
    codec_tag_string=mp4a
    codec_tag=0x6134706d
    sample_fmt=fltp
    sample_rate=44100
    channels=1
    channel_layout=mono
    bits_per_sample=0
    id=N/A
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/44100
    start_pts=0
    start_time=0.000000
    duration_ts=1679328
    duration=38.080000
    bit_rate=70141
    max_bit_rate=70141
    bits_per_raw_sample=N/A
    nb_frames=1641
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=und
    TAG:handler_name=SoundHandler
    [/STREAM]
    [FORMAT]
    filename=c:/ffmpeg/data/video1.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=38.250000
    size=7778497
    bit_rate=1626875
    probe_score=100
    TAG:major_brand=isom
    TAG:minor_version=512
    TAG:compatible_brands=isomiso2avc1mp41
    TAG:encoder=Lavf57.72.101
    [/FORMAT]

    * FILE3 - OUTRO *

    [STREAM]
    index=0
    codec_name=mpeg4
    codec_long_name=MPEG-4 part 2
    profile=Simple Profile
    codec_type=video
    codec_time_base=3115/74752
    codec_tag_string=mp4v
    codec_tag=0x7634706d
    width=1920
    height=1080
    coded_width=1920
    coded_height=1080
    has_b_frames=0
    sample_aspect_ratio=1:1
    display_aspect_ratio=16:9
    pix_fmt=yuv420p
    level=1
    color_range=N/A
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    quarter_sample=false
    divx_packed=false
    id=N/A
    r_frame_rate=24/1
    avg_frame_rate=74752/3115
    time_base=1/12288
    start_pts=565
    start_time=0.045980
    duration_ts=75325
    duration=6.129964
    bit_rate=3968655
    max_bit_rate=3968655
    bits_per_raw_sample=N/A
    nb_frames=146
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=und
    TAG:handler_name=VideoHandler
    [/STREAM]
    [STREAM]
    index=1
    codec_name=aac
    codec_long_name=AAC (Advanced Audio Coding)
    profile=LC
    codec_type=audio
    codec_time_base=1/44100
    codec_tag_string=mp4a
    codec_tag=0x6134706d
    sample_fmt=fltp
    sample_rate=44100
    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/44100
    start_pts=0
    start_time=0.000000
    duration_ts=268304
    duration=6.083991
    bit_rate=266855
    max_bit_rate=384000
    bits_per_raw_sample=N/A
    nb_frames=262
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=und
    TAG:handler_name=SoundHandler
    [/STREAM]
    [FORMAT]
    filename=c:/ffmpeg/data/outro.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=6.084000
    size=3226018
    bit_rate=4241969
    probe_score=100
    TAG:major_brand=isom
    TAG:minor_version=512
    TAG:compatible_brands=isomiso2mp41
    TAG:encoder=Lavf57.72.101
    [/FORMAT]
  • Video cropping with FFMpeg on Android is very slow [duplicate]

    7 avril 2017, par Rami Jemli

    This question already has an answer here :

    What i tried :

    I am trying to implement video cropping on android using FFMpeg (ffmpeg-android).

    Here is the command I use :

    String[] complexCommand = {"-i", inputPath, "-strict", "experimental", "-vf", "crop=1080:1080:0:0", "-threads", "5", "-c:v", "libx264", "-preset", "ultrafast", filePath};

    The problem :

    Video cropping is working, but even though I am using all needed options to make the operation fast, it still takes a 1min long video the same duration to crop.

    How can I achieve better speeds ?
    Will I need to implement video cropping on server instead of device ?
    Is there another way to implement video cropping on Android instead of FFMpeg ?

    I understand that I can achieve better UX by letting the user edit a cropped TextureView/SurfaceView while doing the actual cropping in background, but I want to avoid this way as it takes more time.

    UPDATE

    Here is FFMpeg’s log output :

    SUCCESS with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
       built with gcc 4.8 (GCC)
       configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
       libavutil      55. 17.103 / 55. 17.103
       libavcodec     57. 24.102 / 57. 24.102
       libavformat    57. 25.100 / 57. 25.100
       libavdevice    57.  0.101 / 57.  0.101
       libavfilter     6. 31.100 /  6. 31.100
       libswscale      4.  0.100 /  4.  0.100
       libswresample   2.  0.101 /  2.  0.101
       libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DCIM/100ANDRO/MOV_0066.mp4':
       Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2017-04-02 11:58:58
       com.android.version: 6.0.1
       Duration: 00:00:59.60, start: 0.000000, bitrate: 17759 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17498 kb/s, SAR 1:1 DAR 16:9, 29.90 fps, 29.92 tbr, 90k tbn, 180k tbc (default)
       Metadata:
       rotate          : 90
       creation_time   : 2017-04-02 11:58:58
       handler_name    : VideoHandle
       Side data:
       displaymatrix: rotation of -90.00 degrees
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)
       Metadata:
       creation_time   : 2017-04-02 11:58:58
       handler_name    : SoundHandle
       [libx264 @ 0xb5bc4400] using SAR=1/1
       [libx264 @ 0xb5bc4400] using cpu capabilities: none!
       [libx264 @ 0xb5bc4400] profile High 4:4:4 Predictive, level 3.2, 4:2:0 8-bit
       [libx264 @ 0xb5bc4400] 64 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x1 me=dia subme=1 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=5 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
       Output #0, mp4, to '/storage/emulated/0/Download/compress_video1.mp4':
       Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       com.android.version: 6.0.1
       encoder         : Lavf57.25.100
       Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080 [SAR 1:1 DAR 1:1], q=-1--1, 29.92 fps, 11488 tbn, 29.92 tbc (default)
       Metadata:
       handler_name    : VideoHandle
       creation_time   : 2017-04-02 11:58:58
       encoder         : Lavc57.24.102 libx264
       Side data:
       unknown side data type 10 (24 bytes)
       Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
       Metadata:
       creation_time   : 2017-04-02 11:58:58
       handler_name    : SoundHandle
       encoder         : Lavc57.24.102 aac
       Stream mapping:
       Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
       Stream #0:1 -> #0:1 (aac (native) -> aac (native))
       Press [q] to stop, [?] for help
       frame=    6 fps=0.0 q

    Any help is greatly appreciated !