[FFmpeg-user] Multiple Stream synchronization
Hi all, I am trying to syncronize the reproduction of a live RTSP (not seekable) stream in different two different process. At the moment I am using the PTS given from av_read_frame (from libavformat) and I noticed that each RTSP session starts counting its timestamp from zero, independently from the time the session is initiated. At the moment, I am having pretty successful results initalizing my inner timestamp to the system clock when the first frame arrives, then from them I am just adding the offset given by the PTS (obviously taking into accout timeBase units). I pretty sure this it no the way to do it and that ffmpeg might provide some better options. So the question is, should I (or can I) set the AVStream->start_time value to some sort of system clock in order to be able to compare the current demuxed timestamp witht he one in another process? Does FFMPEG have any kind program clock reference? Thanks in advance for any advice, David ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] Intel QSV-accelerated H.264 decoding
Dear all, I have read in the ffmpeg change-log that since v2.6 ffmpeg framework supports Intel accelerated H264 decoding. We are working in project where we use libavcodec for decoding live rtp h264 streams. I am wondering how I have to initiate AVCodecContext (or AVCodec) to get this accelerated decoding working, is there any flag? is it possible to decode to memory, or it is designed to feed only the system frame buffer? If has anyone has some hint about it would be really appreciated. We are really interested in testing this Intel features. Thanks in advance, David ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Get H264 NALUs from a muxed file
Thanks Carl, that's pretty useful. I guess I was not clear enough when I asked I there was a way to do it in FFMPEG, maybe I'd better say libavformat, I am not using the execution binaries, I am writing my own application in C using libavformat, libavcodec and so on. At the moment I am using FFMPEG examples "remuxing.c" and "demuxing_decoding.c" as a reference to start coding my NALU extractor. Then, according the Carl Eugen response I assume that I should use video filters in order to do that, should I read about libavfilter to reproduce "-vbsf h264_mp4toannexb" behaviour in my C application, or I have some kind of solution to go throw it having some sort of remuxing in h264 format? Thank all, David 2014-10-18 1:21 GMT+02:00 Carl Eugen Hoyos : > David Cassany Viladomat i2cat.net> writes: > > > in MPEG2-TS I get the data with the start_code (0001) to > > divide the NALUs, but with the MP4 I get the frame without > > start codes but 4 bytes indicating NALU size instead. I > > now this is due each container specification, but I am > > wondering if there is a way with FFMPEG to get exactly the > > same data regardless the container. > > Yes, the following should produce similar result: > > $ ffmpeg -i in.ts -vcodec copy -an -f image2 out%4d > $ ffmpeg -i in.mp4 -vcodec copy -vbsf h264_mp4toannexb -an -f image2 out%4d > > Carl Eugen > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] Get H264 NALUs from a muxed file
Hi all, I have a question regarding demuxing files containing H264 data. I am trying to demux MP4 files and MPEG2-TS files. I have noticed that when I read a fram in an AVPacket get whole frame (containing several NALUs) in a different format, in concret in MPEG2-TS I get the data with the start_code (0001) to divide the NALUs, but with the MP4 I get the frame without start codes but 4 bytes indicating NALU size instead. I now this is due each container specification, but I am wondering if there is a way with FFMPEG to get exactly the same data regardless the container. The problem I have is that I want to process certain NALUs so I'd like to get NALUs one by one in a discrete way, assuming this is not possible with FFMPEG (at least as far as I know) I am dividing NALUs of the frame one by one parsing AVPacket data. The problem here is that I have to implement different parsers for every container. Is there a way to solve this? to get H264 frames in an standarized way? or even better, is it possible to get NALS one by one with FFMPEG. Thanks in advance for any advice about this matter. Best regards, David ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] avformat_open_input from an SDP string
Hi all, I have a question regarding avformat_open_input method, I saw that this method accepts URIs in addition to filename routes, then my question if I could use this function using an SDP string, in order to get the avformatcontext structure properly initialized. I want to initialize the avformatcontext given an SDP string (not an RTSP uri), is avfromat_open_input capable to do that? if not, is there any util i can use to achieve such goal. Thanks in advance for any comment. Regards, David ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user