
Recherche avancée
Autres articles (35)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
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" ;
Sur d’autres sites (3790)
-
With apulsator in ffempeg - How do I make so one side does not completely become silent ?
3 avril 2022, par corgrathI am trying to learn more about signal processing and the
apulsator
effect in ffmpeg.

http://ffmpeg.org/ffmpeg-filters.html#apulsator


With the most default example :


ffmpeg -y -i input.mp3 -af "apulsator=hz=0.0625:timing=hz:mode=sine" output.mp3


You can clearly hear that the sound travels from left to right and then back to left, as expected.


However, I am trying to understand how/if it is possible that sound volume does not completely becomes silent, but perhaps 10% of the volume, while the other side gets 90%.


What I am trying to achieve is that one side does not completely becomes silent.


If this cannot be achieved solely by the
apulsator
settings, what other effects or ways can I achieve this using ffmpeg ?

Any advice is appreciated !


-
FFmpeg uses xface to merge videos without transition effects
30 avril 2024, par soapbarffmpeg -i ./first.mp4 -i ./first.mp4 -filter_complex "xfade=transition=circlecrop:duration=1:offset=4,format=yuv420p" -y output.mp4


FFMPEG version 6.1.1, the video is generated normally without any error prompts, but the generated video does not have any transition effects.


output



ffmpeg version 6.1.1-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 11.0.0 (clang-1100.0.33.17)
 configuration : —cc=/usr/bin/clang —prefix=/opt/ffmpeg —extra-version=tessus —enable-avisynth —enable-fontconfig —enable-gpl —enable-libaom —enable-libass —enable-libbluray —enable-libdav1d —enable-libfreetype —enable-libgsm —enable-libmodplug —enable-libmp3lame —enable-libmysofa —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenh264 —enable-libopenjpeg —enable-libopus —enable-librubberband —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libtwolame —enable-libvidstab —enable-libvmaf —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxavs —enable-libxml2 —enable-libxvid —enable-libzimg —enable-libzmq —enable-libzvbi —enable-version3 —pkg-config-flags=—static —disable-ffplay
 libavutil 58. 29.100 / 58. 29.100
 libavcodec 60. 31.102 / 60. 31.102
 libavformat 60. 16.100 / 60. 16.100
 libavdevice 60. 3.100 / 60. 3.100
 libavfilter 9. 12.100 / 9. 12.100
 libswscale 7. 5.100 / 7. 5.100
 libswresample 4. 12.100 / 4. 12.100
 libpostproc 57. 3.100 / 57. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './first.mp4' :
 Metadata :
 major_brand : isom
 minor_version : 512
 compatible_brands : isomiso2avc1mp41
 encoder : Lavf61.1.100
 Duration : 00:00:05.00, start : 0.000000, bitrate : 110 kb/s
 Stream #0:0[0x1](und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920 [SAR 4095:4096 DAR 36855:65536], 109 kb/s, SAR 14317:14320 DAR 128853:229120, 0.20 fps, 0.20 tbr, 16384 tbn (default)
 Metadata :
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc61.3.100 libx264
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from './first.mp4' :
 Metadata :
 major_brand : isom
 minor_version : 512
 compatible_brands : isomiso2avc1mp41
 encoder : Lavf61.1.100
 Duration : 00:00:05.00, start : 0.000000, bitrate : 110 kb/s
 Stream #1:0[0x1](und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920 [SAR 4095:4096 DAR 36855:65536], 109 kb/s, SAR 14317:14320 DAR 128853:229120, 0.20 fps, 0.20 tbr, 16384 tbn (default)
 Metadata :
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc61.3.100 libx264
Stream mapping :
 Stream #0:0 (h264) -> xfade
 Stream #1:0 (h264) -> xfade
 format:default -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 0x7f9f99fc87c0] using SAR=4095/4096
