
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (48)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (9135)
-
Drawtext Effects Clipping with Zoom in and Scale animation When combining with xfade wipe
2 août 2023, par CRAIGThe following ffmpeg drawtext command is meant to manipulate the text with a number of filters. First it adds a wipe, then a "grow" effect and a fade.


The issue is when the wipe AND scale are together the end result is partially clipped and the wipe doesn't seem to fully reveal the text as it should be doing. Almost like the scale or wipe was delayed.


I have two example commands one with an xfade wipe effect and one without below.


The one with xfade wipe clips text and looks like it is messing with the timing in some way as if the scale doesn't have time to finish. If I remove the xfade wipe, the scale animation and fadein are fine.


I have tried to put the xfade at the end, but it has caused me more issues.


Command without xfade : (Final result is not clipped)


ffmpeg -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -filter_complex "[1:v]drawtext=expansion=none:enable='between(t,0,0.138)':fontsize=97.7886:fontcolor=0xff0000ff:text='Of':shadowcolor=0x00ff3fff:shadowx=5.9:shadowy=5.9:borderw='2.95':bordercolor='0xa200ffff':x=(w-text_w)/2:y=(h-text_h)/2[1v];[0:v]settb=AVTB,format=rgba[0v];[1v]settb=AVTB,format=rgba[1v];[1v]scale='if(between(t,0,0+0.137),0.645+((t-0)*128.355/0.137),if(gte(t,0.137),129,129))':-1:eval=frame,fade=in:st=0:d=0.137[1v];[0v][1v]overlay=x=(W-w)/2:y=(H-h)/2:threads=1" -copyts -c:v prores_ks -profile:v 4 -pix_fmt rgba -movflags faststart -r 30 -t 0.137 -y /home/encodertraffic/subtitles/mymovie.mov


Command with xfade wipe :


ffmpeg -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -filter_complex "[1:v]drawtext=expansion=none:enable='between(t,0,0.138)':fontsize=97.7886:fontcolor=0xff0000ff:text='Of':shadowcolor=0x00ff3fff:shadowx=5.9:shadowy=5.9:borderw='2.95':bordercolor='0xa200ffff':x=(w-text_w)/2:y=(h-text_h)/2[1v];[0:v]settb=AVTB,format=rgba[0v];[1v]settb=AVTB,format=rgba[1v];[0v][1v]xfade=transition=wiperight:duration=0.137:offset=0,settb=AVTB,setpts=PTS-STARTPTS[1v];[1v]scale='if(between(t,0,0+0.137),0.645+((t-0)*128.355/0.137),if(gte(t,0.137),129,129))':-1:eval=frame,fade=in:st=0:d=0.137[1v];[0v][1v]overlay=x=(W-w)/2:y=(H-h)/2:threads=1" -copyts -c:v prores_ks -profile:v 4 -pix_fmt rgba -movflags faststart -r 30 -t 0.137 -y mymovie2.mov


Here are a couple of screenshots comparing the two at the same timestamp (the very end).


The one on the left is without the wipe, the one on the right at the same timestamp is with the wipe, but you can see the text is partially clipped, it isn't at the same sacale and it isn't at full brightness almost as if the something is delaying all aspects of each filter.




-
Layout Video Recording Like Instgram/ Ticktok Feature
21 mars 2023, par Amarchand KI'm try to do record video inn different layouts like Instagram in Flutter. For this feature I used ffmpeg_kit_flutter package. I refers this solution to do this. but output video is blank, any one helps me to solve this.
the video input and output path is valid, also show the bellow error while printing,


`ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
 configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --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-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-gmp --enable-gnutls --enable-iconv --disable-sdl2 --disable-openssl --enable-zlib --enable-mediacodec
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 -vsync is deprecated. Use -fps_mode
 Passing a number to -vsync is deprecated, use a string argument as described in the manual.
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.example.tuki_taki/cache/REC1453994379216336834.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2023-03-21T07:15:58.000000Z
 com.android.version: 12
 Duration: 00:00:03.77, start: 0.000000, bitrate: 2204 kb/s
 Stream #0:0[0x1](eng): Video: h264, 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt470bg/smpte170m/bt709, progressive, left), 640x480, 2199 kb/s, 29.61 fps, 29.58 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2023-03-21T07:15:58.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #0:1[0x2](eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2023-03-21T07:15:58.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
 Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.example.tuki_taki/cache/REC5972384708251368209.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2023-03-21T07:16:05.000000Z
 com.android.version: 12
 Duration: 00:00:02.84, start: 0.000000, bitrate: 2703 kb/s
 Stream #1:0[0x1](eng): Video: h264, 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt470bg/smpte170m/bt709, progressive, left), 640x480, 2801 kb/s, 29.61 fps, 29.58 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2023-03-21T07:16:05.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #1:1[0x2](eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2023-03-21T07:16:05.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
 Stream mapping:
 Stream #0:0 (h264) -> scale:default
 Stream #0:1 (aac) -> amix
 Stream #1:0 (h264) -> scale:default
 Stream #1:1 (aac) -> amix
 hstack:default -> Stream #0:0 (mpeg4)
 amix:default -> Stream #0:1 (aac)
 Press [q] to stop, [?] for help
 Output #0, mp4, to '/data/user/0/com.example.tuki_taki/cache/output.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 com.android.version: 12
 encoder : Lavf59.27.100
 Stream #0:0: Video: mpeg4, 1 reference frame (mp4v / 0x7634706D), yuv420p(progressive), 960x640 (0x0) [SAR 1:1 DAR 3:2], q=2-31, 200 kb/s, 29.58 fps, 11360 tbn
 Metadata:
 encoder : Lavc59.37.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, delay 1024, 69 kb/s
 Metadata:
 encoder : Lavc59.37.100 aac
 frame= 1 fps=0.0 q=4.3 size= 0kB time=00:00:00.23 bitrate= 1.5kbits/s speed=3.49x 



[mpeg4 @ 0xb400007122ebac50] Invalid pts (8) <= last (8)
Error submitting video frame to the encoder
[aac @ 0xb4000071232208c0] Qavg : 9911.349
[aac @ 0xb4000071232208c0] 2 frames left in the queue on closing
Conversion failed`


