
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (97)
-
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 (...) -
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 (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (14544)
-
fate/id3v2 : Add a test for remuxing id3v2 private tags
10 avril 2021, par Andreas Rheinhardt -
How to convert AVFrame to cv::cuda::GpuMat
29 mai 2021, par BumpAfter I decode a frame use FFmpeg(Hardware decoding like this : https://github.com/FFmpeg/FFmpeg/blob/release/4.1/doc/examples/hw_decode.c)the decoded frames still remain on GPU memory. How can I convert AVFrame to GpuMat ?


I tried to do it using this code :


__global__ void NV12ToBGRkernel(uchar* ydata, uchar* uvdata, int ywidth, int uvwidth, cv::cuda::PtrStepSz<uchar3> rgbFrame) {
 int i = threadIdx.x + blockIdx.x * blockDim.x; 
 int j = threadIdx.y + blockIdx.y * blockDim.y; 

 int indexY = j * ywidth + i;
 int id2 = i % 2;
 int indexU = j / 2 * uvwidth + i - id2;
 int indexV = indexU + 1;

 if (j < rgbFrame.rows && i < rgbFrame.cols) {
 uchar Y = ydata[indexY];
 uchar U = uvdata[indexU];
 uchar V = uvdata[indexV];
 int R = Y + 1.402*(V - 128);
 int G = Y - 0.34414*(U - 128) - 0.71414*(V - 128);
 int B = Y + 1.772*(U - 128);

 if (R < 0)
 R = 0;
 if (G < 0)
 G = 0;
 if (B < 0)
 B = 0;

 rgbFrame(j, i).x = (B>255) ? 255 : (uchar)B;
 rgbFrame(j, i).y = (G>255) ? 255 : (uchar)G;
 rgbFrame(j, i).z = (R>255) ? 255 : (uchar)R;
 }
 return;
}

extern "C" int cuda_NV12ToBGR(AVFrame *frame, cv::cuda::GpuMat* out) {
 int width = out->cols;
 int height = out->rows;
 int byteCount = out->elemSize();
 int bx = ceil((double)width / BLOCKDIM_X); 
 int by = ceil((double)height / BLOCKDIM_Y);

 if (bx > GRIDDIM_X) bx = GRIDDIM_X;
 if (by > GRIDDIM_Y) by = GRIDDIM_Y;

 dim3 grid(bx, by);
 dim3 block(BLOCKDIM_X, BLOCKDIM_Y);

 uchar* ydata = frame->data[0];
 uchar* uvdata = frame->data[1];
 int ywidth = frame->linesize[0];
 int uvwidth = frame->linesize[1];

 NV12ToBGRkernel << > >(ydata, uvdata, ywidth, uvwidth, *out);

 cudaDeviceSynchronize();
 gpuErrchk(cudaPeekAtLastError());
 return 1;
}
</uchar3>


Using the above code I can get a GpuMat, but after I download the GpuMat to Mat and imshow it, I found the decode frames to be the same sometimes (two adjacent frames),and if I use av_hwframe_transfer_data bofore, then convert AVFrame to GpuMat ,it won't happen again. When I checked in the source code in av_hwframe_transfer_data, I found this :


static int cuda_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
 const AVFrame *src) {
 CUDAFramesContext *priv = ctx->internal->priv;
 AVHWDeviceContext *device_ctx = ctx->device_ctx;
 AVCUDADeviceContext *hwctx = device_ctx->hwctx;
 CudaFunctions *cu = hwctx->internal->cuda_dl;

 CUcontext dummy;
 int i, ret;

 ret = CHECK_CU(cu->cuCtxPushCurrent(hwctx->cuda_ctx));
 if (ret < 0)
 return ret;

 for (i = 0; i < FF_ARRAY_ELEMS(src->data) && src->data[i]; i++) {
 CUDA_MEMCPY2D cpy = {
 .srcMemoryType = CU_MEMORYTYPE_DEVICE,
 .dstMemoryType = CU_MEMORYTYPE_HOST,
 .srcDevice = (CUdeviceptr)src->data[i],
 .dstHost = dst->data[i],
 .srcPitch = src->linesize[i],
 .dstPitch = dst->linesize[i],
 .WidthInBytes = FFMIN(src->linesize[i], dst->linesize[i]),
 .Height = src->height >> (i ? priv->shift_height : 0),
 };

 ret = CHECK_CU(cu->cuMemcpy2DAsync(&cpy, hwctx->stream));
 if (ret < 0)
 goto exit;
 }

 ret = CHECK_CU(cu->cuStreamSynchronize(hwctx->stream));
 if (ret < 0)
 goto exit;

exit:
 CHECK_CU(cu->cuCtxPopCurrent(&dummy));
 return 0;
}



My questions are :


- 

- Maybe cuCtxPushCurrent and cuCtxPopCurrent lead to the repeated frames ?
- I don't want to use av_hwframe_transfer_data to transfer data to the CPU. How can I do it ?






-
lavf/framecrcenc : do not hash side data
24 avril 2021, par Anton Khirnovlavf/framecrcenc : do not hash side data
There are no guarantees that all side data types have the same
representation on all platforms.Tests that change output due to this :
id3v2-priv-remux, cover-art-mp3-id3v2-remux, gapless-mp3 : SKIP_SAMPLES,
which is tested by fate-gapless-mp3-side-datamatroska-vp8-alpha-remux : MATROSKA_BLOCKADDITIONAL, which is tested by
remux itself (side data is written into output)matroska-mastering-display-metadata : MASTERING_DISPLAY_METADATA and
CONTENT_LIGHT_LEVEL, which are tested by ffprobe invocation in the same
testmatroska-spherical-mono-remux : STEREO3D and SPHERICAL, which are tested
by ffprobe invocation in the same testsegment-mp4-to-ts : MPEGTS_STREAM_ID, which is tested by ts remuxing
testswebm-webvtt-remux : WEBVTT_IDENTIFIER/SETTINGS, which is tested by the
ffprobe invocation in the same testmxf-d10-user-comments : CPB_PROPERTIES, which is tested by mxf-probe-d10
mov-cover-image : SKIP_SAMPLES, which is tested for mov by
mov-aac-2048-primingcopy-trac3074 : AUDIO_SERVICE_TYPE, which is tested by fate-hls-fmp4_ac3
- [DH] libavformat/framecrcenc.c
- [DH] tests/ref/fate/copy-trac3074
- [DH] tests/ref/fate/cover-art-mp3-id3v2-remux
- [DH] tests/ref/fate/gapless-mp3
- [DH] tests/ref/fate/id3v2-priv-remux
- [DH] tests/ref/fate/matroska-mastering-display-metadata
- [DH] tests/ref/fate/matroska-spherical-mono-remux
- [DH] tests/ref/fate/matroska-vp8-alpha-remux
- [DH] tests/ref/fate/mov-cover-image
- [DH] tests/ref/fate/mxf-d10-user-comments
- [DH] tests/ref/fate/segment-mp4-to-ts
- [DH] tests/ref/fate/webm-webvtt-remux