[libx264 @ 0x7f9f99fc87c0] using cpu capabilities : MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7f9f99fc87c0] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x7f9f99fc87c0] 264 - core 164 r3172 c1c9931 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - 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=1 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 :
 major_brand : isom
 minor_version : 512
 compatible_brands : isomiso2avc1mp41
 encoder : Lavf60.16.100
 Stream #0:0 : Video : h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1080x1920 [SAR 14317:14320 DAR 128853:229120], q=2-31, 0.20 fps, 16384 tbn
 Metadata :
 encoder : Lavc60.31.102 libx264
 Side data :
 cpb : bitrate max/min/avg : 0/0/0 buffer size : 0 vbv_delay : N/A
[out#0/mp4 @ 0x7f9f99fc74c0] video:72kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 1.190217%
frame= 2 fps=0.0 q=-1.0 Lsize= 73kB time=00:00:05.00 bitrate= 118.9kbits/s speed=45.5x 
[libx264 @ 0x7f9f99fc87c0] frame I:1 Avg QP:12.25 size : 72527
[libx264 @ 0x7f9f99fc87c0] frame P:1 Avg QP:13.77 size : 216
[libx264 @ 0x7f9f99fc87c0] mb I I16..4 : 51.4% 34.9% 13.8%
[libx264 @ 0x7f9f99fc87c0] mb P I16..4 : 0.0% 0.0% 0.0% P16..4 : 0.8% 0.0% 0.0% 0.0% 0.0% skip:99.2%
[libx264 @ 0x7f9f99fc87c0] 8x8 transform intra:34.9% inter:0.0%
[libx264 @ 0x7f9f99fc87c0] coded y,uvDC,uvAC intra : 9.2% 9.6% 6.9% inter : 0.0% 0.6% 0.0%
[libx264 @ 0x7f9f99fc87c0] i16 v,h,dc,p : 79% 20% 2% 0%
[libx264 @ 0x7f9f99fc87c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu : 1% 97% 2% 0% 0% 0% 0% 0% 0%
[libx264 @ 0x7f9f99fc87c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu : 36% 32% 10% 3% 3% 3% 4% 3% 4%
[libx264 @ 0x7f9f99fc87c0] i8c dc,h,v,p : 80% 15% 4% 0%
[libx264 @ 0x7f9f99fc87c0] Weighted P-Frames : Y:0.0% UV:0.0%
[libx264 @ 0x7f9f99fc87c0] kb/s:58.19



-
Further Dreamcast Hacking
3 février 2011, par Multimedia Mike — Sega DreamcastI’m still haunted by Sega Dreamcast programming, specifically the fact that I used to be able to execute custom programs on the thing (roughly 8-10 years ago) and now I cannot. I’m going to compose a post to describe my current adventures on this front. There are 3 approaches I have been using : Raw, Kallistios, and the almighty Linux.
Raw
What I refer to as "raw" is an assortment of programs that lived in a small number of source files (sometimes just one ASM file) and could be compiled with the most basic SH-4 toolchain. The advantage here is that there aren’t many moving parts and not many things that can possibly go wrong, so it provides a good functional baseline.One of the original Dreamcast hackers was Marcus Comstedt, who still has his original DC material hosted at the reasonably easy-to-remember URL mc.pp.se/dc. I can get some of these simple demos to work, but not others.
I also successfully assembled and ran a pair of 256-byte (!!) demos from this old DC scene page.
KallistiOS
KallistiOS (or just KOS) was a real-time OS developed for the DC and was popular among the DC homebrew community. All the programming I did back in the day was based around KOS. Now I can’t get any of it to work. More specifically, KOS can’t seem to make it past a certain point in its system initialization.The Linux Option
I was never that excited about running Linux on my Dreamcast. For some hackers, running Linux on a given piece of consumer electronics is the highest attainable goal. Back in the day, I looked at it from a much more pragmatic perspective— I didn’t see much use in running Linux on the DC, not as much as running KOS which was developed to be a much more appropriate fit.However, I was able to burn a CD-R of an old binary image of Linux 2.4.5 compiled for the Dreamcast and boot it some months ago. So I at least have a feeling that this should work. I have never cross-compiled a kernel of my own (though I have compiled many, many x86 kernels in my time, so I’m not a total n00b in this regard). I figured this might be a good time to start.
The first item that worries me is getting a functional cross-compiling toolchain. Fortunately, a little digging in the Linux kernel documentation pointed me in the direction of a bunch of ready-made toolchains hosted at kernel.org. So I grabbed one of the SH toolchains (gcc-4.3.3-nolibc) and got rolling.
I’m well familiar with the cycle of
'make menuconfig'
in order to pick configuration options, and then'make'
to build a kernel (or usually'make zImage'
or'make bzImage'
to create compressed images). For cross compiling, the primary difference seems to be editing the root Makefile in the Linux source code tree (I’m using 2.6.37, the latest stable as of this writing) and setting a value for the CROSS_COMPILE variable. Then, run'make menuconfig'
followed by'make'
as normal.The Linux 2.6 series is supposed to support a range of Renesas (formerly Hitachi) SH processors and board configurations. This includes reasonable defaults for the Sega Dreamcast hardware. I got it all compiling except for a series of .S files. Linus Torvalds once helped me debug a program I work on so I thought I’d see if there was something I could help debug here.
The first issue was with ASM statements of a form similar to :
mov #0xffffffe0, r1
Now, the DC’s SH-4 is a RISC CPU. A lot of RISC architectures adopt a fixed instruction size of 32 bits. You can’t encode an entire 32-bit immediate value inside of a 32-bit instruction (there would be no room for the instruction encoding). Further, the SH series encoded instructions with a mere 16 bits. The move immediate data instruction only allows for an 8-bit, sign-extended value.
I decided that the above statement is equivalent to :
mov #-32, r1
I’ll give this statement the benefit of the doubt that it used to work with the gcc toolchain somewhere along the line. I assume that the assembler is supposed to know enough to substitute the first form with the second.
The next problem is that an ’sti’ instruction shows up in a number of spots. Using Intel x86 conventions, this is a "set interrupt flag" instruction (I remember that the 6502 CPU had the same instruction mnemonic, though its interrupt flag’s operation was opposite that of the x86). The SH-4 reference manual lists no ’sti’ instruction. When it gets to these lines, the assembler complains about immediate move instructions with too large data, like the instructions above. I’m guessing they must be macro’d to something else but I failed to find where. I commented out those lines for the time being. Probably not that smart, but I want to keep this moving for now.
So I got the code to compile into a kernel file called ’vmlinux’. I’ve seen this file many times before but never thought about how to get it to run directly. The process has usually been to compress it and send it over to lilo or grub for loading, as that is the job of the bootloader. I have never even wondered what format the vmlinux file takes until now. It seems that ’vmlinux’ is just a plain old ELF file :
$ file vmlinux vmlinux : ELF 32-bit LSB executable, Renesas SH, version 1 (SYSV), statically linked, not stripped
The ’dc-tool’ program that uploads executables to the waiting bootloader on the Dreamcast is perfectly cool accepting ELF files (and S-record files, and raw binary files). After a very lengthy upload process, execution fails (resets the system).
For the sake of comparison, I dusted off that Linux 2.4.5 bootable Dreamcast CD-ROM and directly uploaded the vmlinux file from that disc. That works just fine (until it’s time to go to the next loading phase, i.e., finding a filesystem). Possible issues here could include the commented ’sti’ instructions (could be that they aren’t just decoration). I’m also trying to understand the memory organization— perhaps the bootloader wants the ELF to be based at a different address. Or maybe the kernel and the bootloader don’t like each other in the first place— in this case, I need to study the bootable Linux CD-ROM to see how it’s done.
Optimism
Even though I’m meeting with rather marginal success, this is tremendously educational. I greatly enjoy these exercises if only for the deeper understanding they bring for the lowest-level system details.