I'm tried


`Future<void> onLayoutDone() async {
try {
 final String outputPath = await _getTempPath(); 
 const String filter =
 "[0:v]scale=480:640,setsar=1[l];[1:v]scale=480:640,setsar=1[r];[l][r]hstack;[0][1]amix -vsync 0 "; 
 log("left path: ${layoutVideoPathList[0]} right : ${layoutVideoPathList[1]} $outputPath"); 
 final String command =" -y -i ${layoutVideoPathList[0]} -i ${layoutVideoPathList[1]} -filter_complex$filter$outputPath -loglevel verbose"; `these paths are valid` 
 
 await FFmpegKit.execute(command).then((value) async { 
 String? error = await value.getAllLogsAsString(); 
 log(error!); 
 final ReturnCode? returnCode = await value.getReturnCode(); 
 if (returnCode != null) {
 setVideo(videoPath: outputPath); 
 layoutVideoPathList.clear(); 
 }
 });
} catch (e) {
 log("error while combine -========-=-=-=-=-=-=-=-=- $e"); 
}`
</void>


-
Split h.264 stream into multiple parts in python
31 janvier 2023, par BillPlayzMy objective is to split an h.264 stream into multiple parts, meaning while reading the stream from a pipe i would like to save it into x second long packages (in my case 10).


I am using a libcamera-vid subprocess on my Raspberry Pi that outputs the h.264 stream into stdout.

Might be irrelevant, depends : libcamera-vid outputs a message every frame and I am able to locate it at isFrameStopLine
To convert the stream, I use an ffmpeg subprocess, as you can see in the code below.

Imagine it like that :

Stream is running...

- Start recording to a file

- Sleep x seconds

- Finish recording to file

- Start recording a new file

- Sleep x seconds

- Finish recording the new file

- and so on...

Here is my current code, however upon running the first export succeeds, and after the second or third the ffmpeg-subprocess is terminating with the error :

pipe:: Invalid data found when processing input

And shortly after, the python process, because of the ffmpeg termination i believe.
Traceback (most recent call last): File "/home/survpi-camera/main.py", line 56, in <module> processStreamLine(readData) File "/home/survpi-camera/main.py", line 16, in processStreamLine streamInfo["process"].stdin.write(data) BrokenPipeError: [Errno 32] Broken pipe</module>


recentStreamProcesses = []
streamInfo = {
 "lastStreamStart": -1,
 "process": None
}

def processStreamLine(data):
 isInfoLine = ((data.startswith(b"[") and (b"INFO" in data)) or (data == b"Preview window unavailable"))
 isFrameStopLine = (data.startswith(b"#") and (b" fps) exp" in data))
 if ((not isInfoLine) and (not isFrameStopLine)):
 streamInfo["process"].stdin.write(data)
 
 if (isFrameStopLine):
 if (time.time() - streamInfo["lastStreamStart"] >= 10):
 print("10 seconds passed, exporting...")
 exportStream()
 createNewStream()

def createNewStream():
 streamInfo["lastStreamStart"] = time.time()
 streamInfo["process"] = subprocess.Popen([
 "ffmpeg",
 "-r","30",
 "-i","-",
 "-c","copy",("/home/survpi-camera/" + str(round(time.time())) + ".mp4")
 ],stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
 print("Created new streamProcess.")

def exportStream():
 print("Exporting...")
 streamInfo["process"].stdin.close()
 recentStreamProcesses.append(streamInfo["process"])


cameraProcess = subprocess.Popen([
 "libcamera-vid",
 "-t","0",
 "--width","1920",
 "--height","1080",
 "--codec","h264",
 "--inline",
 "--listen",
 "-o","-"
],stdout=subprocess.PIPE,stdin=subprocess.PIPE,stderr=subprocess.STDOUT)

createNewStream()

while True:
 readData = cameraProcess.stdout.readline()
 
 processStreamLine(readData)



Thank you in advance !