
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (13)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (4031)
-
orangepi zero 2w, ubuntu, using a usb webcam ffmpeg to record videos, low FPS [closed]
28 janvier, par Qingfu ShiI use a OrpangePi zero 2w, USB HIK 2K Cam, to record videos.
Ubuntu, ffmpeg installed,
the cmd


ffmpeg -f v4l2 -video_size 1920x1080 -r 25 -input_format mjpeg -i /dev/video1 -vf "transpose=1" -c:v libx264 -preset fast -crf 23 output.mp4



I want the fps to be at least 25, so it looks smooth, but I only got about 4.7 fps.


ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, video4linux2,v4l2, from '/dev/video1':
 Duration: N/A, start: 428045.804407, bitrate: N/A
 Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
File 'output.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0xaaab1677ccd0] using cpu capabilities: ARMv8 NEON
[libx264 @ 0xaaab1677ccd0] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0xaaab1677ccd0] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 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=6 lookahead_threads=1 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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 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.76.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, q=2-31, 25 fps, 12800 tbn
 Metadata:
 encoder : Lavc58.134.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 264 fps=4.7 q=-1.0 Lsize= 6301kB time=00:00:10.44 bitrate=4944.2kbits/s speed=0.185x 
video:6297kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.063708%
[libx264 @ 0xaaab1677ccd0] frame I:2 Avg QP:22.43 size:140174
[libx264 @ 0xaaab1677ccd0] frame P:69 Avg QP:22.70 size: 54079
[libx264 @ 0xaaab1677ccd0] frame B:193 Avg QP:24.00 size: 12620
[libx264 @ 0xaaab1677ccd0] consecutive B-frames: 1.5% 2.3% 2.3% 93.9%
[libx264 @ 0xaaab1677ccd0] mb I I16..4: 6.6% 85.8% 7.6%
[libx264 @ 0xaaab1677ccd0] mb P I16..4: 3.6% 12.5% 0.4% P16..4: 26.9% 10.6% 7.1% 0.0% 0.0% skip:39.0%
[libx264 @ 0xaaab1677ccd0] mb B I16..4: 0.8% 8.0% 0.1% B16..8: 10.8% 3.0% 0.2% direct:11.1% skip:66.0% L0:41.1% L1:42.2% BI:16.7%
[libx264 @ 0xaaab1677ccd0] 8x8 transform intra:84.4% inter:78.9%
[libx264 @ 0xaaab1677ccd0] coded y,uvDC,uvAC intra: 47.4% 51.8% 7.8% inter: 11.8% 11.9% 0.1%
[libx264 @ 0xaaab1677ccd0] i16 v,h,dc,p: 43% 17% 13% 28%
[libx264 @ 0xaaab1677ccd0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 15% 51% 3% 3% 3% 3% 3% 4%
[libx264 @ 0xaaab1677ccd0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 22% 18% 6% 7% 8% 6% 6% 7%
[libx264 @ 0xaaab1677ccd0] i8c dc,h,v,p: 63% 19% 16% 2%
[libx264 @ 0xaaab1677ccd0] Weighted P-Frames: Y:11.6% UV:8.7%
[libx264 @ 0xaaab1677ccd0] ref P L0: 50.0% 50.0%
[libx264 @ 0xaaab1677ccd0] ref B L0: 74.0% 26.0%
[libx264 @ 0xaaab1677ccd0] ref B L1: 93.8% 6.2%
[libx264 @ 0xaaab1677ccd0] kb/s:4884.46



If change resolution to 1280720, fps increase to 12-13, change to 640360, fps increase to 27-28


the webcam supports the following fmts


v4l2-ctl --device=/dev/video1 --list-formats-ext



ioctl: VIDIOC_ENUM_FMT
 Type: Video Capture

 [0]: 'YUYV' (YUYV 4:2:2)
 Size: Discrete 640x360
 Interval: Discrete 0.040s (25.000 fps)
 Size: Discrete 640x480
 Interval: Discrete 0.040s (25.000 fps)
 Interval: Discrete 0.040s (25.000 fps)
 [1]: 'MJPG' (Motion-JPEG, compressed)
 Size: Discrete 640x360
 Interval: Discrete 0.033s (30.000 fps)
 Interval: Discrete 0.040s (25.000 fps)
 Size: Discrete 1280x720
 Interval: Discrete 0.033s (30.000 fps)
 Interval: Discrete 0.040s (25.000 fps)
 Size: Discrete 1280x960
 Interval: Discrete 0.033s (30.000 fps)
 Interval: Discrete 0.040s (25.000 fps)
 Size: Discrete 1920x1080
 Interval: Discrete 0.033s (30.000 fps)
 Interval: Discrete 0.040s (25.000 fps)
 Size: Discrete 2048x1536
 Interval: Discrete 0.033s (30.000 fps)
 Interval: Discrete 0.040s (25.000 fps)
 Size: Discrete 2560x1440
 Interval: Discrete 0.040s (25.000 fps)
 Size: Discrete 640x480
 Interval: Discrete 0.033s (30.000 fps)
 Interval: Discrete 0.040s (25.000 fps)
 Interval: Discrete 0.033s (30.000 fps)
 Interval: Discrete 0.040s (25.000 fps)



but I want the video at least 1080p@30fps. What's the bottleneck ? is it possible to modify the cmd to achieve this ?
OrangePi zero 2w, use an AllWinner H618 cpu, with 1G RAM, 64G v10 sd-card.


-
Camera app fails on android ffmpeg application
22 mars 2021, par connor449I am trying to run a simple video recorder app on android. The code is below :


package com.example.camera

//import android.R
import android.content.DialogInterface
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import com.arthenica.mobileffmpeg.FFmpeg


const val EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE"

class MainActivity : AppCompatActivity() {
 override fun onCreate(savedInstanceState: Bundle?) {
 super.onCreate(savedInstanceState)
 setContentView(R.layout.activity_main)
 if (checkPermission()) {
 //main logic or main code
 FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 /sdcard/test.mp4")

 // . write your main code to execute, It will execute if the permission is already given.
 } else {
 requestPermission()
 }
 }

 private fun checkPermission(): Boolean {
 return if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)
 != PackageManager.PERMISSION_GRANTED
 ) {
 // Permission is not granted
 false
 } else true
 }

 private fun requestPermission() {
 ActivityCompat.requestPermissions(
 this, arrayOf(android.Manifest.permission.CAMERA),
 PERMISSION_REQUEST_CODE
 )
 }

 override fun onRequestPermissionsResult(
 requestCode: Int,
 permissions: Array<string>,
 grantResults: IntArray
 ) {
 when (requestCode) {
 PERMISSION_REQUEST_CODE -> if (grantResults.size > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED
 ) {
 Toast.makeText(applicationContext, "Permission Granted", Toast.LENGTH_SHORT)
 .show()

 // main logic
 } else {
 Toast.makeText(applicationContext, "Permission Denied", Toast.LENGTH_SHORT)
 .show()
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
 if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)
 != PackageManager.PERMISSION_GRANTED
 ) {
 showMessageOKCancel("You need to allow access permissions",
 DialogInterface.OnClickListener { dialog, which ->
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
 requestPermission()
 }
 })
 }
 }
 }
 }
 }

 private fun showMessageOKCancel(
 message: String,
 okListener: DialogInterface.OnClickListener
 ) {
 AlertDialog.Builder(this@MainActivity)
 .setMessage(message)
 .setPositiveButton("OK", okListener)
 .setNegativeButton("Cancel", null)
 .create()
 .show()
 }

 companion object {
 private const val PERMISSION_REQUEST_CODE = 200
 }
}


