
Recherche avancée
Autres articles (66)
-
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
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 (...) -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs.
Sur d’autres sites (5611)
-
Revision 7ad40117f1 : Reusing {above, left}_seg_context vars in both encoder and decoder. Change-Id :
21 mars 2014, par Dmitry KovalevChanged Paths :
Modify /vp9/common/vp9_alloccommon.c
Modify /vp9/common/vp9_onyxc_int.h
Modify /vp9/decoder/vp9_decodeframe.c
Modify /vp9/decoder/vp9_decoder.c
Modify /vp9/decoder/vp9_decoder.h
Modify /vp9/encoder/vp9_bitstream.c
Modify /vp9/encoder/vp9_encodeframe.c
Modify /vp9/encoder/vp9_onyx_if.c
Modify /vp9/encoder/vp9_onyx_int.h
Reusing above, left_seg_context vars in both encoder and decoder.Change-Id : Id1fa36c92cb007b73a450cc8552e810cedad38b9
-
ffmpeg : unable to use hardware encoder h264_rkmpp with software decoded ATSC OTA transmission
20 août 2020, par Brad BruggemannWhen attempting to hardware encode to h264 using the Rockchip MPP encoder h264_rkmpp from an ATSC source, FFMPEG errors out with :


"Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'"


The sample file used in this example can be downloaded here : https://transfer.sh/BRMej/out.ts


The full command used and resulting output is as follows :


$ ffmpeg -loglevel 48 -c:v mpeg2video -f mpegts -i out.ts -f mp4 -c:v h264_rkmpp -c:a libfdk_aac -preset ultrafast -mbd rd -copyinkf -flags +ilme+ildct -fflags +genpts out.mp4 -y

ffmpeg version N-98732-g9f702fc8f4 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.0 (GCC)
 configuration: --prefix=/usr/local --extra-libs='-lpthread -lm' --enable-hardcoded-tables --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree
 libavutil 56. 58.100 / 56. 58.100
 libavcodec 58.100.100 / 58.100.100
 libavformat 58. 51.100 / 58. 51.100
 libavdevice 58. 11.101 / 58. 11.101
 libavfilter 7. 87.100 / 7. 87.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
 libpostproc 55. 8.100 / 55. 8.100

Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '48'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'mpeg2video'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'.
Reading option '-i' ... matched as input url with argument 'out.ts'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_rkmpp'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libfdk_aac'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'ultrafast'.
Reading option '-mbd' ... matched as AVOption 'mbd' with argument 'rd'.
Reading option '-copyinkf' ... matched as option 'copyinkf' (copy initial non-keyframes) with argument '1'.
Reading option '-flags' ... matched as AVOption 'flags' with argument '+ilme+ildct'.
Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts'.
Reading option 'out.mp4' ... matched as output url.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument 48.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url out.ts.
Applying option c:v (codec name) with argument mpeg2video.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an input file: out.ts.
[mpegts @ 0xaaaaec9acf20] Opening 'out.ts' for reading
[file @ 0xaaaaec9ad830] Setting default whitelist 'file,crypto,data'
[mpegts @ 0xaaaaec9acf20] Before avformat_find_stream_info() pos: 0 bytes read:5013504 seeks:1 nb_streams:0
[mpegts @ 0xaaaaec9acf20] stream=0 stream_type=0 pid=31 prog_reg_desc=
[mpegts @ 0xaaaaec9acf20] probing stream 0 pp:2500
[mpegts @ 0xaaaaec9acf20] Probe with size=204749, packets=1 detected mpegvideo with score=25
[mpegts @ 0xaaaaec9acf20] probed stream 0
[mpegts @ 0xaaaaec9acf20] stream=1 stream_type=0 pid=34 prog_reg_desc=
[mpeg2video @ 0xaaaaec9cb7d0] Format yuv420p chosen by get_format().
[mpegts @ 0xaaaaec9acf20] probing stream 1 pp:2500
[mpegts @ 0xaaaaec9acf20] Probe with size=7680, packets=1 detected ac3 with score=25
[mpegts @ 0xaaaaec9acf20] probed stream 1
[mpegts @ 0xaaaaec9acf20] max_analyze_duration 5000000 reached at 5005000 microseconds st:0
[mpegts @ 0xaaaaec9acf20] PES packet size mismatch
[mpegts @ 0xaaaaec9acf20] Packet corrupt (stream = 1, dts = 2632691898).
[mpegts @ 0xaaaaec9acf20] After avformat_find_stream_info() pos: 0 bytes read:9195664 seeks:3 frames:306
Input #0, mpegts, from 'out.ts':
 Duration: 00:00:18.42, start: 29234.532200, bitrate: 5406 kb/s
 Stream #0:0[0x31], 152, 1/90000: Video: mpeg2video (Main), 1 reference frame, yuv420p(yuv420p) (tv, bt709, top first, left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
 Side data:
 cpb: bitrate max/min/avg: 15000000/0/0 buffer size: 7995392 vbv_delay: N/A
 Stream #0:1[0x34], 154, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Successfully opened the file.
