Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (39)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (7894)

  • FFmpeg - Concatenating videos with different resolutions

    7 août 2017, par Jill

    I currently have an android app where the videos get combined using ffmpeg’s concat. That works fine. However, when I add text (using drawtext) to one of the videos, after combining the videos again, the combined video gets distorted. The video with the drawtext shows up fine, but then the videos without text switches orientation.

    I think the problem roots from the fact that a vertical video on my android phone has the resolution of 1920x1080, however if I use that for the scale when executing drawtext, it becomes horizontal.

    I think an example might help explain this better. Let’s say I have 2 vertically recorded videos, and I combine them with concat. The combined video shows up fine. Then if I add text to the 1st video using drawtext, the combined video will then show the first video (with text) at normal orientation (vertical). However, when it transitions to the next video, it first stalls for a couple seconds and then the 2nd video is shown at a horizontal orientation.

    Also, I tried this also with having the aspect ratio as 1:1 so it wouldn’t matter, but the second video’s orientation still changed counter clockwise.

    Thanks for the help, and happy to add more clarification if needed.

    This is for adding the text :

    ffmpeg -i input.mp4 -vf drawbox=y=ih-200:color=black@0.5:width=iw:height=200:t=max
       ,drawtext=fontfile=RobotoRegular.ttf:text='Text':x=(w-text_w)/2:y=(h-text_h)-100:fontsize=70:fontcolor=white
       -c:v libx264 -b:v 17000k -r 30 -preset ultrafast -y output.mp4

    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/Android/data/com.me.app/files/65/VID_20170802_111518.mp4':
                                                          Metadata:
                                                            major_brand     : mp42
                                                            minor_version   : 0
                                                            compatible_brands: isommp42
                                                            creation_time   : 2017-08-02 18:15:20
                                                            com.android.version: 7.0
                                                          Duration: 00:00:00.93, start: 0.000000, bitrate: 16415 kb/s
                                                            Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 16408 kb/s, SAR 1:1 DAR 16:9, 28.94 fps, 30 tbr, 90k tbn, 180k tbc (default)
                                                            Metadata:
                                                              rotate          : 90
                                                              creation_time   : 2017-08-02 18:15:20
                                                              handler_name    : VideoHandle
                                                            Side data:
                                                              displaymatrix: rotation of -90.00 degrees
                                                        [libx264 @ 0xeab7ec00] using SAR=1/1
                                                        [libx264 @ 0xeab7ec00] using cpu capabilities: none!
                                                        [libx264 @ 0xeab7ec00] profile Constrained Baseline, level 4.1
                                                        [libx264 @ 0xeab7ec00] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=17000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
                                                        Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/65/temp.mp4':
                                                          Metadata:
                                                            major_brand     : mp42
                                                            minor_version   : 0
                                                            compatible_brands: isommp42
                                                            com.android.version: 7.0
                                                            encoder         : Lavf57.25.100
                                                            Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=-1--1, 17000 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
                                                            Metadata:
                                                              handler_name    : VideoHandle
                                                              creation_time   : 2017-08-02 18:15:20
                                                              encoder         : Lavc57.24.102 libx264
                                                            Side data:
                                                              unknown side data type 10 (24 bytes)
                                                        Stream mapping:
                                                          Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
                                                        Press [q] to stop, [?] for help
                                                        frame=    6 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed=   0x    
                                                        frame=   10 fps=8.8 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed=   0x    
                                                        frame=   14 fps=8.4 q=15.0 size=     155kB time=00:00:00.03 bitrate=38067.5kbits/s dup=1 drop=0 speed=0.0201x    
                                                        frame=   18 fps=8.0 q=22.0 size=     744kB time=00:00:00.16 bitrate=36592.5kb

    ffmpeg -f concat -safe 0 -i input.mp4 -c copy -y output.mp4

    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
                                                         [mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
                                                         Input #0, concat, from '/storage/emulated/0/Android/data/com.me.app/files/64/TXT_20170802_110325.txt':
                                                           Duration: N/A, start: 0.000000, bitrate: 23403 kb/s
                                                             Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
                                                             Metadata:
                                                               handler_name    : VideoHandler
                                                         Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/64/VID_20170802_110325concat.mp4':
                                                           Metadata:
                                                             encoder         : Lavf57.25.100
                                                             Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=2-31, 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc
                                                             Metadata:
                                                               handler_name    : VideoHandler
                                                         Stream mapping:
                                                           Stream #0:0 -> #0:0 (copy)
                                                         Press [q] to stop, [?] for help
                                                         [mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
                                                         frame=   64 fps=0.0 q=-1.0 Lsize=    5218kB time=00:00:12.30 bitrate=3474.5kbits/s speed= 122x    
                                                         video:5217kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025721%
  • ffmpeg how to encode first then use it for another output

    10 août 2017, par mahdi gh

    I’m trying to capture screen with gdigrab and combine int with a sound and then send it on my decklink sdi device.

    here is my code to capture :

    ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i title="Play" -f dshow -i audio="CABLE Output (VB-Audio Virtual Cable)" -af aresample=resampler=soxr -ar 48000 -acodec pcm_s16le -ac 2 -c:v libx264 -qp 0 -preset ultrafast "output.avi"

    here is my code for output to ffmpeg :

    ffmpeg -i output.avi -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)"

    this way it works, but when I combine these two arguments to send the output to decklink card on the fly, ffmpeg stops working. here is the combination code :

    ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i title="Play" -f dshow -i audio="CABLE Output (VB-Audio Virtual Cable)" -af aresample=resampler=soxr -ar 48000 -acodec pcm_s16le -ac 2  -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)"

    I have tried so many different combinations but no luck. it works only if i store it on a file then use that file as input. Is there a way to tell ffmpeg to use the result of first command as input of second command ?

    Thanks

    Update :
    Here is log report :

       ffmpeg started on 2017-08-08 at 12:26:36
    Report written to "ffmpeg-20170808-122636.log"
    Command line:
    ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i "title=Play" -c:v rawvideo -f dshow -i "audio=CABLE Output (VB-Audio Virtual Cable)" -af "aresample=resampler=soxr" -ar 48000 -acodec pcm_s16le -ac 2 -map 0:v:0 -map 1:a:0 -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)" -report
    ffmpeg version N-71608-ga924b83 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
     libavutil      54. 23.101 / 54. 23.101
     libavcodec     56. 35.101 / 56. 35.101
     libavformat    56. 30.100 / 56. 30.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 14.100 /  5. 14.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Splitting the commandline.
    Reading option '-framerate' ... matched as AVOption 'framerate' with argument '25'.
    Reading option '-thread_queue_size' ... matched as option 'thread_queue_size' (set the maximum number of queued packets from the demuxer) with argument '512'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'gdigrab'.
    Reading option '-i' ... matched as input file with argument 'title=Play'.
    Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'rawvideo'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
    Reading option '-i' ... matched as input file with argument 'audio=CABLE Output (VB-Audio Virtual Cable)'.
    Reading option '-af' ... matched as option 'af' (set audio filters) with argument 'aresample=resampler=soxr'.
    Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '48000'.
    Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'pcm_s16le'.
    Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
    Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v:0'.
    Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:a:0'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'decklink'.
    Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'uyvy422'.
    Reading option 'DeckLink SDI (2)' ... matched as output file.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option report (generate a report) with argument 1.
    Successfully parsed a group of options.
    Parsing a group of options: input file title=Play.
    Applying option thread_queue_size (set the maximum number of queued packets from the demuxer) with argument 512.
    Applying option f (force format) with argument gdigrab.
    Successfully parsed a group of options.
    Opening an input file: title=Play.
    [gdigrab @ 0000000002d3f2a0] Found window Play, capturing 720x576x32 at (0,0)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (588,602) -> (-271,597)
    [gdigrab @ 0000000002d3f2a0] All info found
    Input #0, gdigrab, from 'title=Play':
     Duration: N/A, start: 1502178996.958615, bitrate: 331786 kb/s
       Stream #0:0, 1, 1/1000000: Video: bmp, bgra, 720x576, 331786 kb/s, 25 tbr, 1000k tbn, 25 tbc
    Successfully opened the file.
    Parsing a group of options: input file audio=CABLE Output (VB-Audio Virtual Cable).
    Applying option c:v (codec name) with argument rawvideo.
    Applying option f (force format) with argument dshow.
    Successfully parsed a group of options.
    Opening an input file: audio=CABLE Output (VB-Audio Virtual Cable).
    [dshow @ 0000000002d3c340] Selecting pin Capture on audio only
    dshow passing through packet of type audio size  88200 timestamp 111632750000 orig timestamp 111632750000
    [dshow @ 0000000002d3c340] All info found
    Guessed Channel Layout for  Input Stream #1.0 : stereo
    Input #1, dshow, from 'audio=CABLE Output (VB-Audio Virtual Cable)':
     Duration: N/A, start: 11163.275000, bitrate: 1411 kb/s
       Stream #1:0, 1, 1/10000000: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
    Successfully opened the file.
    Parsing a group of options: output file DeckLink SDI (2).
    Applying option af (set audio filters) with argument aresample=resampler=soxr.
    Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
    Applying option acodec (force audio codec ('copy' to copy stream)) with argument pcm_s16le.
    Applying option ac (set number of audio channels) with argument 2.
    Applying option map (set input stream mapping) with argument 0:v:0.
    Applying option map (set input stream mapping) with argument 1:a:0.
    Applying option f (force format) with argument decklink.
    Applying option pix_fmt (set pixel format) with argument uyvy422.
    Successfully parsed a group of options.
    Opening an output file: DeckLink SDI (2).
    Successfully opened the file.
    detected 2 logical cores
    [graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'video_size' to value '720x576'
    [graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'pix_fmt' to value '30'
    [graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'time_base' to value '1/1000000'
    [graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'pixel_aspect' to value '0/1'
    [graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'sws_param' to value 'flags=2'
    [graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'frame_rate' to value '25/1'
    [graph 0 input from stream 0:0 @ 0000000002dd7ea0] w:720 h:576 pixfmt:bgra tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
    [format @ 0000000002d3df00] compat: called with args=[uyvy422]
    [format @ 0000000002d3df00] Setting 'pix_fmts' to value 'uyvy422'
    [auto-inserted scaler 0 @ 0000000002d44ca0] Setting 'flags' to value '0x4'
    [auto-inserted scaler 0 @ 0000000002d44ca0] w:iw h:ih flags:'0x4' interl:0
    [format @ 0000000002d3df00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
    [AVFilterGraph @ 0000000002e586c0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
    [auto-inserted scaler 0 @ 0000000002d44ca0] w:720 h:576 fmt:bgra sar:0/1 -> w:720 h:576 fmt:uyvy422 sar:0/1 flags:0x4
    [Parsed_aresample_0 @ 0000000002d513a0] Setting 'resampler' to value 'soxr'
    [graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'time_base' to value '1/44100'
    [graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'sample_rate' to value '44100'
    [graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'sample_fmt' to value 's16'
    [graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'channel_layout' to value '0x3'
    [graph 1 input from stream 1:0 @ 0000000002d51460] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
    [audio format for output stream 0:1 @ 0000000002d51520] Setting 'sample_fmts' to value 's16'
    [audio format for output stream 0:1 @ 0000000002d51520] Setting 'sample_rates' to value '48000'
    [audio format for output stream 0:1 @ 0000000002d51520] Setting 'channel_layouts' to value '0x3'
    [AVFilterGraph @ 0000000002d4d0c0] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
    [Parsed_aresample_0 @ 0000000002d513a0] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
    dshow passing through packet of type audio size  88200 timestamp 111637810000 orig timestamp 111637810000
    [decklink @ 0000000002dd6a00] Found Decklink mode 720 x 576 with rate 25.00(i)
    Output #0, decklink, to 'DeckLink SDI (2)':
     Metadata:
       encoder         : Lavf56.30.100
       Stream #0:0, 0, 1/25: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
       Metadata:
         encoder         : Lavc56.35.101 rawvideo
       Stream #0:1, 0, 1/48000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
       Metadata:
         encoder         : Lavc56.35.101 pcm_s16le
    Stream mapping:
     Stream #0:0 -> #0:0 (bmp (native) -> rawvideo (native))
     Stream #1:0 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    Cliping frame in rate conversion by 0.000008
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Encoder did not produce proper pts, making some up.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    *** 40 dup!
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 1.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 2.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 3.
    [decklink @ 0000000002dd6a00] Buffered video frames: 4.
    [decklink @ 0000000002dd6a00] Buffered video frames: 5.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 6.
    [decklink @ 0000000002dd6a00] Buffered video frames: 7.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 8.
    [decklink @ 0000000002dd6a00] Buffered video frames: 9.
    [decklink @ 0000000002dd6a00] Buffered video frames: 10.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 11.
    [decklink @ 0000000002dd6a00] Buffered video frames: 12.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 13.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    dshow passing through packet of type audio size  88200 timestamp 111642810000 orig timestamp 111642810000
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 14.
    [decklink @ 0000000002dd6a00] Ending audio preroll.
    [decklink @ 0000000002dd6a00] Starting scheduled playback.
    [decklink @ 0000000002dd6a00] Buffered video frames: 15.
    [decklink @ 0000000002dd6a00] Buffered video frames: 16.
    [decklink @ 0000000002dd6a00] Buffered video frames: 17.
    [decklink @ 0000000002dd6a00] Buffered video frames: 18.
    [decklink @ 0000000002dd6a00] Buffered video frames: 19.
    [decklink @ 0000000002dd6a00] Buffered video frames: 20.
    [decklink @ 0000000002dd6a00] Buffered video frames: 21.
    [decklink @ 0000000002dd6a00] Buffered video frames: 22.
    [decklink @ 0000000002dd6a00] Buffered video frames: 23.
    [decklink @ 0000000002dd6a00] Buffered video frames: 24.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [decklink @ 0000000002dd6a00] Buffered video frames: 24.
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    frame=   42 fps=0.0 q=0.0 size=N/A time=00:00:01.68 bitrate=N/A dup=40 drop=0    
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    dshow passing through packet of type audio size  88200 timestamp 111647710000 orig timestamp 111647710000
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (814,496) -> (-45,491)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (814,496) -> (-45,491)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
    [gdigrab @ 0000000002d3f2a0] Cursor pos (806,497) -> (-53,492)
  • where to put the watermark png file in this code ?

    15 août 2017, par asif

    this is a line from ffmpeg video converter php script ;

    $ffmpeg." -i ".$video_to_convert." -vcodec flv -f flv -r 30 -b ".$quality."-ab 128000 -ar".$audio." -s ".$size." ".$converted_vids.$name.".".$new_format."

    where :

    .$video_to_convert. = input file

    .$converted_vids.$name. = output file

    .$new_format. ; = file extention format

    now i want to add watermark.png file, if i put any where i got error conversion
    as i added the line logo.png -filter_complex 'overlay in video quality line, i got error

    Error ;

    ffmpeg version N-71954-gbc6f84f Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
     configuration: --prefix=/usr --enable-version3 --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libvpx --enable-libx264 --enable-libxvid --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-postproc --enable-nonfree --enable-pthreads --enable-x11grab --enable-libfaac --enable-libopenjpeg --enable-zlib --disable-doc
     libavutil      54. 23.101 / 54. 23.101
     libavcodec     56. 37.101 / 56. 37.101
     libavformat    56. 31.102 / 56. 31.102
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'uploaded/1502801111_21.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.31.102
     Duration: 00:02:27.32, start: 0.023220, bitrate: 635 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x320 [SAR 1:1 DAR 3:2], 476 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 151 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Please use -b:a or -b:v, -b is ambiguous
    Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_overlay_0

    This is index.php file scipt of conversion :

       v<?php include("templates/header.php");?>

    <div>



    &lt;?php

    require_once('languages/en.php');
    include ("includes/settings.php");
    include("includes/functions.php");
    include("includes/LIB_parse.php");
    include("classes/other.php");
    cron(); // to run cron job to delete all files
    if(isset($_POST['uploader_0_name']) or isset ($_GET['uploaded_name']))
       {
       if(isset($_POST['uploader_0_name']))
       {
    list($_SESSION['original_name'], $ext) = explode('.',$_POST['uploader_0_name']);
    }else{
    $fullname=$_GET['uploaded_name'];
    }
    if(isset($_POST['uploader_0_name']))
       {
    list($_SESSION['original_name'], $ext) = explode('.',$_POST['uploader_0_name']);
    }else{
    list($_SESSION['original_name'], $ext) = explode('.',$_GET['uploaded_name']);
    $_SESSION['original_name']= return_between($_GET['uploaded_name'], '_', "$ext", 'EXCL') ;
    $_SESSION['original_name']= str_replace(".","",$_SESSION['original_name']);
    }
    if(isset($_POST['uploader_0_name']))
       {  
    $fullname=  $_POST['uploader_0_tmpname'];
    }else{
    $fullname=$_GET['uploaded_name'];
    }
    $ext= pathinfo($fullname, PATHINFO_EXTENSION);
    $_SESSION['name']=RemoveExtension($fullname);
    $store_dir="uploaded/";
    $_SESSION['converted_vids']=$converted_vids;
    $_SESSION['temp_dir']=$store_dir;
    // if those directotires don't exist - create them and give them read/write permissions
    if(!is_dir($store_dir)) mkdir($store_dir, 0777);
    if(!is_dir($converted_vids)) mkdir($converted_vids, 0777);
    $extension = substr($fullname, strrpos($fullname, "."));
    $extension = strtolower($extension);
    $video_to_convert=$store_dir.$_SESSION['name'];
    $_SESSION['video_to_convert']=$video_to_convert;
    $_SESSION['extension']=$extension;
    /*******************************
    check extenxions
    ***************************************************/    
                     if (!in_array($ext, $allowedExtensions))
                     {
                       echo '<div style="text-align:center"><strong>'.$ext."</strong><br /> is an invalid file type!<br />Supported files are:<br /><strong>";
                       foreach ($allowedExtensions as $value) { echo $value . "<br />"; }
                       echo "</strong><br />";
           echo "<a href="http://stackoverflow.com/feeds/tag/\&#034;index.php\&#034;">"."<img src="http://stackoverflow.com/feeds/tag/\&#034;images/red-back.png\&#034;" border="\&quot;0\&quot;" style='max-width: 300px; max-height: 300px' /></a></div>";
            include("templates/footer.php");
                          exit;
                     }


               ?>

               <center>
    <form action="index.php" method="post" target="_self">
                   <br />
                                   <fieldset>
                               <legend class="show_legend">Convert To</legend>

                   <div class="radio_buttons">
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/flv.jpg" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" class="blue_font" value="flv" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/mp4.jpg" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="mp4" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/wmv.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="wmv" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/avi.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="avi" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/mp3.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="mp3" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/ogg.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="ogg" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/webm.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="webm" />
                   </div>
                   </fieldset>
                       <fieldset>
                               <legend class="show_legend">Optional settings</legend>

                   <div class="radio_buttons" style="display:inline;padding:10px">
                   <br />Video quality:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="2000000">high</option>
                     <option value="logo.png -filter_complex 'overlay' ">medium</option>

                     <option value="-i seen.png \-filter_complex '[0:v][1:v]overlay=10:10:enable=between(t\,15\,25)' -c:v libx264 -pix_fmt yuv420p -movflags faststart">Seen</option>
                     <option value="-i logo2.png \-filter_complex '[0:v][1:v]overlay=10:10:enable=between(t\,10\,20)'">HD Watermark</option>
                     <option value="-i logo.png -filter_complex 'overlay'">Watermark</option>
                     <option value="-vf drawtext='fontsize=20:y=h-line_h-10:x=(2*n)-tw:fontfile='op.ttf':text='DesiBombs.com'' -c:v libx264 -pix_fmt yuv420p -movflags faststart">Watermark</option>
                   </select>
                   </div>

                   <div class="radio_buttons" style="display:inline;padding:10px">Audio quality:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="44100">high</option>
                     <option value="22050">medium</option>
                     <option value="11025">low</option>
                   </select>




                   <div class="radio_buttons" style="display:inline;padding:10px">Video size:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="320x240">320x240</option>
                     <option value="512x384" selected="selected">512x384</option>
                     <option value="640x360">640x360</option>
                     <option value="854x480">854x480</option>
                     <option value="1280x720">1280x720</option>
                   </select>
                   </div>

                   </div></fieldset>
                   <div class="radio_buttons">


                      <input type="submit" disabled="disabled" value="" style="display:none" />
                   </div>
     

     </form></center>
    &lt;?php
       }
       elseif(isset($_POST['type']))
           {


           $new_format=htmlspecialchars($_POST['type']); // read output format from form
           $name=$_SESSION['name'];
           //$_SESSION['extension'];
           $video_to_convert=$store_dir.$_SESSION['name'].$_SESSION['extension'];


           if (isset($_POST['size'])) {$size=$_POST['size'];}
           if (isset($_POST['quality'])) {$quality=$_POST['quality'];}
           if (isset($_POST['audio'])) {$audio=$_POST['audio'];}

           if($new_format=="webm" &amp;&amp; $audio=="11025"){$audio="22050";$new_format="webm"; }// for webm  and ogg audio can not be 11050
           if($new_format=="ogg" &amp;&amp; $audio=="11025"){$audio="22050"; $new_format="ogg"; }// for webm  and ogg audio can not be 11050

           $_SESSION['type']=$new_format;


           if($new_format=="flv"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec flv -f flv -r 30 -b ".$quality."-ab 128000 -ar".$audio." -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}


       if($new_format=="avi"){ $call=$ffmpeg." -i ".$video_to_convert."  -vcodec mjpeg -f avi -acodec libmp3lame -b ".$quality." -s ".$size." -r 30 -g 12 -qmin 3 -qmax 13 -ab 224 -ar ".$audio." -ac 2 ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="mp3"){ $call=$ffmpeg." -i ".$video_to_convert." -vn -acodec libmp3lame -ac 2 -ab 128000 -ar ".$audio."  ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="mp4"){ $call=$ffmpeg." -i ".$video_to_convert." -vf logo.png -vcodec mpeg4 -r 30 -b ".$quality." -acodec libmp3lame -ab 126000 -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="wmv"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec wmv1 -r 30 -b ".$quality." -acodec wmav2 -ab 128000 -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="ogg"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec libtheora -r 30 -b ".$quality." -acodec libvorbis -ab 128000   -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="webm"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec libvpx  -r 30 -b ".$quality." -acodec libvorbis -ab 128000   -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}


    /* START CONVERTING The Video */

       require_once("includes/ffmpeg_cmd.php");

       $convert = (popen($convert_call, "r"));

       pclose($convert);
       flush();    
    // define sessions


       $_SESSION['dest_file']=$converted_vids.$name.".".$new_format;

        echo "<code class="echappe-js">&lt;script&gt;\n&quot;;<br />
        echo &quot;counter = 5\n&quot;;<br />
         echo &quot;var redirect = 0; \n&quot;;<br />
         echo &quot;$(document).ready(function()\n&quot;;<br />
     echo &quot;{\n&quot;;<br />
       echo &quot;var refreshId = setInterval(function() \n&quot;;<br />
        echo &quot;{\n&quot;;<br />
        echo &quot;if(redirect == 0) \n { \n&quot;;<br />
        echo &quot;$('#timeval').load('progress_bar.php');\n&quot;;<br />
        echo &quot;}\n&quot;;<br />
        echo &quot;else \n&quot;;<br />
        echo &quot;{\n&quot;;<br />
        echo &quot;$('#timeval').load('progress_bar.php?counter='+ counter--);\n&quot;;<br />
        echo &quot;}\n&quot;;<br />
        echo &quot;}, 1000);\n&quot;;<br />
       echo &quot;});\n&quot;;   <br />
       echo &quot;&lt;/script&gt;

    \n" ;

    //
    /************************* for debug *************************************
    echo "

    " ;
        print_r ($_SESSION) ;
        echo "
    " ;
        **********************************************************************************/
    

     ?>

    wait please

    < ?php

    else if(isset($_GET[’finished’]))

    echo "

    " ; if(!isset($_SESSION[’name’])) echo "please convert new video" ;include("templates/footer.php") ; ;exit ; $filepath=$converted_vids."./".$_SESSION[’name’].".".$_SESSION[’type’] ;

    echo " " ;

    require_once"video_duration.php" ;

    $_SESSION[’duration’]=$hours." :".$minutes." :".$seconds ;

    $vid_name=$_SESSION[’name’] ;
    $vid_src=$_SESSION[’extension’] ;
    $vid_new=$_SESSION[’type’] ;
    if (isset($_SESSION[’duration’])) $duration=$_SESSION[’duration’] ;else $duration="unknown" ;
    if(file_exists($converted_vids.$vid_name.".".$vid_new))

    $vid_size=get_size($converted_vids.$vid_name.".".$vid_new) ;
    else $vid_size=0 ;

     ?>

    your video information
    Video duration < ?php echo $hours." :".$minutes." :".$seconds ; ?>
    original video name < ?php if(isset($_SESSION[’original_name’]))echo $_SESSION[’original_name’] ; ?>
    video size < ?php echo $vid_size." MB
    " ; ?>
    source extension < ?php echo str_replace(".","","$vid_src") ; ?>
    new extension < ?php echo $vid_new ; ?>

    < ?php

    echo "

    " ;

    session_unset() ;

    else

     ?>

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
    // Convert divs to queue widgets when the DOM is ready<br />
    $(function() {<br />
       $(&quot;#uploader&quot;).pluploadQueue({<br />
           // General settings<br />
           runtimes : 'flash',<br />
           url : 'upload.php',<br />
           max_file_size : '&amp;lt;?php echo $max_file_size ;?&gt;mb',<br />
           chunk_size : '1mb',<br />
           unique_names : true,<br />
    <br />
           // Resize images on clientside if we can<br />
           resize : {width : 320, height : 240, quality : 90},<br />
    init : {<br />
                 FilesAdded: function(up, files) {<br />
                   plupload.each(files, function(file) {<br />
                     if (up.files.length &gt; 1) {<br />
                       up.removeFile(file);<br />
                     }<br />
                   });<br />
                   if (up.files.length &gt;= 1) {<br />
                     $('#pickfiles').hide('slow');<br />
                   }<br />
                 },<br />
                 FilesRemoved: function(up, files) {<br />
                   if (up.files.length &lt; 1) {<br />
                     $('#pickfiles').fadeIn('slow');<br />
                   }<br />
                 }<br />
               },<br />
               multi_selection: false,<br />
           // Specify what files to browse for<br />
           filters : [<br />
               {title : &quot;Video files&quot;, extensions : &quot;&amp;lt;?php foreach ($allowedExtensions as $value) { echo $value . &quot;,&quot;; }?&gt;&quot;}<br />
    <br />
           ],<br />
    <br />
           // Flash settings<br />
           flash_swf_url : 'js/plupload.flash.swf',<br />
    <br />
           // Silverlight settings<br />
           silverlight_xap_url : 'js/plupload.silverlight.xap'<br />
       });<br />
    <br />
       // Client side form validation<br />
       $('form').submit(function(e) {<br />
           var uploader = $('#uploader').pluploadQueue();<br />
    <br />
           // Files in queue upload them first<br />
           if (uploader.files.length &gt; 0) {<br />
               // When all files are uploaded submit form<br />
               uploader.bind('StateChanged', function() {<br />
                   if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {<br />
                       $('form')[0].submit();<br />
                   }<br />
               });<br />
    <br />
               uploader.start();<br />
           } else {<br />
               alert('You must queue at least one video.');<br />
           }<br />
    <br />
           return false;<br />
       });<br />
    });<br />
    &lt;/script&gt;

    You browser doesn’t have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.

    Maximum upload size < ?php echo $max_file_size ; ?> MB

    < ?php include("templates/info.php") ; ?>
    < ?php

    //End Body Area/

     ?>

Boussole SPIP

SPIP.net-La documentation officielle et téléchargement de (...) SPIP Code-La documentation du code de SPIP Programmer SPIP-La documentation pour développer avec (...) Traduire SPIP-Espace de traduction de SPIP et de ses (...) Plugins SPIP-L'annuaire des plugins SPIP SPIP-Contrib-L'espace des contributions à SPIP Forge SPIP-L'espace de développement de SPIP et de ses (...) Discuter sur SPIP-Les nouveaux forums de la communauté (...) SPIP Party-L'agenda des apéros et autres rencontres (...) Médias SPIP-La médiathèque de SPIP SPIP Syntaxe-Tester l'édition de texte dans SPIP