
Recherche avancée
Autres articles (61)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (7152)
-
FFmpeg encoding through h264_qsv : pts < dts
29 décembre 2023, par MarioI'm modifying a portion of code that encodes input frames in an output mp4 file via the h264 software encoder which works quite well. Most of the code comes from https://ffmpeg.org/doxygen/6.0/mux_8c-example.html.


I changed the "working" code to use the h264_qsv hardware accelerated encoder. After a lot of work the new code produces h264 encoded frames. For testing purpose I can write them with




fwrite(pkt->data, pkt->size, 1, fout)




and mpv displays frames correctly (with some warnings).


When I use regular :




av_interleaved_write_frame(fmt_ctx, pkt)




(as from previously working code) returns an error and on stderr :




[mp4 @ 0x7f82a80b3b40] pts (-1574122160956548608) < dts
(1574122160956547584) in stream 0




To look for the cause I added the following lines just before av_interleaved_write_frame(). I read that it may be a non-fatal error and so I continue after the errors, but there isn't output.




frame->pts=210

pkt->pts=-1574122160956548608

pkt->dts=1574122160956547584

[mp4 @ 0x7effb40b3b40] pts (-1574122160956548608) < dts (1574122160956547584) in stream 0

...

frame->pts=240

pkt->pts=-1574122160956548608

pkt->dts=1574122160956548096

[mp4 @ 0x7effb40b3b40] pts (-1574122160956548608) < dts (1574122160956548096) in stream 0



I did another test assigning incremental values to pkt->pts and pkt->dts, it works but resulting fps is wrong, and I don't think it is the right solution !


Why does the av_interleaved_write_frame(fmt_ctx, pkt) function returns an error with h264_qsv encoder ? Who should set pkt->pts and pkt->dts ?


-
FFMpeg C++ How to create a filter with multiple outputs ?
11 septembre 2020, par GoodSimonFor example, we have one
AVFrame
with a size of 128x128 pixels and the task is to split theAVFrame
into 4 parts (4 separateAVFrame
). To do this, I fill the graph with filters using theavfilter_graph_parse2(...)
function, and then callavfilter_graph_config(...)
.

Let's start. Let's cut out the top left corner. To crop a frame, we need to use the
crop
filter, which means we initialize the AVFilterGraph graph with the line :

buffer = width = 128: height = 128: pix_fmt = 2: time_base = 1/25, pixel_aspect = 128/64 [pad_in];
[pad_in] crop = w = 64: h = 64: x = 0: y = 0, buffersink;



Everything works great ! Now let's try to make several outputs :


buffer = width = 128: height = 128: pix_fmt = 2: time_base = 1/25, pixel_aspect = 128/64 [pad_in];
[pad_in] crop = w = 64: h = 64: x = 0: y = 0, buffersink;
[pad_in] crop = w = 64: h = 64: x = 64: y = 0, buffersink;
[pad_in] crop = w = 64: h = 64: x = 0: y = 64, buffersink;
[pad_in] crop = w = 64: h = 64: x = 64: y = 64, buffersink



As you can see, we have one
buffer
for the input image, 4crop
filters for cutting each piece, and 4buffersink
filters for the output images. The callavfilter_graph_parse2(...)
returns 0, which is good, butavfilter_graph_config()
returns the error code-22 == AVERROR(EINVAL)
and the message is output to the console :Input pad "default" with type video of the filter instance "Parsed_crop_3" of crop not connected to any source.


I am asking for your help in creating a filter with multiple outputs.


-
Camera's pts and dts jumps issue
14 mars 2014, par tilzaerI use ffmpeg library in my code for capturing rtsp streams from cameras and writing in flv. If I capture streams from only one camera and camera has only video stream then there's no any errors, I got first packet with pts and dts 1698557894 and other packets' pts and dts slowly increases. But if camera has video and audio streams, then strange things occur. For example, video packets pts and dts begin with 1698557894 and slowly increase, and audio starts with 0 then slowly increases and after 50 packets jumps to value 151004317 and slowly increase. Another situation, when audio begins with 0 and slowly increases, and video begins from 1785662594 and after 70 packets jumps to 234722 and slowly increase. Such behaviour do not allow flv segment muxer to write files, it just returns some EINVAL value.
Also if I try to capture streams from two cameras, first camera has only video and another has video and audio, then first camera packets' pts and dts are ok. But another camera has video and audio pts/dts values which are very different. av_read_frame returns video packet with pts/dts value 1811924055, which rescales to 557003451 in flv muxer and audio 4456027604, which rescales to 557003451, but these values must be almost equal !
So, the questions are :
0) why do these jumps occur in the beginning of capturing ? is it a problem with camera or it is just some ffmpeg issue ?
1) can such jump occur after some long period ? how I should handle it ?
2) why camera's video and audio have so different pts/dts values ?