[Libav-user] Accessing and constructing AVCodecContext for all versions of FFmpeg

2016-01-06 Thread Jean-Yves Avenard
Hi In a recent commit, AVCodecContext was modified in a way that it's now not compatible across all versions of FFmpeg and LibAV. I had opened ticket https://trac.ffmpeg.org/ticket/5057 but it's been decided that it won't be fixed. I was given an alternative, cross-platforms way to set AVCodecCo

Re: [Libav-user] how to generate fragmented mp4 files via ffmpeg library

2016-01-06 Thread Jean-Yves Avenard
On 23 December 2015 at 13:24, 方柏棟 wrote: > Dear All, > I have bunch of .h264 raw data, could any one tell me how to use ffmpeg > library to mux .h264 to fragmented mp4 files. > I only know how to generate fragmented mp4 file via ffmpeg.exe, like below, > > ffmpeg -i xx.h264 -vcodec copy -an -f mp

Re: [Libav-user] avcodec_decode_video2 latency.

2015-11-19 Thread Jean-Yves Avenard
On 19 November 2015 at 22:27, Jean-Yves Avenard wrote: > Never mind. > > I quickly discovered CODEC_FLAG_LOW_DELAY I spoke too quickly.. I see no difference with this flag set :( ___ Libav-user mailing list Libav-user@ffmpeg.org http://f

Re: [Libav-user] avcodec_decode_video2 latency.

2015-11-19 Thread Jean-Yves Avenard
Never mind. I quickly discovered CODEC_FLAG_LOW_DELAY Anyone know if this can be used safely on any frames (a similar flag on Windows WMF will cause h264 b-frame to not be decoded properly) On 19 November 2015 at 22:22, Jean-Yves Avenard wrote: > Hi > > Started to use FFmpeg/ffvp9

[Libav-user] avcodec_decode_video2 latency.

2015-11-19 Thread Jean-Yves Avenard
Hi Started to use FFmpeg/ffvp9 to decode VP9 streams in place of libvpx ; the gain in performance is very welcome. However, the major issue is the latency added by libavcodec ; when feeding avcodec_decode_video2 with samples, it won't return decoded frames until 16 frames have been buffered (this

Re: [Libav-user] Using Video Toolbox hardware decoding

2015-11-05 Thread Jean-Yves Avenard
On 3 November 2015 at 21:04, Info || Non-Lethal Applications wrote: > > I just grabbed the latest 1.8.1 source code and I don’t see any flag to > toggle async decoding. > I only see that the function videotoolbox_session_decode_frame waits for the > asynchronously decoded frames using > VTDecompr

Re: [Libav-user] Using Video Toolbox hardware decoding

2015-11-02 Thread Jean-Yves Avenard
Le lundi 2 novembre 2015, Info || Non-Lethal Applications < i...@non-lethal-applications.com> a écrit : > > On 02 Nov 2015, at 11:22, Jean-Yves Avenard > wrote: > > > > Le vendredi 23 octobre 2015, Isaksson Jörgen > a écrit : > >> Hi all, >> >

Re: [Libav-user] Using Video Toolbox hardware decoding

2015-11-02 Thread Jean-Yves Avenard
Le vendredi 23 octobre 2015, Isaksson Jörgen a écrit : > Hi all, > > I’m new to this list so forgive me if this has been answered before. > > With version 2.8 of the libraries I saw the addition of Video Toolbox > hardware decoding support (on Mac OS X that is). > > But I can’t find much document

[Libav-user] Ability to have FFmpeg not perform pts frame reordering ..

2015-10-30 Thread Jean-Yves Avenard
Hi there. Is there a way to configure FFmpeg / libavcodec to not perform any reordering of the frames and return them as they come in in dts order? I'm working on a component supposed to work with any versions of FFmpeg (including LibAV) since 0.8 ; and I'm having issues with the reordering on so

[Libav-user] How to determine duration in fragmented mp4 init segment

2015-01-09 Thread Jean-Yves Avenard
Hi there. I'm asking here now as I've been banging my head on this for a while now and can't find a solution. Seeing that the file I'm analysing was creating using libavformat ; I'm hoping someone here would know... So here I have an init segment: http://people.mozilla.org/~jyavenard/mediatest/fr

Re: [Libav-user] Finding best corresponding between channel number and channel layout

2014-08-13 Thread Jean-Yves Avenard
On 13 August 2014 22:50, Jean-Yves Avenard wrote: > Hi > > Seeing the AVCodecContext::request_channels is now deprecated ; what > would be the best way to replace its use with request_channel_layout > > e.g. something that gives the most likely layout for a given number of &g

[Libav-user] Finding best corresponding between channel number and channel layout

2014-08-13 Thread Jean-Yves Avenard
Hi Seeing the AVCodecContext::request_channels is now deprecated ; what would be the best way to replace its use with request_channel_layout e.g. something that gives the most likely layout for a given number of channels ? for mono and stereo, it's obvious... for more than 2 channels it starts t

Re: [Libav-user] How to get a video with the actual total length?

2014-06-05 Thread Jean-Yves Avenard
On 5 June 2014 19:02, Object wrote: > I have a video with actual total length over 10 seconds. But when I opened > it with VFormatContext.duration, it showed that it is only 10 seconds long. > And then I tried to get the pts of final frame via seek, but unfortunately, > the got_picture is always 0

Re: [Libav-user] Frames corruption when seeking...

2014-06-05 Thread Jean-Yves Avenard
On 5 June 2014 18:32, wm4 wrote: > Might be a similar problem as with mpeg2 interlaced content? At least > vc1 in mkv seems to work fine here. you're right.. it does seem to be isolated to mpeg decoder. I just tried on a wmv file, and it's fine there.. It does lok ugly on all the bluray using

Re: [Libav-user] Frames corruption when seeking...

2014-06-04 Thread Jean-Yves Avenard
On 5 June 2014 13:27, Jean-Yves Avenard wrote: > > What I do notice however is while myth displays part of the previous > frames (from before the seek) after; xbmc will not display anything > for several seconds after a seek (you only get audio). I get the exact same behaviour with

Re: [Libav-user] Frames corruption when seeking...

2014-06-04 Thread Jean-Yves Avenard
On 5 June 2014 11:41, Jean-Yves Avenard wrote: > On 5 June 2014 03:46, wm4 wrote: > >> My hw doesn't do mpeg4, so I have no way to reproduce. > > Interestingly, I was googling for something else entirely (ffmpeg > vdpau render2) and stumble upon this thread: > http:/

Re: [Libav-user] Frames corruption when seeking...

2014-06-04 Thread Jean-Yves Avenard
On 5 June 2014 03:46, wm4 wrote: > My hw doesn't do mpeg4, so I have no way to reproduce. Interestingly, I was googling for something else entirely (ffmpeg vdpau render2) and stumble upon this thread: http://lists.mplayerhq.hu/pipermail/mplayer-users/2013-August/086497.html What he describes is

[Libav-user] Frames corruption when seeking...

2014-06-03 Thread Jean-Yves Avenard
On 4 June 2014 00:02, wm4 > wrote: > Can you post a sample of this file somewhere? The behaviour is seen with all my mpeg4/avi files with 24fps framerate. Here is a 5MB sample. http://www.avenard.org/files/media/mediatest/12fpsproblem.avi Obviously, to see the problem you need to use VDPAU hwac

Re: [Libav-user] Frames corruption when seeking...

2014-06-03 Thread Jean-Yves Avenard
On 3 June 2014 22:56, wm4 wrote: > > You mean it drops every second frame? What codec? Yep, it appears to drop every 2nd frame (though I can't be 100% sure, it may not be that regular because while the video appears to be very low frame rate, it is often extremely stuttery) mpeg4 here is the o

Re: [Libav-user] Frames corruption when seeking...

2014-06-03 Thread Jean-Yves Avenard
On 31 May 2014 22:40, wm4 wrote: > It's certainly possible that the old API is either already broken, or > easily breaks when combining with new API. Using the old VDPAU API, I can play things just fine. However, when I close the vdpau codec, I get a crash or one shortly after. Some memory corru

Re: [Libav-user] Frames corruption when seeking...

2014-05-30 Thread Jean-Yves Avenard
On 31 May 2014 02:58, Carl Eugen Hoyos wrote: > Then allow me to rephrase: > If you have a H264 sample that allows seeking to a > non-keyframe (so that you see artefacts), please > provide it. You don't seem to have read the entire discussion. I've never even suggested there was an issue in liba

Re: [Libav-user] How To Abandon The Probesize Input Buffer For Real Time RTSP Playback

2014-05-30 Thread Jean-Yves Avenard
On 31 May 2014 01:16, Xiemin Chen wrote: > Can anybody help about this topic? Thanks very much. setting (*AVFormatContext)->pb->seekable to false will avoid probing the stream, and issuing various seek at startup. ___ Libav-user mailing list Libav-user

Re: [Libav-user] Frames corruption when seeking...

2014-05-30 Thread Jean-Yves Avenard
On 31 May 2014 01:47, Carl Eugen Hoyos wrote: > Are you maybe just wondering why MPlayer sets the > equivalent of {{{-flags2 +showall}}}? > This is pure performance decision by Reimar, you > can set -lavdopts wait_keyframe to avoid the issue > at least for H264 thanks but I'm not using mplayer.

Re: [Libav-user] Frames corruption when seeking...

2014-05-30 Thread Jean-Yves Avenard
On 30 May 2014 22:25, wm4 wrote: > In my opinion, the code above is correct. Maybe you could also try to > set the AVCodecContext.refcounted_frames field to 1 before opening the > decoder, and calling av_frame_unref(frame) before calling > avcodec_decode_* (the later was needed with refcounting e

Re: [Libav-user] Frames corruption when seeking...

2014-05-30 Thread Jean-Yves Avenard
On 30 May 2014 21:40, wm4 wrote: > Then you're probably doing something wrong. It's easily possible that > this "wrong" thing was right (or just didn't cause problems) before the > recent API changes. oh, I'm sure I am... The question is what :) I'll keep looking > Are you using av_frame_fre

Re: [Libav-user] Frames corruption when seeking...

2014-05-30 Thread Jean-Yves Avenard
On 29 May 2014 23:34, wm4 wrote: > Does this affect only "weird" sources (like ts captures etc.), or also > files using container formats designed to be seekable (like avi, mkv > etc.)? i saw this with a plain mpeg-ts container, mpeg2 / mp2 and a mkv h264/ac3 > Well, the API did change a lot re

[Libav-user] Frames corruption when seeking...

2014-05-28 Thread Jean-Yves Avenard
Hi I just upgraded our local FFmpeg 1.2.6 used in our project (MythTV) with the latest 2.2.1. The user side of things haven't been changed one bit (e.g. still using exactly the same API) and to my surprise it all worked first go. What I have noticed however, is that following a seek, or right at

Re: [Libav-user] difference between various h264 codec...

2014-05-03 Thread Jean-Yves Avenard
Hi On 4 May 2014 00:21, wm4 wrote: > There is no h264_vdpau codec anymore (except maybe the old legacy > implementation that was removed from Libav, but not FFmpeg yet). > Instead, you're supposed to use the hwaccel feature. Great ! I've spent hours attempting to change that, because I was con

[Libav-user] difference between various h264 codec...

2014-05-03 Thread Jean-Yves Avenard
Hi.. Currently updating our vdpau code that was written many moons ago, to use the newish hwaccel API instead... Previously, we would specifically use the vdpau equivalent codec. So for example, say were going to open a h264 video, we would instead use and open the "h264_vdpau" codec. Since usi

Re: [Libav-user] How to detect 9/10 bits video?

2014-05-03 Thread Jean-Yves Avenard
On 2 May 2014 22:24, wm4 wrote: > Well, I think libavformat will set the profile correctly when opening > the input (AVStream->codec->profile). As of recently, you can also use > the function av_vdpau_get_profile() to convert the ffmpeg profile value > to a vdpau profile value. Since there's curr

Re: [Libav-user] How to detect 9/10 bits video?

2014-05-01 Thread Jean-Yves Avenard
Hi On 1 May 2014 19:45, wm4 wrote: > Use the video's profile. Alternatively, you can try to setup the > AVCodecContext to do vdpau decoding, which will fail if the video is > 9/10 bit (it will try to fallback to software decoding, which you can > detect). But note that there are 8 bit videos whi

[Libav-user] How to detect 9/10 bits video?

2014-04-30 Thread Jean-Yves Avenard
Hi What would be the best way to detect if a video is using 9 or 10 bits-depth video? As VDPAU (and many other hardware accelerated decoding) do not support this, I'd like to detect those video and use software decoding instead. Thank you ___ Libav-use

Re: [Libav-user] question about AVFormatContext::bit_rate

2014-03-08 Thread Jean-Yves Avenard
Le vendredi 7 mars 2014, wm4 a écrit : > On Fri, 7 Mar 2014 19:03:00 +1100 > > > I get very wierd value from there. > > As far as I know, this is only a bad guess, and usually inaccurate. > Calculate it yourself, or try to improve it in libavformat/utils.c. > > Hi Thanks for the response and the

[Libav-user] question about AVFormatContext::bit_rate

2014-03-07 Thread Jean-Yves Avenard
Hi Trying to understand a misbehaviour of mine in an application I'm involved with. I have adaptative streaming code which makes some decision according to the field bit_rate in the AVFormatContext structure. According to the doc: "Total stream bitrate in bit/s, 0 if not available." I get very

Re: [Libav-user] what is "fltp" for audio when using ffmpeg

2013-08-11 Thread Jean-Yves Avenard
On 31 July 2013 17:43, Soho Soho123 wrote: > Hi All, > > > I got the problem when I try to capture audio + video from USB web cam by > ffmepg. > the problem is audio can not play when I use VLC to play the stream that > ffserver output. > the question is : > I use ffmepg the encode audio to "wmav1

[Libav-user] HTTP Live streaming: using demuxer

2012-05-09 Thread Jean-Yves Avenard
Hi I can easily play a HLS stream, simply by using ffurl_open(&m_context, url, AVIO_FLAG_READ, NULL, NULL); I just need to have my url starts with applehttp (obsolete) or hls+http So the url would be a string with: http://192.168.10.11:45631/live-playback-2.4.0/index_3c136413-ba6b-4dcb-b42f-0f1a

Re: [Libav-user] Determining video container format of streamed file after url_open

2012-05-06 Thread Jean-Yves Avenard
On 6 May 2012 17:05, Alex Cohn wrote: > The difference between mp4 and m4v is often illusionary, see > http://en.wikipedia.org/wiki/M4V and > https://discussions.apple.com/thread/2309476?start=0&tstart=0 for some > details. The big issue is DRM, which may render the mv4 file > impossible to decode

[Libav-user] Determining video container format of streamed file after url_open

2012-05-05 Thread Jean-Yves Avenard
Hi there. I would like to get help on the best way to determine what the container format is of a streamed media accessed via ffmpeg; right after calling url_open and before starting to use url_read What I'm trying to determine is if a file being accessed over http is either mp4 or m4v format. I