
Recherche avancée
Médias (1)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (38)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
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 -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)
Sur d’autres sites (8521)
-
How to use FFmpeg from a location where access is denied? [closed]
27 mars 2024, par quite a beginnerI tried to convert m3u8 file to ts file with FFmpeg, but my ip address was being rejected and I couldn't. Is there any way to do this ?


I tried converting with glitch using glitch console and then downloading the entire repository, but I could only download up to 180MB.It was certainly a reliable method, but it failed because it could only use up to 180MB.


-
Converting Unity texture2d to YUV420P for ffmpeg
1er février 2021, par DDovzhenkoI'm trying to create video recorder inside Unity player using FFmpeg.



I have next code snippets :



Unity, C# :



Texture2D frameTexture = new Texture2D(frameWidth, frameHeight, TextureFormat.RGB24, false);
//...
frameTexture.ReadPixels(new Rect(0, 0, frameWidth, frameHeight), 0, 0, false);
frameTexture.Apply();
//.....
byte[] pixels = frameTexture.GetRawTextureData();
AddFrame(pixels, pixels.Length, libApi);


//DLL Function Declaration
[DllImport("VideoCapture", CallingConvention = CallingConvention.Cdecl)]
static extern void AddFrame(byte[] data, int size, System.IntPtr api);




C++ code :



__declspec(dllexport) void AddFrame(uint8_t *data, int size, VideoCapture *vc) {
 vc->AddFrame(data, size);
}

void VideoCapture::AddFrame(uint8_t *data, int size) {
 Log("\nAdding frame\n");

 int err;
 if (!videoFrame) {
 Log("Allocating Video Frame\n");

 videoFrame = av_frame_alloc();
 videoFrame->format = AV_PIX_FMT_YUV420P;
 videoFrame->width = cctx->width;
 videoFrame->height = cctx->height;

 if ((err = av_frame_get_buffer(videoFrame, 32)) < 0) {
 Debug("Failed to allocate picture", err);
 return;
 }
 }

 if (!swsCtx) {
 Log("Creating SWS context\n");
 swsCtx = sws_getContext(cctx->width, cctx->height, AV_PIX_FMT_RGB24, cctx->width, cctx->height, AV_PIX_FMT_YUV420P, 0, 0, 0, 0);
 }

 uint8_t * inData[1] = { data };
 int inLinesize[1] = { 3 * cctx->width };

 Log("Scaling data\n");
 // From RGB to YUV
 if ((err = sws_scale(swsCtx, inData, inLinesize, 0, cctx->height, videoFrame->data, videoFrame->linesize)) < 0) {
 Debug("Failed to scale img", err);
 return;
 }
 ...........




Unity player crashes when it's doing "sws_scale".



Logs from Unity :



ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF8437B49A6)
0x00007FF8437B49A6 (swscale-4) 
 ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF8437B2982)
0x00007FF8437B2982 (swscale-4) 
0x00007FF8437E78A6 (swscale-4) sws_get_class
0x00007FF8437E8E47 (swscale-4) sws_scale




I thought its because of 'sws_get_class', but it works if I call this function directly. It also works if I pass empty data into 'sws_scale', only complaining that it's NULL. So, the reason is in data itself, but I don't what's wrong with it.



I also tried to encode texture to JPG and PNG, pinned array into memory, but the result didn't change.



Thanks in advance



UPD:: :



Changed DLL function calling to



unsafe void AddFrame(byte[] data)
{
 fixed (byte* p = data)
 {
 AddFrame((IntPtr)p, data.Length, customLib);
 }
}
//Function declaration
static extern void AddFrame(IntPtr data, int size, System.IntPtr api);




But error is still there.