Parsing a group of options: output url out.mp4.
Applying option f (force format) with argument mp4.
Applying option c:v (codec name) with argument h264_rkmpp.
Applying option c:a (codec name) with argument libfdk_aac.
Applying option copyinkf (copy initial non-keyframes) with argument 1.
Successfully parsed a group of options.
Opening an output file: out.mp4.
Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 (out.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[file @ 0xaaaaec9cef20] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 4 logical cores
Stream mapping:
 Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_rkmpp))
 Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[mpeg2video @ 0xaaaaec9cf7b0] Format yuv420p chosen by get_format().
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[mpeg2video @ 0xaaaaec9cf7b0] Skipping B slice due to open GOP
 Last message repeated 67 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[mpeg2video @ 0xaaaaec9cf7b0] Skipping B slice due to open GOP
 Last message repeated 67 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'time_base' to value '1/90000'
[graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0xaaaaecd8c290] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:1/1
[format @ 0xaaaaecadf950] Setting 'pix_fmts' to value 'drm_prime'
[auto_scaler_0 @ 0xaaaaecd80070] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0xaaaaecd80070] w:iw h:ih flags:'bicubic' interl:0
[format @ 0xaaaaecadf950] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0xaaaaec9cf190] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0xaaaaec9b5900] Statistics: 9556112 bytes read, 3 seeks
Conversion failed!



-
Hardware accelerated decoding with FFmpeg falls back to software decoding
9 février 2024, par iexavSo I have followed the FFmpeg example for hardware accelerated decoding exactly as it is (I am referring to this example).


https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c#L76



But I still seem to be decoding with the software decoder. When I open the task manager on windows the GPU isn't getting used. Before I make a call to av_hwframe_transfer_data() I check whether the frame is in the relevant hw_pix_fmt format and it is. Everything works, no errors, nothing, except the GPU is doing nothing. Now as an example I tried decoding a video that uses vp9 as a codec. If I specify the hardware accelerated codec I want by name it actually does work.


vidCodec=avcodec_find_decoder_by_name("vp9_cuvid"); 



When I do this and look at the task manager I can see that the CPU does much less work and my GPU actually does Video Decode work. Having to specify the hardware accelerated decoder for every single video I am decoding is ridiculous though.


Edit : as per user4581301's answer, here are the pieces of relevant code. (It's actually in java because I am using the java FFmpeg wrapper but it's basically just making a bunch of calls to FFmpeg functions.)



 ArrayList<string> deviceTypes = new ArrayList<>();
 int type = AV_HWDEVICE_TYPE_NONE;
 while ((type = av_hwdevice_iterate_types(type)) != AV_HWDEVICE_TYPE_NONE) {
 BytePointer p = av_hwdevice_get_type_name(type);

 deviceTypes.add(CString(p));
 }
 boolean flag=false;

 for(int j=0;j* Allocate a codec context for the decoder */
 if ((video_c = avcodec_alloc_context3(vidCodec)) == null) {
 throw new Exception("avcodec_alloc_context3() error: Could not allocate video decoding context.");
 }


 /* copy the stream parameters from the muxer */

 if ((ret = avcodec_parameters_to_context(video_c, video_st.codecpar())) < 0) {
 releaseUnsafe();
 throw new Exception("avcodec_parameters_to_context() error " + ret + ": Could not copy the video stream parameters.");
 }
 

 video_c.get_format(AvFormatGetter.getInstance());
 AVBufferRef hardwareDeviceContext =av_hwdevice_ctx_alloc(type);

 if ((ret = av_hwdevice_ctx_create(hardwareDeviceContext, type,(String) null, null, 0)) < 0) {
 System.err.println("Failed to create specified HW device. error " + ret);

 }else{
 video_c.hw_device_ctx(av_buffer_ref(hardwareDeviceContext));

 }
 


 
//The function that gets called for get_format
@Override
 public int call(AVCodecContext context, IntPointer format) {
 int p;


 for (int i=0;;i++) {
 if ((p=format.get(i)) == hw_pix_fmt) {
 return p;
 }
 if(p==-1){
 break;
 }
 }

 System.out.println(hw_pix_fmt +" is not found in the codec context");
 // Error

 return AV_PIX_FMT_NONE;
 }
 
//The method that's used for decoding video frames
 public Optional<boolean> decodeVideoFrame(AVPacket pkt, boolean readPacket, boolean keyFrames) throws Exception {

 int ret;
 // Decode video frame
 if (readPacket) {
 ret = avcodec_send_packet(video_c, pkt);
 
 if (ret < 0) {
 System.out.println("error during decoding");
 return Optional.empty();
 }

 if (pkt.data() == null && pkt.size() == 0) {
 pkt.stream_index(-1);
 }
 
 }

 // Did we get a video frame?
 while (true) {
 ret = avcodec_receive_frame(video_c, picture_hw);

 if (ret == AVERROR_EAGAIN() || ret == AVERROR_EOF()) {
 if (pkt.data() == null && pkt.size() == 0) {
 return Optional.empty();
 } else {

 return Optional.of(true);

 }
 } else if (ret < 0) {

 // Ignore errors to emulate the behavior of the old API
 // throw new Exception("avcodec_receive_frame() error " + ret + ": Error during video decoding.");
 return Optional.of(true);

 }

 if (!keyFrames || picture.pict_type() == AV_PICTURE_TYPE_I) {
 
 if(picture_hw.format()==hw_pix_fmt){
 if (av_hwframe_transfer_data(
 picture, // The frame that will contain the usable data.
 picture_hw, // Frame returned by avcodec_receive_frame()
 0) < 0) {
 throw new Exception("Could not transfer data from gpu to cpu. ");

 }
 }
 //... The rest of the method here
 return Optional.of(false);

 }
 }
 }
</boolean></string>