Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (49)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (4759)

  • ffmpeg - Error [tcp @ 0x5a25700] Port missing in uri

    9 mai 2021, par ger

    For further development I tried to download a livestream under Ubuntu 20.04

    


    uname -a
Linux 5.9.16-050916-generic #202012211331 SMP Mon Dec 21 14:11:13 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux`

ffmpeg -v debug -i 'https://edge2.1internet.tv/dash-live11/streams/1tv/1tvdash.mpd' testErsterKanal.mp4
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-timeout' ... matched as AVOption 'timeout' with argument '5000'.
Reading option '-i' ... matched as input url with argument 'https://edge2.1internet.tv/dash-live11/streams/1tv/1tvdash.mpd'.
Reading option 'testErsterKanal.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url https://edge2.1internet.tv/dash-live11/streams/1tv/1tvdash.mpd.
Successfully parsed a group of options.
Opening an input file: https://edge2.1internet.tv/dash-live11/streams/1tv/1tvdash.mpd.
[NULL @ 0x55f8e8ee6740] Opening 'https://edge2.1internet.tv/dash-live11/streams/1tv/1tvdash.mpd' for reading
[https @ 0x55f8e8ee7100] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x55f8e8ee9580] Original list of addresses:
[tcp @ 0x55f8e8ee9580] Address 81.211.33.67 port 443
[tcp @ 0x55f8e8ee9580] Interleaved list of addresses:
[tcp @ 0x55f8e8ee9580] Address 81.211.33.67 port 443
[tcp @ 0x55f8e8ee9580] Starting connection attempt to 81.211.33.67 port 443
[tcp @ 0x55f8e8ee9580] Successfully connected to 81.211.33.67 port 443
[https @ 0x55f8e8ee7100] request: GET /dash-live11/streams/1tv/1tvdash.mpd HTTP/1.1


    


    worked well

    


    Under Debian 10

    


    Linux 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux


    


    it is not working

    


        ffmpeg -v debug -i 'https://81.211.33.67/dash-live11/streams/1tv/1tvdash.mpd' testErsterKanal.mp4
ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-libopencv --disable-outdev=sdl2 --disable-podpages --disable-sndio --disable-stripping --enable-libaom --enable-avfilter --enable-avresample --enable-gcrypt --disable-gnutls --enable-openssl --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libzimg --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opencl --enable-opengl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --enable-libwebp --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --enable-libmfx --enable-libvmaf --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument 'https://81.211.33.67/dash-live11/streams/1tv/1tvdash.mpd'.
Reading option 'testErsterKanal.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url https://81.211.33.67/dash-live11/streams/1tv/1tvdash.mpd.
Successfully parsed a group of options.
Opening an input file: https://81.211.33.67/dash-live11/streams/1tv/1tvdash.mpd.
[NULL @ 0x55ce69421280] Opening 'https://81.211.33.67/dash-live11/streams/1tv/1tvdash.mpd' for reading
[https @ 0x55ce69421e40] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x55ce69425e00] Port missing in uri
https://81.211.33.67/dash-live11/streams/1tv/1tvdash.mpd: Invalid argument


    


    I tried with ports 80 and 443, IP and an actual ffmpeg-Version in all combinations

    


        nmap edge2.1internet.tv