</string>


The main command to call the video recorder is here :


FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 /sdcard/test.mp4")



The app opens on my android 10 Motorola G Power. I tap 'allow' for allowing permissions. Then the app crashes and I keep getting this error :


2021-03-22 13:42:51.534 31138-31138/com.example.camera E/AndroidRuntime: FATAL EXCEPTION: main
 Process: com.example.camera, PID: 31138
 java.lang.IllegalStateException: Could not find method sendMessage(View) in a parent or ancestor Context for android:onClick attribute defined on view class com.google.android.material.button.MaterialButton with id 'button2'
 at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:436)
 at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:393)
 at android.view.View.performClick(View.java:7161)
 at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:967)
 at android.view.View.performClickInternal(View.java:7133)
 at android.view.View.access$3500(View.java:804)
 at android.view.View$PerformClick.run(View.java:27416)
 at android.os.Handler.handleCallback(Handler.java:883)
 at android.os.Handler.dispatchMessage(Handler.java:100)
 at android.os.Looper.loop(Looper.java:241)
 at android.app.ActivityThread.main(ActivityThread.java:7617)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
2021-03-22 13:42:51.546 31138-31138/com.example.camera I/Process: Sending signal. PID: 31138 SIG: 9



What am I doing wrong ? Please advise.


edit


layout xml


<?xml version="1.0" encoding="utf-8"?>


 

 




-
FFmpeg dosn't listen on RTP port in debian
26 juin 2021, par MSSI compose a command to encode my HLS audio stream to a mp3 stream :


ffmpeg -re -i "http://cdn1.live.irib.ir:1935/channel-live/smil:r-payam/chunklist_b307200_slFa.m3u8" -acodec libmp3lame -f rtp rtp://127.0.0.1:9434/



When I run the command on windows 10 machine FFmpeg start to listen on port 9434 and works perfectly :




But when I run it on my Debian machine it doesn't bind to specified port and also any of bind ports doesn't work :




Running out put :




FFmpeg version info :


ffmpeg version N-57736-ga501d55905-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
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-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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-libxml2 --enable-libxvid --enable-libzimg
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.101 / 59. 1.101
libavformat 59. 3.100 / 59. 3.100
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.102 / 8. 0.102
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100



Does any body knows the correct way of stream rtp on debian ?