-
FFMPEG fatal signal 11 (SIGSEGV) on Android 5.0.2
14 juillet 2015, par Jerikc XIONGI use the idol347(Android 5.0.2) to broadcast streaming, but I got the following error :
07-14 15:16:20.484 F/libc (26905): invalid address or address of corrupt block 0x7490b06f passed to dlfree
07-14 15:16:20.485 F/libc (26905): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadbaad in tid 27282 (FFmpeg)
07-14 15:16:20.567 E/mm-camera( 342): cpp_hardware_process_frame:1105, v4l2 ioctl() failed. rc:-1, trans_code:-11, frame_id=217, identity=0x10002
07-14 15:16:20.587 I/DEBUG ( 292): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-14 15:16:20.587 I/DEBUG ( 292): Build fingerprint: 'TCL/6039K/idol347:5.0.2/LRX22G/v1AEY-0:user/release-keys'
07-14 15:16:20.587 I/DEBUG ( 292): Revision: '0'
07-14 15:16:20.587 I/DEBUG ( 292): ABI: 'arm'
07-14 15:16:20.587 I/DEBUG ( 292): pid: 26905, tid: 27282, name: FFmpeg >>> com.streaming.camera.demo <<<
07-14 15:16:20.587 I/DEBUG ( 292): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdeadbaad
07-14 15:16:20.601 I/DEBUG ( 292): Abort message: 'invalid address or address of corrupt block 0x7490b06f passed to dlfree'
07-14 15:16:20.601 I/DEBUG ( 292): r0 00000000 r1 b6f40dec r2 deadbaad r3 00000000
07-14 15:16:20.601 I/DEBUG ( 292): r4 7490b06f r5 b6f420f4 r6 a33d4000 r7 7490b077
07-14 15:16:20.601 I/DEBUG ( 292): r8 7490b070 r9 00000000 sl 00000000 fp 12e9c140
07-14 15:16:20.601 I/DEBUG ( 292): ip 00000000 sp a4bb6970 lr b6f126b7 pc b6f126b8 cpsr 600f0030
07-14 15:16:20.602 I/DEBUG ( 292):
07-14 15:16:20.602 I/DEBUG ( 292): backtrace:
07-14 15:16:20.602 I/DEBUG ( 292): #00 pc 000286b8 /system/lib/libc.so (dlfree+1239)
07-14 15:16:20.602 I/DEBUG ( 292): #01 pc 0000ef2b /system/lib/libc.so (free+10)
07-14 15:16:20.602 I/DEBUG ( 292): #02 pc 000234bf /data/app/com.streaming.camera.demo-1/lib/arm/ffmpegbridge.so (write_packet+146)
07-14 15:16:20.602 I/DEBUG ( 292): #03 pc 000b2b87 /data/dalvik-cache/arm/data@app@com.streaming.camera.demo-1@base.apk@classes.dexThe related code snippet as following :
write_packet(FFmpegBridgeContext *br_ctx, uint8_t *data, int data_size, long pts,
int is_video, int is_video_keyframe) {
AVPacket *packet;
AVStream *st;
AVCodecContext *c;
uint8_t *filtered_data = NULL, *keyframe_data = NULL;
packet = av_malloc(sizeof(AVPacket));
if (!packet) {
LOGE("ERROR: write_packet couldn't allocate memory for the AVPacket");
}
_init_packet(packet);
if (is_video) {
packet->stream_index = br_ctx->video_stream_index;
if (is_video_keyframe) {
packet->flags |= AV_PKT_FLAG_KEY;
}
} else {
packet->stream_index = br_ctx->audio_stream_index;
}
packet->size = data_size;
packet->pts = packet->dts = pts;
packet->data = data;
st = br_ctx->output_fmt_ctx->streams[packet->stream_index];
c = st->codec;
// filter the packet (if necessary)
filtered_data = _filter_packet(br_ctx, st, packet);
// rescale the timing information for the packet
_rescale_packet(br_ctx, st, packet);
// write the frame
_write_packet(br_ctx, packet);
// clean up
if (filtered_data) {
av_free(filtered_data);
}
if (keyframe_data) {
av_free(keyframe_data);
}
av_free_packet(packet);
}After a struggle, I found it crashes because of here :
av_free(filtered_data);
BTW, it works fine on Android 4.3/4.4.
How to solve it ?