Starting Nmap 7.70 ( https://nmap.org ) at 2021-05-06 21:46 CEST
Nmap scan report for edge2.1internet.tv (81.211.33.67)
Host is up (0.078s latency).
Not shown: 998 filtered ports
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https

ffmpeg -v debug -i 'https://81.211.33.67:443/dash-live11/streams/1tv/1tvdash.mpd' testErsterKanal.mp4
    ffmpeg -v debug -i 'https://81.211.33.67:80/dash-live11/streams/1tv/1tvdash.mpd' testErsterKanal.mp4
    ./ffmpeg-git-20210501-amd64-static/ffmpeg -v debug -i 'https://81.211.33.67:443/dash-live11/streams/1tv/1tvdash.mpd' testErsterKanal.mp4


    


    What is the error : [tcp @ 0x55ce69425e00] Port missing in uri and where it comes from ?
May be an global configuration error and not ffmpeg ?
Thanks

    


    EDIT

    


    I found out, that it is working only with sudo and the actual ffmpeg version (static build) from the home directory of the user, which is owend by the user.
All privileges of the directory's are at the user.

    


    sudo ./ffmpeg-git-20210501-amd64-static/ffmpeg -re -i https://edge2.1internet.tv/dash-live11/streams/1tv/1tvdash.mpd testErsterKanal.mp4
ffmpeg version N-57204-gc7c138e411-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  0.100 / 59.  0.100
  libavformat    59.  0.100 / 59.  0.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.101 /  8.  0.101
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100


    


    With the standard Debian distribution version from /usr/bin/ffmpeg is still not working, too with su-privileges.

    


    I want to use it for tvheadend/TVH and can not work with su-privileges.

    


    I tried to at Ubuntu

    


    nc -z -v -u 81.211.33.67 443
Connection to 81.211.33.67 443 port [udp/*] succeeded!


    


    at Debian

    


    nc -z -v -u 81.211.33.67 443
81.211.33.67: inverse host lookup failed: Unknown host
(UNKNOWN) [81.211.33.67] 443 (?) open


    


    and with sudo the same.

    


  • why it is taking a lot of time to convert image via HTTP to video in ffmpeg ?

    20 avril 2021, par al pacino

    Below is the ffmpeg i am using to convert images into videos but It is taking around 3 minutes to convert image to 5 second video.
If I run the command on Image present on a directory then it converts images to videos very swiftly.

    


    can anyone tell what I am doing wrong ?

    


    ffmpeg -loop 1 -i 'https://cdn.pixabay.com/photo/2020/10/23/12/03/arch-5678549__340.jpg' -t 5 -vf scale=1280:780 output.mp4 

ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-cuda --enable-cuda-sdk --enable-cuvid --enable-libdrm --enable-ffplay --enable-gnutls --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libnpp --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, image2, from 'https://cdn.pixabay.com/photo/2021/04/17/18/26/woman-6186493__340.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 5538 kb/s
    Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 511x340 [SAR 1:1 DAR 511:340], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x5580ac8e7c40] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x5580ac186b40] using SAR=1034/1129
[libx264 @ 0x5580ac186b40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x5580ac186b40] profile High, level 3.2
[libx264 @ 0x5580ac186b40] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1280x780 [SAR 19929:21760 DAR 511:340], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.91.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=  100 fps=0.0 q=28.0 size=       0kB time=00:00:01.64 bitrate=   0.2kbits/frame=  125 fps=0.0 q=-1.0 Lsize=      90kB time=00:00:04.88 bitrate= 151.7kbits/s speed=6.79x    
video:88kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.618829%
[libx264 @ 0x5580ac186b40] frame I:1     Avg QP:16.31  size: 75247
[libx264 @ 0x5580ac186b40] frame P:31    Avg QP:16.13  size:   314
[libx264 @ 0x5580ac186b40] frame B:93    Avg QP:31.33  size:    49
[libx264 @ 0x5580ac186b40] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
[libx264 @ 0x5580ac186b40] mb I  I16..4: 10.6% 77.6% 11.8%
[libx264 @ 0x5580ac186b40] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  2.5%  0.2%  0.2%  0.0%  0.0%    skip:97.2%
[libx264 @ 0x5580ac186b40] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.4%  0.0%  0.0%  direct: 0.0%  skip:99.6%  L0: 8.3% L1:91.7% BI: 0.0%
[libx264 @ 0x5580ac186b40] 8x8 transform intra:77.5% inter:98.7%
[libx264 @ 0x5580ac186b40] coded y,uvDC,uvAC intra: 88.4% 95.3% 79.5% inter: 0.1% 0.5% 0.0%
[libx264 @ 0x5580ac186b40] i16 v,h,dc,p:  2%  3%  0% 95%
[libx264 @ 0x5580ac186b40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 18%  7%  6% 11% 10% 10%  8%  8%
[libx264 @ 0x5580ac186b40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 18%  7%  5% 16% 11%  9%  6%  4%
[libx264 @ 0x5580ac186b40] i8c dc,h,v,p: 33% 21% 22% 24%
[libx264 @ 0x5580ac186b40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x5580ac186b40] ref P L0: 85.7%  0.1% 13.2%  1.0%
[libx264 @ 0x5580ac186b40] ref B L0: 53.6% 46.4%
[libx264 @ 0x5580ac186b40] ref B L1: 92.8%  7.2%
[libx264 @ 0x5580ac186b40] kb/s:143.20
aman@aman:~/Desktop/a$ ffmpeg -loop 1 -i 'https://cdn.pixabay.com/photo/2021/04/17/18/26/woman-6186493__340.jpg' -t 5 -vf scale=1280:780 output.webm
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-cuda --enable-cuda-sdk --enable-cuvid --enable-libdrm --enable-ffplay --enable-gnutls --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libnpp --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, image2, from 'https://cdn.pixabay.com/photo/2021/04/17/18/26/woman-6186493__340.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 5538 kb/s
    Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 511x340 [SAR 1:1 DAR 511:340], 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'output.webm' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
[swscaler @ 0x5630553879c0] deprecated pixel format used, make sure you did set range correctly
[libvpx-vp9 @ 0x563054cd2500] v1.7.0
[libvpx-vp9 @ 0x563054cd2500] Neither bitrate nor constrained quality specified, using default CRF of 32
Output #0, webm, to 'output.webm':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p, 1280x780 [SAR 19929:21760 DAR 511:340], q=-1--1, 25 fps, 1k tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.91.100 libvpx-vp9
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   57 fps=0.0 q=0.0 size=       1kB time=00:00:01.28 bitrate=   3.3kbits/sframe=  103 fps=102 q=0.0 size=       1kB time=00:00:03.12 bitrate=   1.3kbits/sframe=  125 fps= 85 q=0.0 Lsize=      51kB time=00:00:04.96 bitrate=  84.0kbits/s speed=3.37x    
video:50kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.571023%


    


  • Not able to trim video using "com.arthenica:mobile-ffmpeg-full:4.4"

    20 avril 2021, par UMESH GARG

    I need help in trimming the video in android using : 'mobile-FFmpeg

    


    I posted my code below, which I used to trim the video but every time it goes to the else block(every it fails for android:11,9).
Please help me out.
Thanks in advance

    


    Code :
val cmd = arrayOf("-i", trimmerData.srcPath, "-ss", startTime, "-t", endTime,
"-s", "320x240", "-r", "25", "-vcodec", "mpeg4", "-b:v", "2097152", "-b:a", "48000", "-ac", "2", "-ar", "22050",
"-c", "copy", trimmerData.dstPath)

    


    val rc = FFmpeg.execute(cmd)

    if (rc == RETURN_CODE_SUCCESS) {
        Log.i(Config.TAG, "Command execution completed successfully.")
        scanTrimFile(trimmerData)
    } else if (rc == RETURN_CODE_CANCEL) {
        Log.i(Config.TAG, "Command execution cancelled by user.")
    } else {
        Log.i(Config.TAG, String.format("Command execution failed with rc=%d and the output below.", rc))
        Config.printLastCommandOutput(Log.INFO)
        showTrimmingError()
    }

private fun scanTrimFile(trimmerData: TrimmerData) {
mediaScannerConnection = MediaScannerConnection(this,
object : MediaScannerConnection.MediaScannerConnectionClient {
override fun onMediaScannerConnected() {
mediaScannerConnection.scanFile(trimmerData.dstPath, "video/*")
}

                override fun onScanCompleted(path: String?, uri: Uri?) {
                    mediaScannerConnection.disconnect()
                    dismissWaitingDialog()
                    getResult(Uri.parse(trimmerData.dstPath))
                }

            })
    mediaScannerConnection.connect()
}


    


    Logs :

    


    2021-04-20 13:05:12.869 27051-27051/org.xyz.abc I/mobile-ffmpeg: Loading mobile-ffmpeg.
2021-04-20 13:05:12.880 27051-27051/org.xyz.abc I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-arm64-v8a-4.4-20200725.
2021-04-20 13:05:12.880 27051-30377/org.xyz.abc D/mobile-ffmpeg: Callback thread started.
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: ffmpeg version v4.4-dev-416
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   libavcodec     58. 96.100 / 58. 96.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   libavformat    58. 48.100 / 58. 48.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   libavdevice    58. 11.101 / 58. 11.101
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   libavfilter     7. 87.100 /  7. 87.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   libswscale      5.  8.100 /  5.  8.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg:   libswresample   3.  8.100 /  3.  8.100
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/org.xyz.abc/files/Tch Plus Recorder/tch_video_1618904094681.mp4':
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:   Metadata:
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     major_brand     : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: mp42
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     minor_version   : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 0
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     compatible_brands: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: isommp42
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     creation_time   : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 2021-04-20T07:35:06.000000Z
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     com.android.version: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 11
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:   Duration: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 00:00:10.07
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , start: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 0.000000
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , bitrate: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 12089 kb/s
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     Stream #0:0
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: (eng)
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 11998 kb/s
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , SAR 1:1 DAR 16:9
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 29.81 fps, 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 30 tbr, 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 90k tbn, 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 180k tbc
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:  (default)
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     Metadata:
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:       rotate          : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 90
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:       creation_time   : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 2021-04-20T07:35:06.000000Z
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:       handler_name    : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: VideoHandle
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg:     Side data:
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg:       
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: displaymatrix: rotation of -90.00 degrees
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg:     Stream #0:1
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: (eng)
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg:  (default)
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg:     Metadata:
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg:       creation_time   : 
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: 2021-04-20T07:35:06.000000Z
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg:       handler_name    : 
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: SoundHandle
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc E/mobile-ffmpeg: /storage/emulated/0/TchTrimVideo/tch_trim_Video1618904108454.mp4: No such file or directory
2021-04-20 13:05:12.898 27051-27051/org.xyz.abc I/mobile-ffmpeg: Command execution failed with rc=1 and the output below.
2021-04-20 13:05:12.899 27051-27051/org.xyz.abc I/mobile-ffmpeg: ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers
      built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
      configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
      libavutil      56. 55.100 / 56. 55.100
      libavcodec     58. 96.100 / 58. 96.100
      libavformat    58. 48.100 / 58. 48.100
      libavdevice    58. 11.101 / 58. 11.101
      libavfilter     7. 87.100 /  7. 87.100
      libswscale      5.  8.100 /  5.  8.100
      libswresample   3.  8.100 /  3.  8.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/org.xyz.abc/files/Tch Plus Recorder/tch_video_1618904094681.mp4':
      Metadata:
        major_brand     : mp42
        minor_version   : 0
        compatible_brands: isommp42
        creation_time   : 2021-04-20T07:35:06.000000Z
        com.android.version: 11
      Duration: 00:00:10.07, start: 0.000000, bitrate: 12089 kb/s
        Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 11998 kb/s, SAR 1:1 DAR 16:9, 29.81 fps, 30 tbr, 90k tbn, 180k tbc (default)
        Metadata:
          rotate          : 90
          creation_time   : 2021-04-20T07:35:06.000000Z
          handler_name    : VideoHandle
        Side data:
          displaymatrix: rotation of -90.00 degrees
        Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default)
        Metadata:
          creation_time   : 2021-04-20T07:35:06.000000Z
          handler_name    : SoundHandle
    /storage/emulated/0/TchTrimVideo/tch_trim_Video1618904108454.mp4: No such file or directory