
Recherche avancée
Autres articles (51)
-
List of compatible distributions
26 avril 2011, parThe 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 (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5381)
-
Unable to properly save video in android ffmpeg app
22 mars 2021, par connor449I am trying to record and save a video with an ffmpeg app on android 10. I'm very new to android/mobile development.


Here is my manifest file :


<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.example.camera">
 
 
 

 


 
 <activity>
 
 
 </activity> <activity>
 
 <action></action>

 <category></category>
 
 </activity>
 


</manifest>



As you can see, I am specifying permission to read/write data.


Here is my mainActivity :


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 -crf 0 -pixel_format yuv420p -t 00:00:05 test.mp4")

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

 fun sendMessage(view:android.view.View){


 }

 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>


Here is my error message in the logs :


2021-03-22 16:31:34.509 9365-9448/com.example.camera I/AdrenoGLES: QUALCOMM build : 85037b7, I6e8b82193e
 Build Date : 12/19/19
 OpenGL ES Shader Compiler Version: EV031.27.05.03
 Local Branch : 
 Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.8.11.R1.10.00.00.576.016
 Remote Branch : NONE
 Reconstruct Branch : NOTHING
2021-03-22 16:31:34.509 9365-9448/com.example.camera I/AdrenoGLES: Build Config : S P 8.0.12 AArch64
2021-03-22 16:31:34.512 9365-9448/com.example.camera I/AdrenoGLES: PFP: 0x016ee187, ME: 0x00000000
2021-03-22 16:31:55.745 9365-9480/com.example.camera I/mobile-ffmpeg: ffmpeg version v4.4-dev-416
2021-03-22 16:31:55.745 9365-9480/com.example.camera I/mobile-ffmpeg: Copyright (c) 2000-2020 the FFmpeg developers
2021-03-22 16:31:55.746 9365-9480/com.example.camera 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-03-22 16:31:55.746 9365-9480/com.example.camera 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-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg: libavutil 56. 55.100 / 56. 55.100
2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg: libavcodec 58. 96.100 / 58. 96.100
2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg: libavformat 58. 48.100 / 58. 48.100
2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg: libavdevice 58. 11.101 / 58. 11.101
2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg: libavfilter 7. 87.100 / 7. 87.100
2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg: libswscale 5. 8.100 / 5. 8.100
2021-03-22 16:31:55.746 9365-9480/com.example.camera I/mobile-ffmpeg: libswresample 3. 8.100 / 3. 8.100
2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638402! count 0, type 3
2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638403! count 0, type 3
2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835009! count 0, type 3
2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835010! count 0, type 3
2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638407! count 0, type 3
2021-03-22 16:31:55.750 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638408! count 0, type 0
2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638402! count 0, type 3
2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638403! count 0, type 3
2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835009! count 0, type 3
2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1835010! count 0, type 3
2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638407! count 0, type 3
2021-03-22 16:31:55.751 9365-9365/com.example.camera E/ACameraMetadata: filterDurations: malformed duration key 1638408! count 0, type 0
2021-03-22 16:31:55.797 9365-9480/com.example.camera W/mobile-ffmpeg: [android_camera @ 0x726794b600] Requested video_size 0x0 not available, falling back to 4608x3456
2021-03-22 16:31:55.804 9365-9480/com.example.camera I/mobile-ffmpeg: [android_camera @ 0x726794b600] Android camera capture session is active.
2021-03-22 16:31:56.097 9365-9480/com.example.camera I/mobile-ffmpeg: Input #0, android_camera, from '0:0':
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: Duration: 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: N/A
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: , start: 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 28486.157692
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: , bitrate: 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: N/A
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: Stream #0:0
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: : Video: rawvideo (NV21 / 0x3132564E), nv21, 4608x3456
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: , 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 30 fps, 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 30 tbr, 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 1000000000.00 tbn, 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 1000000000.00 tbc
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: Side data:
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: 
2021-03-22 16:31:56.098 9365-9480/com.example.camera I/mobile-ffmpeg: displaymatrix: rotation of -90.00 degrees
2021-03-22 16:31:56.098 9365-9480/com.example.camera W/mobile-ffmpeg: Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (test.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
2021-03-22 16:31:56.098 9365-9480/com.example.camera E/mobile-ffmpeg: test.mp4: Read-only file system
2021-03-22 16:31:56.259 9365-9392/com.example.camera D/ACameraDevice: Device error received, code 5, frame number 1, request ID 0, subseq ID 0
2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 5, frame number 2, request ID 0, subseq ID 0
2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 5, frame number 3, request ID 0, subseq ID 0
2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 3, frame number 4, request ID 0, subseq ID 0
2021-03-22 16:31:56.260 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 3, frame number 5, request ID 0, subseq ID 0
2021-03-22 16:31:56.261 9365-9666/com.example.camera D/ACameraDevice: Device error received, code 3, frame number 6, request ID 0, subseq ID 0
2021-03-22 16:31:56.607 9365-9365/com.example.camera W/ACameraCaptureSession: Device is closed but session 0 is not notified
2021-03-22 16:31:56.608 9365-9480/com.example.camera I/mobile-ffmpeg: [android_camera @ 0x726794b600] Android camera capture session was closed.
2021-03-22 16:31:56.637 9365-9365/com.example.camera I/Choreographer: Skipped 58 frames! The application may be doing too much work on its main thread.
2021-03-22 16:31:56.678 9365-9448/com.example.camera I/OpenGLRenderer: Davey! duration=1018ms; Flags=1, IntendedVsync=17591318171185, Vsync=17592284837813, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=17592296938401, AnimationStart=17592297214183, PerformTraversalsStart=17592304079965, DrawStart=17592327848144, SyncQueued=17592334185436, SyncStart=17592334982572, IssueDrawCommandsStart=17592335124343, SwapBuffers=17592336519968, FrameCompleted=17592337443926, DequeueBufferDuration=165000, QueueBufferDuration=255000, 



The error I'm particularity confused about is :


2021-03-22 16:31:56.098 9365-9480/com.example.camera E/mobile-ffmpeg: test.mp4: Read-only file system



I thought I specified the appropriate permissions in the manifest file ? Please advise.


-
FFMPEG Video loop from images files
27 février 2020, par Nesan ManoI am trying to make a video from a bundle of image files and then apply a an overlay on top of it.Another requirement is to make the video loop 3x. It is simply not working.
The first three paths are pointing toward the same image bundle. (A folder containing images like the following DSC0001_0013.jpg,DSC0002_0013.jpg,etc)
Observed symptoms :
The script runs infinitely.I produces a video file of 0 KB.I have to abort script using CTRL+C
This is my script.
ffmpeg
-start_number 1 -framerate 3/1
-i "C:\Users\xxx\AppData\Local\xxx\xxx\xxx\xxx\xxx\xxx\xxx\963d9d9b8e1\DSC%04d_0013.jpg"
-i "C:\Users\xxx\AppData\Local\xxx\xxx\projects\xxx\xxx\xxx\xxx\963d9d9b8e1\DSC%04d_0013.jpg"
-i "C:\Users\xxx\AppData\Local\xxx\xxx\projects\xxx\xxx\xxx\xxx\963d9d9b8e1\DSC%04d_0013.jpg"
-i "C:\Users\xxx\AppData\Local\xxx\xxx\projects\1237\1138\overlay.png"
-i "C:\Users\xxx\AppData\Local\xxx\xxx\projects\1237\1138\overlay.png"
-i "C:\Users\xxx\AppData\Local\xxx\xxx\projects\1237\1138\overlay.png"
-filter_complex " [0:v]scale=600x900[scaled1]; [1:v]scale=600x900[scaled2]; [2:v]scale=600x900[scaled3]; [scaled1][3:v]overlay[tmp1]; [scaled2][4:v]overlay[tmp2]; [scaled3][5:v]overlay[tmp3]; [tmp1][tmp2][tmp3]concat=n=3[scaled] "
-map [scaled] -r 10 -vcodec libx264 -pix_fmt yuv420p -crf 23 "C:\Users\xxx\Documents\Projets\2020\xxx\video test ffmpeg\test.mp4" -
"Pixel format 'yuvj420p' is not supported" when converting image to video using CUDA hardware acceleration
11 février 2020, par laurentI’m trying to convert an image to a video using CUDA hardware acceleration but I can’t get it to work.
The basic command I have is this one :
ffmpeg -y -hwaccel cuvid -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4
And I’m getting this error :
[AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
[mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Invalid argumentI’ve tried setting the pixel format like so, but that didn’t help :
ffmpeg -y -hwaccel cuvid -pix_fmt yuv420p -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4
I’ve also tried many other flags but can’t get anything to work. Any idea what the issue might be ?
For information this is the full log :
ffmpeg version N-96615-gc35382a Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --enable-nonfree --disable-shared --enable-gpl --enable-openssl --enable-libx264 --enable-cuda-sdk --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/usr/local/ssl/include -I/usr/local/cuda/include -I/usr/local/include -L/usr/local/ssl/lib -Wl,-rpath=/usr/local/ssl/lib' --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 56. 38.100 / 56. 38.100
libavcodec 58. 67.101 / 58. 67.101
libavformat 58. 37.100 / 58. 37.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 73.100 / 7. 73.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, image2, from 'tests/MediaSamples/portrait_0.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 40237 kb/s
Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1600x900 [SAR 72:72 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
[mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Invalid argument
[libx264 @ 0x2d1e840] using SAR=1/1
[libx264 @ 0x2d1e840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x2d1e840] profile High, level 4.0
[libx264 @ 0x2d1e840] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=24 lookahead_threads=4 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 'out.mp4':
Metadata:
encoder : Lavf58.37.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1600x900 [SAR 72:72 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc58.67.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!