
Recherche avancée
Autres articles (62)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (9463)
-
Connect external cameras to iOS and decompress to a usable form
27 septembre 2017, par Ping ChenI want to create a 2 camera setup which can send 1 of the camera views out as an RTMP stream depending on the motion intensity detected. The chosen camera view can change if motion intensity on the views changes.
I imagine that I could use an iPhone/iPad as encoding/streaming hub as well as 1 of the cameras. And connect a WiFi camera to the iPad/iPhone to feed the 2nd camera view.
My goals for the iOS side are :
- Connect with a WiFi camera on the local network
- Decode the data and run motion intensity detection on the WiFi camera feed AND the iPhone/iPad’s own camera feed with Brad Larson’s GPUImage framework https://github.com/BradLarson/GPUImage
- Stream out the chosen camera view. depending on motion detected
Larson’s GPUImage framework works with an AVCaptureSession subclass. I’m only familiar with AVFoundation objects, but am a complete noob with it comes to VideoToolbox and some of the lower level iOS video stuff. Through googling, I kind of know that VTDecompressionSession is what I’d get from the WiFi camera. I have no clue how I can manipulate that to a usable form for my purposes.
I’ve dug through stackoverflow answers such as : https://stackoverflow.com/a/29525001/7097455
Very informative, but maybe I don’t even know to ask the correct questions
-
Windows(WASAPI):Converting IEEE float PCM to PCM 16bit
10 octobre 2017, par Michael IVI do a hook into some of WASAPI methods to read out audio buffer that contains system sound.
The source is WAV with audio
format = WAVE_FORMAT_IEEE_FLOAT
andsubformat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
I am trying to convert it to PCM 16bit on the fly using FFMPEG libswresample. The resulting soundtrack has alot of forground noise with the original track’s data playing in the background.
Here is how I do it (I skip WASAPI init part) :
First,the source WAVEFORMATEX struct has the following properties :
Format tag:65534
Sample rate:44100
Num channels:2
CB size:22
Average bytes per sec:352800
Block align:8
Bits per sample:32Where 65534 stands for WAVE_FORMAT_IEEE_FLOAT.
WAVEFORMATEX *w;//filled with the props above
int samples = 0;
int bufferSize = 0;
int buffer_frames = 0;
int bWritten = 0;
char* bufferIn = NULL;
char* bufferOut = NULL;
BYTE* wavBuffer = NULL;
void InitSWRContext()
{
swrctx = swr_alloc_set_opts(NULL,
AV_CH_LAYOUT_STEREO, //stereo layout
AV_SAMPLE_FMT_S16, // sample out format
44100, // out sample rate
2, //number of channels
AV_SAMPLE_FMT_FLT, //sample in format
w->nSamplesPerSec ,//in sample rate
0,
NULL);
swr_init(swrctx);
//also tried like this:
/*
swrctx = swr_alloc();
av_opt_set_int(swrctx, "in_channel_layout", CA2SWR_chlayout(w->nChannels), 0);
av_opt_set_int(swrctx, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
av_opt_set_int(swrctx, "in_sample_rate", 44100, 0);
av_opt_set_int(swrctx, "out_sample_rate", 44100, 0);
av_opt_set_sample_fmt(swrctx, "in_sample_fmt", AV_SAMPLE_FMT_FLT, 0);
av_opt_set_sample_fmt(swrctx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
*/
samples = (int)av_rescale_rnd(CA_MAX_SAMPLES, 44100, w->nSamplesPerSec,
AV_ROUND_UP);
bufferSize = av_samples_get_buffer_size(NULL,2, samples * 2,AV_SAMPLE_FMT_S16, 1/*no-alignment*/);
bufferOut = ( char *)malloc(bufferSize ))
}These two methods are invoked by the system and I hook them to access audio buffer :
DEXPORT HRESULT __stdcall
_GetBuffer(
IAudioRenderClient *thiz,
UINT32 NumFramesRequested,
BYTE **ppData)
{
HRESULT hr;
hr = orig_GetBuffer(thiz, NumFramesRequested, ppData);
bufferIn = (char*)*ppData;
buffer_frames = NumFramesRequested;
return S_OK;
}Then on buffer release I perform the conversion and readout.
DEXPORT HRESULT __stdcall
_ReleaseBuffer(IAudioRenderClient *thiz,
UINT32 NumFramesWritten, DWORD dwFlags)
{
const unsigned char *srcplanes[2];
unsigned char *dstplanes[2];
int samples;
srcplanes[0] = (unsigned char*)bufferIn;
srcplanes[1] = NULL;
dstplanes[0] = (unsigned char*)bufferOut;
dstplanes[1] = NULL;
samples = (int)av_rescale_rnd(NumFramesWritten, 44100, 44100, AV_ROUND_UP);
int samplesConverted = swr_convert(swrctx, dstplanes, samples , srcplanes, NumFramesWritten);
int framesize = (/*PCM16*/16 / 8) * pwfx->nChannels * NumFramesWritten;
if (!wavBuffer)
{
wavBuffer = (BYTE*)malloc(4096 * 1000); //write out a few seconds
}
//copy converted buffer into wavBuffer
memcpy(wavBuffer + bWritten, bufferOut, framesize);
bWritten += framesize;
if (bWritten > 4096 * 1000)
{
pwfx->wFormatTag = WAVE_FORMAT_PCM;
pwfx->wBitsPerSample = 16;
pwfx->nBlockAlign = (pwfx->nChannels * pwfx->wBitsPerSample) / 8;
pwfx->cbSize = 0;
SaveWaveData(wavBuffer, bWritten, pwfx, L"test.wav");
exit(0);
}
}SaveWaveData
borrowed from here.Resulting sound file(WAV)
Original file : a2002011001-e02.wav
I tried to play and analyze the output in VLC,Audacity, and FMOD Studio.
The strange thing is that VLC show (codec info) that it is PCM16, while FMOD studio interprets the data as PCM32. I also tried to store without conversion the original buffer which also produces a sound with noise,though not as significant as when converting to PCM16 -
FFmpeg HLS Live Stream Stuck with iOS 11
1er novembre 2017, par LamorunI’ve exp with FFmpeg but i recent problem with iOS 11 (Recent release for Apple)
I used FFmpeg for stream HLS Live Stream for only iPhone and iPad in closed app for online courses. My problem is the next :
I used this code for HLS Live Stream :
ffmpeg -i "Input" -preset fast -c:v libx264 -c:a aac -ac 1 -strict -2 -crf 18 -profile:v baseline -maxrate 1000k -bufsize 1835k -pix_fmt yuv420p -b:a 64k -flags -global_header -hls_time 20 -hls_list_size 6 -hls_wrap 10 -start_number 1 /m3u8/test.m3u8
This work perfect in iOS 8, 9 and 10 devices. But with new version iOS 11, video is stuck after about 30 to 40 seconds, as seen in the image :
I have searched for hours and hours. I have done many tests, but I can not get it out, since it works perfectly with iOS 8,9 and 10 (test in somes devices, even working perfectly on a device with iOS 10, update to iOS 11, and stop working immediately, downgrade to iOS 10 and work again)
I hope someone can help me out, thank you and greetings to all