
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (68)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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 (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (6979)
-
avcodec/indeo3data : fix undefined left shift of negative number
19 septembre 2015, par Ganesh Ajjanagaddeavcodec/indeo3data : fix undefined left shift of negative number
This fixes a whole sea of -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.
Any half decent compiler should anyway optimize away the multiplication.Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by : James Almer <jamrial@gmail.com> -
ffmpeg use gpu to encode mpeg4 to ts/m3u8 [closed]
14 novembre 2024, par danielRICADOusing ffmpeg I want to trim and transcode a mpeg4 from ts / m3u8


std::string ffmpeg_command = "ffmpeg -hwaccel drm -i " + output_dir + input_file +
 " -ss 00:00:00.00 -t 31 -c:v " + codec + " -b:v " + std::to_string(bitrate) +
 " -vf scale=" + std::to_string(width) + "x" + std::to_string(height) +
 " -hls_time " + std::to_string(30) + " -hls_list_size 0 -hls_segment_filename " +
 ts_file_pattern + " -f hls " + m3u8_file;



I wanted to choose between codecs based on the system, if gpu is avaiable I'd like to opt to use it, right now I just check if the codec is available


bool is_h264_v4l2m2m_available() {
 std::string result = exec_command("ffmpeg -encoders 2>&1");
 return result.find("h264_v4l2m2m") != std::string::npos;
}



if it is a I wanted to move that process over to the gpu, not just use libx264. Here is the error log. Studying hard on the solution but wold super apperciate any expert advice.


other considerations are - runs in a docker container on a pi5, pibian on the host apline on in the container, container runs in privledged mode


2024-11-14 15:18:41 [INFO]: assigned codec: h264_v4l2m2m
2024-11-14 15:18:41 ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
2024-11-14 15:18:41 built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309
2024-11-14 15:18:41 configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl
2024-11-14 15:18:41 libavutil 58. 29.100 / 58. 29.100
2024-11-14 15:18:41 libavcodec 60. 31.102 / 60. 31.102
2024-11-14 15:18:41 libavformat 60. 16.100 / 60. 16.100
2024-11-14 15:18:41 libavdevice 60. 3.100 / 60. 3.100
2024-11-14 15:18:41 libavfilter 9. 12.100 / 9. 12.100
2024-11-14 15:18:41 libswscale 7. 5.100 / 7. 5.100
2024-11-14 15:18:41 libswresample 4. 12.100 / 4. 12.100
2024-11-14 15:18:41 libpostproc 57. 3.100 / 57. 3.100
2024-11-14 15:18:42 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/app/client-data/camera-output/7ea3cbef-4da0-11ed-bdcc-baf70a43c072/1731550687270.mp4':
2024-11-14 15:18:42 Metadata:
2024-11-14 15:18:42 major_brand : isom
2024-11-14 15:18:42 minor_version : 512
2024-11-14 15:18:42 compatible_brands: isomiso2avc1mp41
2024-11-14 15:18:42 encoder : Lavf60.16.100
2024-11-14 15:18:42 Duration: 00:00:31.33, start: 0.000000, bitrate: 678 kb/s
2024-11-14 15:18:42 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1024x1024, 677 kb/s, 15 fps, 15 tbr, 15360 tbn (default)
2024-11-14 15:18:42 Metadata:
2024-11-14 15:18:42 handler_name : VideoHandler
2024-11-14 15:18:42 vendor_id : [0][0][0][0]
2024-11-14 15:18:42 [AVFormatContext @ 0x7f9254dcb4c0] Unable to choose an output format for '678000'; use a standard extension for the filename or specify the format manually.
2024-11-14 15:18:42 [out#0 @ 0x7f9254d70700] Error initializing the muxer for 678000: Invalid argument
2024-11-14 15:18:42 Error opening output file 678000.
2024-11-14 15:18:42 Error opening output files: Invalid argument
2024-11-14 15:18:42 [ERROR]: Failed to generate .ts file for: 1731550687270.mp4



-
Converting RGB to YUV, + ffmpeg
10 juillet 2012, par TheSHEEEPI am trying the following to record a live video from my Flash/AIR application :
- I take a "screenshot" (BitmapData from stage) each frame.
-
I convert each pixel to yuv format like this (V2) :
var file :File = new File(_appUrl + "/creation/output.raw");
var fs :FileStream = new FileStream();
fs.open(file, FileMode.WRITE);
var finalY :ByteArray = new ByteArray();
var finalU :ByteArray = new ByteArray();
var finalV :ByteArray = new ByteArray();
var rect :Rectangle = new Rectangle(0, 0, 600, 700);
var pixels :ByteArray;
var pixel :uint;
var r :uint;
var g :uint;
var b :uint;
_screenBuffer = _screenBuffer.reverse();
while (_screenBuffer.length > 0)
{
pixels = BitmapData(_screenBuffer.pop()).getPixels(rect);
pixels.position = 0;
// Convert and save each pixel
for (var x:int = 0; x < 600; x++)
{
for (var y:int = 0; y < 700; y++)
{
// Convert to yuv
pixel = pixels.readUnsignedInt();
r = pixel >> 16 & 0xff;
g = pixel >> 8 & 0xff;
b = pixel & 0xff;
// Y' is written for each pixel
finalY.writeByte(0.257 * r + 0.504 * g + 0.098 * b + 128);
// U and V are written once per 2x2 pixel block
if (x % 2 == 0 && y % 2 == 0)
{
finalU.writeByte(-0.148 * r - 0.291 * g + 0.439 * b + 128);
finalV.writeByte(0.439 * r - 0.368 * g - 0.071 * b + 128);
}
}
}
}
// Write the converted bytes to the file
finalY.position = 0;
finalU.position = 0;
finalV.position = 0;
fs.writeBytes(finalY, 0, finalY.length);
fs.writeBytes(finalU, 0, finalU.length);
fs.writeBytes(finalV, 0, finalV.length);
fs.close(); -
I use the following line of ffmpeg to convert the raw file to a video :
ffmpeg -r 30 -pix_fmt yuv420p -s 600x700 -vcodec rawvideo -f rawvideo -i output.raw -y test.mp4
A video is created, but it is simply a mess, barely resembling what was recorded. I know that the capturing process works, as I have tried the same BitmapData "screenshots" with the SimpleFlvWriter.
So, either something is wrong with my conversion or with the ffmpeg line, but I have no idea.
This is what ffmpeg outputs when creating the video, maybe it can help someone :
libavutil 51. 39.100 / 51. 39.100
libavcodec 54. 3.101 / 54. 3.101
libavformat 54. 1.100 / 54. 1.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.101 / 2. 62.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
[rawvideo @ 01D39FC0] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'output.raw':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 600x700, 30 tbr,
30 tbn, 30 tbc
[buffer @ 01D3FEC0] w:600 h:700 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
[libx264 @ 0375DB80] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE 4.2 AVX
[libx264 @ 0375DB80] profile High, level 3.1
[libx264 @ 0375DB80] 264 - core 120 r2146 bcd41db - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - 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 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=0rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4':
Metadata:
encoder : Lavf54.1.100
Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 600x700, q=-1--1, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> libx264)
Press [q] to stop, [?] for help
Truncating packet of size 630000 to 1
frame= 48 fps= 0 q=-1.0 Lsize= 157kB time=00:00:01.53 bitrate= 837.3kbits/s
video:156kB audio:0kB global headers:0kB muxing overhead 0.687626%
[libx264 @ 0375DB80] frame I:3 Avg QP:23.15 size: 23480
[libx264 @ 0375DB80] frame P:38 Avg QP:28.80 size: 2169
[libx264 @ 0375DB80] frame B:7 Avg QP:29.61 size: 833
[libx264 @ 0375DB80] consecutive B-frames: 79.2% 4.2% 0.0% 16.7%
[libx264 @ 0375DB80] mb I I16..4: 41.4% 6.2% 52.4%
[libx264 @ 0375DB80] mb P I16..4: 10.6% 3.3% 0.9% P16..4: 68.4% 1.3% 1.2% 0.0% 0.0% skip:14.2%
[libx264 @ 0375DB80] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 13.3% 2.2% 0.7% direct: 1.9% skip:81.9% L0:51.6% L1:47.4% BI: 1.0%
[libx264 @ 0375DB80] 8x8 transform intra:16.7% inter:31.2%
[libx264 @ 0375DB80] coded y,uvDC,uvAC intra: 14.7% 25.5% 22.3% inter: 1.0% 4.1% 3.4%
[libx264 @ 0375DB80] i16 v,h,dc,p: 87% 11% 2% 0%
[libx264 @ 0375DB80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 3% 18% 75% 1% 0% 1% 1% 0% 0%
[libx264 @ 0375DB80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 6% 74% 12% 1% 1% 1% 2% 1% 2%
[libx264 @ 0375DB80] i8c dc,h,v,p: 51% 45% 4% 1%
[libx264 @ 0375DB80] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0375DB80] ref P L0: 4.6% 0.4% 94.6% 0.3%
[libx264 @ 0375DB80] ref B L0: 96.0% 4.0%
[libx264 @ 0375DB80] ref B L1: 96.5% 3.5%
[libx264 @ 0375DB80] kb/s:793.39I'm not really a codec expert (just starting ;)), so I don't know what to make of most of that.
Here is a zip that contains one of the frames and the video output. What should be visible is a green smiling pear, without any artifacts. Remember the size is 600x700 and the format yuv420. Best to view such raw image files with irfanview, IMO. Don't mind the noise, its from pushing against my microphone ;)