
Recherche avancée
Autres articles (98)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7670)
-
qsv : dump more info in error, debug and verbose mode
5 janvier 2021, par Haihao Xiangqsv : dump more info in error, debug and verbose mode
Dump iopattern mode and the SDK error/warning desciptions for qsv based
filters and iopattern mode for qsvencSigned-off-by : Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by : Linjie Fu <linjie.justin.fu@gmail.com -
FFMPEG library- transcode raw image to h264 stream, and the output file does not contains pts and dts info
5 novembre 2020, par zhummI am trying using ffmpeg c++ library to convert several raw yuyv image to h264 stream, the image come from memory and passed as string about 24fps, i do the convention as the following steps :


- 

- init AVFormatContext,AVCodec,AVCodecContext and create new AVStream. this step i mainly refer to ffmpeg-libav-tutorial, and AVFormatContext use customize
write_buffer()
function(refer to simplest_ffmpeg_mem_handler) - receive raw frame data, set width and height(1920x1080), and set pts and dts. here i manually set the output fps to 24, and use a global counter to count num of frames, and the pts is calculated by this counter, code snippet(
video_avs
is AVStream,output_fps
is 24 andtime_base
is 1/24) :






input_frame->width = w; // 1920
 input_frame->height = h; // 1080
 input_frame->pkt_dts = input_frame->pts = global_pts;
 global_pts += video_avs->time_base.den/video_avs->time_base.num / output_fps.num * output_fps.den;



- 

-
convert it from yuyv to yuv422(because h264 does not support yuyv) and resize it from 1920x1080 to 640x480(because i need this resolution output), use
sws_scale()


-
use
avcodec_send_frame()
andavcodec_receive_packet()
to get the output packet. setoutput_packet
duration and stream_index, then useav_write_frame()
to write frame data.







AVPacket *output_packet = av_packet_alloc();
 int response = avcodec_send_frame(encoder->video_avcc, frame);
 while (response >= 0) {
 response = avcodec_receive_packet(encoder->video_avcc, output_packet); // !! here output_packet.size is calculated
 if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {
 break;
 } 
 else if (response < 0) {
 printf("Error while sending packet to decoder"); // ??av_err2str(response)会报错
 return response;
 }

 // duration = next_pts - this_pts = timescale / fps = 1 / timebase / fps
 output_packet->duration = (encoder->video_avs->time_base.den / encoder->video_avs->time_base.num) / (output_fps.num / output_fps.den);
 output_packet->stream_index = 0;
 int response = av_write_frame(encoder->avfc, output_packet); // packet order are not ensure
 if (response != 0) { printf("Error %d while receiving packet from decoder", response); return -1;} 
 }
 av_packet_unref(output_packet);
 av_packet_free(&output_packet);



- 

- in
write_buffer()
function, video stream output is stored to string variable, and then i write this string to file with ostream, and suffix mp4.




after all the above steps, the output.mp4 cannot be played, the
ffprobe output.mp4 -show_frames
output is
(image) :

Input #0, h264, from '/Users/ming/code/dev/haomo/output.mp4':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (High 4:2:2), yuv422p(progressive), 640x480, 24.92 fps, 24 tbr, 1200k tbn, 48 tbc
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=N/A
pkt_pts_time=N/A
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=N/A
best_effort_timestamp_time=N/A



Note that before and after calling
av_write_frame()
in step 4, the passed argumentoutput_packet
contains correct pts and dts info, i cannot figure out why the output stream lost these info.

- init AVFormatContext,AVCodec,AVCodecContext and create new AVStream. this step i mainly refer to ffmpeg-libav-tutorial, and AVFormatContext use customize
-
lavf : move AVStream.info to AVStreamInternal
9 octobre 2020, par Anton Khirnovlavf : move AVStream.info to AVStreamInternal
This struct is for internal use of avformat_find_stream_info(), so it
should not be exposed in public headers. Keep a stub pointer in its
place to avoid changing AVStream layout, since e.g. ffmpeg.c accesses
some fields located after it (even though they are marked as private).