
Recherche avancée
Autres articles (37)
-
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 -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (8829)
-
Why do I catch the "AccessViolationException" exception in av_hwframe_transfer_data () when I run it as a windows service ?
5 décembre 2024, par vakymI write Windows service witch decodig video stream from camera.
I write it on c# with FFMPEG.Autogen wrapper.



My problem is "AccessViolationException" when i run it as service. 
If i run application as Console Application i have no exceptions.



In Stacktrace i see this :



в FFmpeg.AutoGen.ffmpeg+<>c.<.cctor>b__5_572(FFmpeg.AutoGen.AVFrame*, FFmpeg.AutoGen.AVFrame*, Int32)
в FFmpeg.AutoGen.ffmpeg.av_hwframe_transfer_data(FFmpeg.AutoGen.AVFrame*, FFmpeg.AutoGen.AVFrame*,Int32)
в VideoProviderService.VideoSources.RTSPVideoSource.TryDecodeNextFrame(Boolean ByRef)




Code of TryDecodeNextFrame method :



public IntPtr TryDecodeNextFrame(out bool state)
{
 try
 {
 ffmpeg.av_frame_unref(pFrame);
 ffmpeg.av_frame_unref(cpuFrame);
 int error;
 do
 {
 try
 {
 do
 {
 timeout = DateTime.Now.AddSeconds(2);
 error = ffmpeg.av_read_frame(_pFormatContext, pPacket);
 if (error == ffmpeg.AVERROR_EOF)
 {
 state = false;
 return IntPtr.Zero;
 }
 error.ThrowExceptionIfError();
 } while (pPacket->stream_index != _streamIndex);
 ffmpeg.avcodec_send_packet(pCodecContext, pPacket).ThrowExceptionIfError();
 }
 finally
 {
 ffmpeg.av_packet_unref(pPacket);
 }
 error = ffmpeg.avcodec_receive_frame(pCodecContext, pFrame);
 } while (error == ffmpeg.AVERROR(ffmpeg.EAGAIN));
 error.ThrowExceptionIfError();
 ffmpeg.av_hwframe_transfer_data(cpuFrame, pFrame, 0).ThrowExceptionIfError();
 ptrToFrame = (IntPtr)vfc.Convert(*cpuFrame).data[0]; 
 }
 catch
 {
 state = false;
 return IntPtr.Zero;
 }
 state = true;
 return ptrToFrame;
}




What i tried to do :



- 

- I checked arguments of
av_hwframe_transfer_data
. - I changed the user for the service.
- I tried compile as x86 or x64 configuration.









I have no idea how to solve this.
Does anyone have any thoughts ?


- I checked arguments of
-
Crop and pinch zoom image with FFMPEG
27 septembre 2022, par huggerI am working on a simple photo editor component for a mobile app which requires the user to be able to pan and scale (zoom) an image to be cropped. S/O to @kesh for the help so far !


With the pinch zoom value which ranges from 1-5, I wish to use this in my FFMPEG execution along with the crop command :


cropSelected() {
 this.setState({ isCropping: true });

 const diff =
 this.props.videoHeight / (this.state.aspectRatio * deviceWidth);
 const offsetDiff = this.state.offsetTopTranslate * diff;

 var filterPathPostCrop =
 this.props.type === 'photo'
 ? RNFS.DocumentDirectoryPath + '/afterCrop.png'
 : this.props.type === 'gif'
 ? RNFS.DocumentDirectoryPath + '/afterCrop.gif'
 : RNFS.DocumentDirectoryPath + '/afterCrop.mp4';
 //hardcoded zoom at 1.2x for example!
 FFmpegKit.execute(
 `-y -i ${this.state.mediaSource} -vf "crop=iw/1.2:ih/1.2:0:${offsetDiff},scale=iw:-1" -qscale 0 -frames:v 1 ${filterPathPostCrop}`
 ).then(async (session) => {
 const returnCode = await session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {
 // SUCCESS

 Animated.spring(this._pinchScale, {
 toValue: 1,
 useNativeDriver: true,
 }).start();

 this.setState(
 {
 mediaSource: filterPathPostCrop,
 videoSourcePreview: `${filterPathPostCrop}?${new Date().getTime()}`,
 ffMPEGinProgress: null,
 aspectRatio: 1080 / 1080,
 videoTime: 0,
 isPlayingVideo: false,
 isCropping: false,
 filterOutputIsAlt: !this.state.filterOutputIsAlt,
 wasCropped: true,
 });
 } else if (ReturnCode.isCancel(returnCode)) {
 // CANCEL
 } else {
 // ERROR
 alert('error');
 }
 });
 }



I drew this to illustrate what I am trying to achieve here.




I hope this helps !


-
ffmpeg codec error on audio file
31 juillet 2013, par foosionI have some m4a files that will not play properly using the google music player app on my Android phone, although they play fine on most everything else. I thought the problem was the container and thought "ffmpeg -i bad.m4a -codec copy good.m4a" might help. However, when I run on the problem files, I get error messages. Running this command on non-problem files has not generated error messages.
Please suggest ways to fix (other than re-encoding).
[D:\temp\dl]ffmpeg -i "01 - The Day Begins.m4a" -codec copy day.m4a
ffmpeg version N-55066-gc96b3ae Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 29 2013 18:05:45 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000002da300] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '01 - The Day Begins.m4a':
Metadata:
major_brand : m4a
minor_version : 0
compatible_brands: M4A mp4isom
creation_time : 2003-07-06 20:27:46
track : 1
genre : Rock
title : The Day Begins
artist : Moody Blues
album : Days of Future Passed
date : 1967
Duration: 00:05:50.83, start: 0.000000, bitrate: 166 kb/s
Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 15
9 kb/s
Metadata:
creation_time : 2003-07-06 20:27:46
handler_name : Apple Sound Media Handler
Stream #0:1(eng): Data: none (mp4s / 0x7334706D)
Metadata:
creation_time : 2003-07-06 20:27:46
handler_name : Apple MPEG-4 Scene Media Handler
Stream #0:2(eng): Data: none (mp4s / 0x7334706D)
Metadata:
creation_time : 2003-07-06 20:27:46
handler_name : Apple MPEG-4 ODSM Media Handler
Stream #0:3: Video: png, rgb24, 240x240 [SAR 2834:2834 DAR 1:1], 90k tbr, 90
k tbn, 90k tbc
[ipod @ 000000000031dd40] track 0: could not find tag, codec not currently suppo
rted in container
Output #0, ipod, to 'day.m4a':
Metadata:
major_brand : m4a
minor_version : 0
compatible_brands: M4A mp4isom
date : 1967
track : 1
genre : Rock
title : The Day Begins
artist : Moody Blues
album : Days of Future Passed
encoder : Lavf55.12.102
Stream #0:0: Video: png, rgb24, 240x240 [SAR 2834:2834 DAR 1:1], q=2-31, 90k
tbn, 90k tbc
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 159 kb/s
Metadata:
creation_time : 2003-07-06 20:27:46
handler_name : Apple Sound Media Handler
Stream mapping:
Stream #0:3 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Error
number -1 occurred