Re: [FFmpeg-devel] Add support for 24 bit RTSP audio playback

2016-11-05 Thread Michael Niedermayer
On Sat, Nov 05, 2016 at 01:15:44AM +0300, Timur Aydin wrote:
> Hello guys,
> 
> When ffplay is used to play from the RTSP URL that serves 24 bit
> audio content, ffplay fails to recognize the audio codec format. The
> attached patch adds support for playing 24 bit audio content over
> RTSP by defining a dynamic payload handler for "L24".

do you have a testcase for this ?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v1] avformat/flvenc: add add_keyframe_index option

2016-11-05 Thread Michael Niedermayer
On Sat, Nov 05, 2016 at 10:47:29AM +0800, Steven Liu wrote:
> 2016-11-04 23:04 GMT+08:00 Michael Niedermayer :
> 
> > On Fri, Nov 04, 2016 at 10:47:35PM +0800, Steven Liu wrote:
> > > 2016-11-04 22:38 GMT+08:00 Michael Niedermayer :
> > >
> > > > On Fri, Nov 04, 2016 at 08:58:56PM +0800, Steven Liu wrote:
> > > > > 2016-11-04 20:44 GMT+08:00 Michael Niedermayer
> > :
> > > > >
> > > > > > On Fri, Nov 04, 2016 at 11:24:06AM +0800, Steven Liu wrote:
> > > > > > > Add keyframe index metadata
> > > > > > > Used to facilitate seeking; particularly for HTTP pseudo
> > streaming.
> > > > > > >
> > > > > > > Reviewed-by: Lou Logan 
> > > > > > > Signed-off-by: Steven Liu 
> > > > [...]
> > > > > > > +static int flv_append_keyframe_info(AVFormatContext *s,
> > FLVContext
> > > > > > *flv, double ts, int64_t pos)
> > > > > > > +{
> > > > > > > +FLVFileposition *position = av_malloc(sizeof(
> > FLVFileposition));
> > > > > > > +
> > > > > > > +if (!position) {
> > > > > > > +av_log(s, AV_LOG_WARNING, "no mem for add keyframe
> > > > index!\n");
> > > > > > > +return AVERROR(ENOMEM);
> > > > > > > +}
> > > > > > > +
> > > > > > > +position->keyframe_timestamp = ts;
> > > > > > > +position->keyframe_position = pos;
> > > > > > > +
> > > > > > > +if (flv->filepositions_count) {
> > > > > > > +flv->filepositions = position;
> > > > > > > +flv->head_filepositions = flv->filepositions;
> > > > > > > +position->next = NULL;
> > > > > > > +} else {
> > > > > > > +flv->filepositions->next = position;
> > > > > > > +position->next = NULL;
> > > > > > > +flv->filepositions = flv->filepositions->next;
> > > > > > > +}
> > > > > > > +
> > > > > > > +flv->filepositions_count++;
> > > > > > > +
> > > > > > > +return 0;
> > > > > > > +}
> > > > > >
> > > > > > an array should be more space efficient than a linked list
> > > > > >
> > > > > array have max limit, if this is used in recording living stream to
> > flv,
> > > > > maybe linked list is better than array.
> > > >
> > > > on what platform can you allocate more linked list entries (which have
> > > > much more overhead) than an array ?
> > > >
> > > No, maybe you misunderstand me.
> > > I mean, this is a vector, if is use array[n], i cannot sure what size set
> > > to [n],
> >
> > have you tried using av_add_index_entry() ?
> >
> 
> Hi Michael,
> 
> I have read the code, i saw all the use case using
>  av_add_index_entry()  when demuxing,
> and i have not found list foreach API, i want add the keyframes'
> *filepositions* and *times* value into
> a temp list(memory), and flush them at the end of the flv muxing.
> 
> 1. read live streaming or file by sequence
> 2. if use add_keyframe_index option, add a mark flag at the position, use
> to insert new context at the last step.
> 3. add the keyframes *offset* and *timestamp* into a list
> 4. if use add_keyframe_index option, shift the metadata data from mark flag
> offset
> 5. insert the keyframes *offset* and *timestamp* from the list by sequence
> 6. free the list
> 7. end.
> 

> this patch is used to do this.

did you intend to attach a patch ?


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Fwd: [devroom-managers] Open Media devroom FOSDEM 2017 - Call For Participation

2016-11-05 Thread Kieran Kunhya
Hi all,

Following a successful Open Media room at FOSDEM 2015 and 2016, we are
organizing another Open Media room at FOSDEM 2017, and we are looking for
propositions of talks and panels. FOSDEM is one of the largest (5,000+
hackers!) gatherings of Free Software contributors in the world and happens
each February in Brussels (Belgium, Europe).

This year, the Open Media devroom will take place on:
Sunday, February 5th, 2017.


# About the Open Media devroom

The Open Media room will focus on all Free & Open Source media projects,
including software and hardware, spanning from building audio & video
applications, through standards, formats, codecs, video analytics and
search to Web video, IPTV, broadcasting and radio practices and much more.
If you're interested in video, image or audio technologies, and the breadth
of available open source technologies and communities for media - the Open
Media room is for you! For more information about the previous year
sessions: https://archive.fosdem.org/2016/schedule/track/open_media/


# CFP Guidelines

The deadline for submission is: December 1st 2016 (Thursday).

* To submit your proposal, visit:
https://penta.fosdem.org/submission/FOSDEM17

* A typical presentation will last for up to 20 minutes, with an additional
5 minutes Q&A and 5 minutes for speaker switching/prep in between. Panel
discussions may last up to 35 minutes. (Feel free to ask if you want to
have a longer or a shorter slot.)
IMPORTANT: Please make sure to select **”Open Media devroom”** track for
your submission.

* You will need to create an account (or use your account from previous
years) and then go to "create event”, and add the details of your
presentation.

* Selected talks will be notified by December 11th 2016.

* All sessions will be recorded and be made available under CC-BY licence
by FOSDEM at https://video.fosdem.org/ .


# Your submission must include the following information

* The title and subtitle of your talk (please be descriptive).
* select **”Open Media devroom”** as the track.
* 1 paragraph detailing what the talk will discuss, and why attendees
should attend it.
* A longer description if you have more details to share.
* Links to related material/websites/blogs etc.


# Community

The official communication channel is the Open Media devroom mailinglist.
Join the list at: https://lists.fosdem.org/listinfo/open-media-devroom

You may also be interested in joining the Open Source community from the
European Broadcasting Union on: https://tech.ebu.ch/groups/opensource

And please don't hesitate to contact us for more information!

Christophe, Adi, Frans and Kieran,
On behalf of the Open Media devroom.
___
devroom-managers mailing list
devroom-manag...@lists.fosdem.org
https://lists.fosdem.org/listinfo/devroom-managers
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/flvenc: add add_keyframe_index option

2016-11-05 Thread Steven Liu
Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.

Reviewed-by: Lou Logan 

Signed-off-by: Steven Liu 
Signed-off-by: Steven Liu 
---
 doc/muxers.texi  |3 +
 libavformat/flvenc.c |  331 --
 2 files changed, 324 insertions(+), 10 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 488ed43..806182a 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -147,6 +147,9 @@ Place AAC sequence header based on audio stream data.
 
 @item no_sequence_end
 Disable sequence end tag.
+
+@item add_keyframe_index
+Used to facilitate seeking; particularly for HTTP pseudo streaming.
 @end table
 @end table
 
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index e50f8e4..c18a6eb 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -24,6 +24,8 @@
 #include "libavutil/intfloat.h"
 #include "libavutil/avassert.h"
 #include "libavutil/mathematics.h"
+#include "avio_internal.h"
+#include "avio.h"
 #include "avc.h"
 #include "avformat.h"
 #include "flv.h"
@@ -64,8 +66,15 @@ static const AVCodecTag flv_audio_codec_ids[] = {
 typedef enum {
 FLV_AAC_SEQ_HEADER_DETECT = (1 << 0),
 FLV_NO_SEQUENCE_END = (1 << 1),
+FLV_ADD_KEYFRAME_INDEX = (1 << 2),
 } FLVFlags;
 
+typedef struct FLVFileposition {
+int64_t keyframe_position;
+double keyframe_timestamp;
+struct FLVFileposition *next;
+} FLVFileposition;
+
 typedef struct FLVContext {
 AVClass *av_class;
 int reserved;
@@ -74,6 +83,33 @@ typedef struct FLVContext {
 int64_t duration;
 int64_t delay;  ///< first dts delay (needed for AVC & Speex)
 
+int64_t datastart_offset;
+int64_t datasize_offset;
+int64_t datasize;
+int64_t videosize_offset;
+int64_t videosize;
+int64_t audiosize_offset;
+int64_t audiosize;
+
+int64_t metadata_size_pos;
+int64_t metadata_totalsize_pos;
+int64_t metadata_totalsize;
+int64_t keyframe_index_size;
+
+int64_t lasttimestamp_offset;
+double lasttimestamp;
+int64_t lastkeyframetimestamp_offset;
+double lastkeyframetimestamp;
+int64_t lastkeyframelocation_offset;
+int64_t lastkeyframelocation;
+
+int acurframeindex;
+int64_t keyframes_info_offset;
+
+int64_t filepositions_count;
+FLVFileposition *filepositions;
+FLVFileposition *head_filepositions;
+
 AVCodecParameters *audio_par;
 AVCodecParameters *video_par;
 double framerate;
@@ -202,6 +238,17 @@ static void put_amf_double(AVIOContext *pb, double d)
 avio_wb64(pb, av_double2int(d));
 }
 
+static void put_amf_byte(AVIOContext *pb, unsigned char abyte)
+{
+avio_w8(pb, abyte);
+}
+
+static void put_amf_dword_array(AVIOContext *pb, uint32_t dw)
+{
+avio_w8(pb, AMF_DATA_TYPE_ARRAY);
+avio_wb32(pb, dw);
+}
+
 static void put_amf_bool(AVIOContext *pb, int b)
 {
 avio_w8(pb, AMF_DATA_TYPE_BOOL);
@@ -213,12 +260,12 @@ static void write_metadata(AVFormatContext *s, unsigned 
int ts)
 AVIOContext *pb = s->pb;
 FLVContext *flv = s->priv_data;
 int metadata_count = 0;
-int64_t metadata_size_pos, data_size, metadata_count_pos;
+int64_t metadata_count_pos;
 AVDictionaryEntry *tag = NULL;
 
 /* write meta_tag */
-avio_w8(pb, 18);// tag type META
-metadata_size_pos = avio_tell(pb);
+avio_w8(pb, FLV_TAG_TYPE_META);// tag type META
+flv->metadata_size_pos = avio_tell(pb);
 avio_wb24(pb, 0);   // size of data part (sum of all parts below)
 avio_wb24(pb, ts);  // timestamp
 avio_wb32(pb, 0);   // reserved
@@ -327,19 +374,87 @@ static void write_metadata(AVFormatContext *s, unsigned 
int ts)
 put_amf_double(pb, 0); // delayed write
 }
 
+if (flv->flags & FLV_ADD_KEYFRAME_INDEX) {
+flv->acurframeindex = 0;
+flv->keyframe_index_size = 0;
+
+put_amf_string(pb, "hasVideo");
+put_amf_bool(pb, !!flv->video_par);
+metadata_count++;
+
+put_amf_string(pb, "hasKeyframes");
+put_amf_bool(pb, 1);
+metadata_count++;
+
+put_amf_string(pb, "hasAudio");
+put_amf_bool(pb, !!flv->audio_par);
+metadata_count++;
+
+put_amf_string(pb, "hasMetadata");
+put_amf_bool(pb, 1);
+metadata_count++;
+
+put_amf_string(pb, "canSeekToEnd");
+put_amf_bool(pb, 1);
+metadata_count++;
+
+put_amf_string(pb, "datasize");
+flv->datasize_offset = avio_tell(pb);
+flv->datasize = 0;
+put_amf_double(pb, flv->datasize);
+metadata_count++;
+
+put_amf_string(pb, "videosize");
+flv->videosize_offset = avio_tell(pb);
+flv->videosize = 0;
+put_amf_double(pb, flv->videosize);
+metadata_count++;
+
+put_amf_string(pb, "audiosize");
+flv->audiosize_offset = avio_tell(pb);
+flv->audiosize = 0;
+put_amf_double(pb, flv->aud

[FFmpeg-devel] [PATCH v2] avformat/flvenc: add add_keyframe_index option

2016-11-05 Thread Steven Liu
Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.
 1. read live streaming or file by sequence
 2. if use add_keyframe_index option, add a mark flag at the position, use to 
insert new context at the last step.
 3. add the keyframes *offset* and *timestamp* into a list
 4. if use add_keyframe_index option, shift the metadata data from mark flag 
offset
 5. insert the keyframes *offset* and *timestamp* from the list by sequence
 6. free the list
 7. end.

Reviewed-by: Lou Logan 
Signed-off-by: Steven Liu 
---
 doc/muxers.texi  |3 +
 libavformat/flvenc.c |  331 --
 2 files changed, 324 insertions(+), 10 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 488ed43..806182a 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -147,6 +147,9 @@ Place AAC sequence header based on audio stream data.
 
 @item no_sequence_end
 Disable sequence end tag.
+
+@item add_keyframe_index
+Used to facilitate seeking; particularly for HTTP pseudo streaming.
 @end table
 @end table
 
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index e50f8e4..c18a6eb 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -24,6 +24,8 @@
 #include "libavutil/intfloat.h"
 #include "libavutil/avassert.h"
 #include "libavutil/mathematics.h"
+#include "avio_internal.h"
+#include "avio.h"
 #include "avc.h"
 #include "avformat.h"
 #include "flv.h"
@@ -64,8 +66,15 @@ static const AVCodecTag flv_audio_codec_ids[] = {
 typedef enum {
 FLV_AAC_SEQ_HEADER_DETECT = (1 << 0),
 FLV_NO_SEQUENCE_END = (1 << 1),
+FLV_ADD_KEYFRAME_INDEX = (1 << 2),
 } FLVFlags;
 
+typedef struct FLVFileposition {
+int64_t keyframe_position;
+double keyframe_timestamp;
+struct FLVFileposition *next;
+} FLVFileposition;
+
 typedef struct FLVContext {
 AVClass *av_class;
 int reserved;
@@ -74,6 +83,33 @@ typedef struct FLVContext {
 int64_t duration;
 int64_t delay;  ///< first dts delay (needed for AVC & Speex)
 
+int64_t datastart_offset;
+int64_t datasize_offset;
+int64_t datasize;
+int64_t videosize_offset;
+int64_t videosize;
+int64_t audiosize_offset;
+int64_t audiosize;
+
+int64_t metadata_size_pos;
+int64_t metadata_totalsize_pos;
+int64_t metadata_totalsize;
+int64_t keyframe_index_size;
+
+int64_t lasttimestamp_offset;
+double lasttimestamp;
+int64_t lastkeyframetimestamp_offset;
+double lastkeyframetimestamp;
+int64_t lastkeyframelocation_offset;
+int64_t lastkeyframelocation;
+
+int acurframeindex;
+int64_t keyframes_info_offset;
+
+int64_t filepositions_count;
+FLVFileposition *filepositions;
+FLVFileposition *head_filepositions;
+
 AVCodecParameters *audio_par;
 AVCodecParameters *video_par;
 double framerate;
@@ -202,6 +238,17 @@ static void put_amf_double(AVIOContext *pb, double d)
 avio_wb64(pb, av_double2int(d));
 }
 
+static void put_amf_byte(AVIOContext *pb, unsigned char abyte)
+{
+avio_w8(pb, abyte);
+}
+
+static void put_amf_dword_array(AVIOContext *pb, uint32_t dw)
+{
+avio_w8(pb, AMF_DATA_TYPE_ARRAY);
+avio_wb32(pb, dw);
+}
+
 static void put_amf_bool(AVIOContext *pb, int b)
 {
 avio_w8(pb, AMF_DATA_TYPE_BOOL);
@@ -213,12 +260,12 @@ static void write_metadata(AVFormatContext *s, unsigned 
int ts)
 AVIOContext *pb = s->pb;
 FLVContext *flv = s->priv_data;
 int metadata_count = 0;
-int64_t metadata_size_pos, data_size, metadata_count_pos;
+int64_t metadata_count_pos;
 AVDictionaryEntry *tag = NULL;
 
 /* write meta_tag */
-avio_w8(pb, 18);// tag type META
-metadata_size_pos = avio_tell(pb);
+avio_w8(pb, FLV_TAG_TYPE_META);// tag type META
+flv->metadata_size_pos = avio_tell(pb);
 avio_wb24(pb, 0);   // size of data part (sum of all parts below)
 avio_wb24(pb, ts);  // timestamp
 avio_wb32(pb, 0);   // reserved
@@ -327,19 +374,87 @@ static void write_metadata(AVFormatContext *s, unsigned 
int ts)
 put_amf_double(pb, 0); // delayed write
 }
 
+if (flv->flags & FLV_ADD_KEYFRAME_INDEX) {
+flv->acurframeindex = 0;
+flv->keyframe_index_size = 0;
+
+put_amf_string(pb, "hasVideo");
+put_amf_bool(pb, !!flv->video_par);
+metadata_count++;
+
+put_amf_string(pb, "hasKeyframes");
+put_amf_bool(pb, 1);
+metadata_count++;
+
+put_amf_string(pb, "hasAudio");
+put_amf_bool(pb, !!flv->audio_par);
+metadata_count++;
+
+put_amf_string(pb, "hasMetadata");
+put_amf_bool(pb, 1);
+metadata_count++;
+
+put_amf_string(pb, "canSeekToEnd");
+put_amf_bool(pb, 1);
+metadata_count++;
+
+put_amf_string(pb, "datasize");
+flv->datasize_offset = avio_tell(pb);
+flv->datasize = 0;
+put_amf_double(pb, flv->datasize)

Re: [FFmpeg-devel] [PATCH] avformat/flvenc: add add_keyframe_index option

2016-11-05 Thread Steven Liu
Ignore this please! i have send a new version patch.
 [PATCH v2] avformat/flvenc: add add_keyframe_index option

2016-11-05 20:42 GMT+08:00 Steven Liu :

> Add keyframe index metadata
> Used to facilitate seeking; particularly for HTTP pseudo streaming.
>
> Reviewed-by: Lou Logan 
>
> Signed-off-by: Steven Liu 
> Signed-off-by: Steven Liu 
> ---
>  doc/muxers.texi  |3 +
>  libavformat/flvenc.c |  331 ++
> ++--
>  2 files changed, 324 insertions(+), 10 deletions(-)
>
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index 488ed43..806182a 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -147,6 +147,9 @@ Place AAC sequence header based on audio stream data.
>
>  @item no_sequence_end
>  Disable sequence end tag.
> +
> +@item add_keyframe_index
> +Used to facilitate seeking; particularly for HTTP pseudo streaming.
>  @end table
>  @end table
>
> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
> index e50f8e4..c18a6eb 100644
> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -24,6 +24,8 @@
>  #include "libavutil/intfloat.h"
>  #include "libavutil/avassert.h"
>  #include "libavutil/mathematics.h"
> +#include "avio_internal.h"
> +#include "avio.h"
>  #include "avc.h"
>  #include "avformat.h"
>  #include "flv.h"
> @@ -64,8 +66,15 @@ static const AVCodecTag flv_audio_codec_ids[] = {
>  typedef enum {
>  FLV_AAC_SEQ_HEADER_DETECT = (1 << 0),
>  FLV_NO_SEQUENCE_END = (1 << 1),
> +FLV_ADD_KEYFRAME_INDEX = (1 << 2),
>  } FLVFlags;
>
> +typedef struct FLVFileposition {
> +int64_t keyframe_position;
> +double keyframe_timestamp;
> +struct FLVFileposition *next;
> +} FLVFileposition;
> +
>  typedef struct FLVContext {
>  AVClass *av_class;
>  int reserved;
> @@ -74,6 +83,33 @@ typedef struct FLVContext {
>  int64_t duration;
>  int64_t delay;  ///< first dts delay (needed for AVC & Speex)
>
> +int64_t datastart_offset;
> +int64_t datasize_offset;
> +int64_t datasize;
> +int64_t videosize_offset;
> +int64_t videosize;
> +int64_t audiosize_offset;
> +int64_t audiosize;
> +
> +int64_t metadata_size_pos;
> +int64_t metadata_totalsize_pos;
> +int64_t metadata_totalsize;
> +int64_t keyframe_index_size;
> +
> +int64_t lasttimestamp_offset;
> +double lasttimestamp;
> +int64_t lastkeyframetimestamp_offset;
> +double lastkeyframetimestamp;
> +int64_t lastkeyframelocation_offset;
> +int64_t lastkeyframelocation;
> +
> +int acurframeindex;
> +int64_t keyframes_info_offset;
> +
> +int64_t filepositions_count;
> +FLVFileposition *filepositions;
> +FLVFileposition *head_filepositions;
> +
>  AVCodecParameters *audio_par;
>  AVCodecParameters *video_par;
>  double framerate;
> @@ -202,6 +238,17 @@ static void put_amf_double(AVIOContext *pb, double d)
>  avio_wb64(pb, av_double2int(d));
>  }
>
> +static void put_amf_byte(AVIOContext *pb, unsigned char abyte)
> +{
> +avio_w8(pb, abyte);
> +}
> +
> +static void put_amf_dword_array(AVIOContext *pb, uint32_t dw)
> +{
> +avio_w8(pb, AMF_DATA_TYPE_ARRAY);
> +avio_wb32(pb, dw);
> +}
> +
>  static void put_amf_bool(AVIOContext *pb, int b)
>  {
>  avio_w8(pb, AMF_DATA_TYPE_BOOL);
> @@ -213,12 +260,12 @@ static void write_metadata(AVFormatContext *s,
> unsigned int ts)
>  AVIOContext *pb = s->pb;
>  FLVContext *flv = s->priv_data;
>  int metadata_count = 0;
> -int64_t metadata_size_pos, data_size, metadata_count_pos;
> +int64_t metadata_count_pos;
>  AVDictionaryEntry *tag = NULL;
>
>  /* write meta_tag */
> -avio_w8(pb, 18);// tag type META
> -metadata_size_pos = avio_tell(pb);
> +avio_w8(pb, FLV_TAG_TYPE_META);// tag type META
> +flv->metadata_size_pos = avio_tell(pb);
>  avio_wb24(pb, 0);   // size of data part (sum of all parts
> below)
>  avio_wb24(pb, ts);  // timestamp
>  avio_wb32(pb, 0);   // reserved
> @@ -327,19 +374,87 @@ static void write_metadata(AVFormatContext *s,
> unsigned int ts)
>  put_amf_double(pb, 0); // delayed write
>  }
>
> +if (flv->flags & FLV_ADD_KEYFRAME_INDEX) {
> +flv->acurframeindex = 0;
> +flv->keyframe_index_size = 0;
> +
> +put_amf_string(pb, "hasVideo");
> +put_amf_bool(pb, !!flv->video_par);
> +metadata_count++;
> +
> +put_amf_string(pb, "hasKeyframes");
> +put_amf_bool(pb, 1);
> +metadata_count++;
> +
> +put_amf_string(pb, "hasAudio");
> +put_amf_bool(pb, !!flv->audio_par);
> +metadata_count++;
> +
> +put_amf_string(pb, "hasMetadata");
> +put_amf_bool(pb, 1);
> +metadata_count++;
> +
> +put_amf_string(pb, "canSeekToEnd");
> +put_amf_bool(pb, 1);
> +metadata_count++;
> +
> +put_amf_string(pb, "datasize");
> +flv->datasize_offset = avio_tell(pb);

Re: [FFmpeg-devel] [PATCH v2] avformat/flvenc: add add_keyframe_index option

2016-11-05 Thread Michael Niedermayer
On Sat, Nov 05, 2016 at 08:44:01PM +0800, Steven Liu wrote:
> Add keyframe index metadata
> Used to facilitate seeking; particularly for HTTP pseudo streaming.
>  1. read live streaming or file by sequence
>  2. if use add_keyframe_index option, add a mark flag at the position, use to 
> insert new context at the last step.
>  3. add the keyframes *offset* and *timestamp* into a list
>  4. if use add_keyframe_index option, shift the metadata data from mark flag 
> offset
>  5. insert the keyframes *offset* and *timestamp* from the list by sequence
>  6. free the list
>  7. end.
> 
> Reviewed-by: Lou Logan 
> Signed-off-by: Steven Liu 
> ---
>  doc/muxers.texi  |3 +
>  libavformat/flvenc.c |  331 
> --
>  2 files changed, 324 insertions(+), 10 deletions(-)

LGTM

please also add a fate test

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] hevc: Support extradata changes

2016-11-05 Thread Michael Niedermayer
On Wed, Nov 02, 2016 at 11:48:58AM -0400, Vittorio Giovara wrote:
> Signed-off-by: Vittorio Giovara 
> ---
> Please CC.
> Vittorio
> 
>  libavcodec/hevc.c | 18 ++
>  libavformat/mov.c |  4 
>  2 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
> index 29e0d49..b50120e 100644
> --- a/libavcodec/hevc.c
> +++ b/libavcodec/hevc.c
> @@ -3051,6 +3051,8 @@ static int hevc_decode_frame(AVCodecContext *avctx, 
> void *data, int *got_output,
>   AVPacket *avpkt)
>  {
>  int ret;
> +int new_extradata_size;
> +uint8_t *new_extradata;
>  HEVCContext *s = avctx->priv_data;
>  
>  if (!avpkt->size) {
> @@ -3062,6 +3064,22 @@ static int hevc_decode_frame(AVCodecContext *avctx, 
> void *data, int *got_output,
>  return 0;
>  }
>  
> +new_extradata_size = 0;
> +new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA,
> +&new_extradata_size);
> +if (new_extradata_size > 0 && new_extradata) {

new_extradata should be checked first, that should make
new_extradata_size = 0; unneeded


> +if (new_extradata_size > avctx->extradata_size) {

> +avctx->extradata = av_realloc(avctx->extradata, 
> new_extradata_size);

This leaks on reallocation failure overwriting the allocated pointer

also can you add a fate test ?

thx

[...]

--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Add support for 24 bit RTSP audio playback

2016-11-05 Thread compn
On Sat, 5 Nov 2016 01:15:44 +0300
Timur Aydin  wrote:

> ff_register_rtp_dynamic_payload_handlers(void)
> ff_register_dynamic_payload_handler(&ff_vorbis_dynamic_handler);
> ff_register_dynamic_payload_handler(&ff_vp8_dynamic_handler);
> ff_register_dynamic_payload_handler(&ff_vp9_dynamic_handler);
> +ff_register_dynamic_payload_handler(&l24_dynamic_handler);
>  ff_register_dynamic_payload_handler(&gsm_dynamic_handler);
>  ff_register_dynamic_payload_handler(&opus_dynamic_handler);
>  ff_register_dynamic_payload_handler(&realmedia_mp3_dynamic_handler);

should probably l24 be under gsm as this list looks like alphabetical
order.

i've only seen l16 rtsp samples, have not seen l24 yet.

-compn
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-05 Thread Michael Niedermayer
On Fri, Nov 04, 2016 at 11:37:24PM +0530, Pallavi Kumari wrote:
> >> ok, do you know how to compute that or should i explain it ?
> 
> Explanation will help. Is there any function in FFmpeg to get absolute
> value of FFT?

hypot() of the 2 real components of each complex value should work

complex numbers are like dots on a paper, if you declare the middle
of the paper as 0, the 2 components are the x and y coordinates of
a complex number and the distance to the 0 point is the absolute
value


> and how to get frequency data?

the data[i] array  after the FFT is so that data[i] are the values
for the frequency i. You may need to permute them though

see libavcodec/tests/fft.c for how exactly the fft relates to a
reference fft

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Add support for 24 bit RTSP audio playback

2016-11-05 Thread Timur Aydin

Here is a simple test case:

1) Use the live555 RTSP server to serve a 24 bit wav file.

2) Play this file using ffplay as follows:

  $ ffplay rtsp:///audio.wav

In this case, ffplay fails as follows:

[ta@bonsai ~]$ ffplay rtsp://10.2.1.21:8554/wave
ffplay version 3.2 Copyright (c) 2003-2016 the FFmpeg developers
  built with gcc 6.2.1 (GCC) 20160830
  configuration: --prefix=/usr --disable-debug --disable-static 
--disable-stripping --enable-avisynth --enable-avresample 
--enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl 
--enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype 
--enable-libfribidi --enable-libgsm --enable-libiec61883 
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb 
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus 
--enable-libpulse --enable-libschroedinger --enable-libsoxr 
--enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 
--enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp 
--enable-libx264 --enable-libx265 --enable-libxvid --enable-netcdf 
--enable-shared --enable-version3 --enable-x11grab

  libavutil  55. 34.100 / 55. 34.100
  libavcodec 57. 64.100 / 57. 64.100
  libavformat57. 56.100 / 57. 56.100
  libavdevice57.  1.100 / 57.  1.100
  libavfilter 6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale  4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc54.  1.100 / 54.  1.100
[rtsp @ 0x7fddbc000920] Could not find codec parameters for stream 0 
(Audio: none, 96000 Hz, 2 channels): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options

Input #0, rtsp, from 'rtsp://10.2.1.21:8554/wave':
  Metadata:
title   : wave
comment : wave
  Duration: 00:10:00.00, start: 0.001250, bitrate: N/A
Stream #0:0: Audio: none, 96000 Hz, 2 channels
No codec could be found with id 0
Failed to open file 'rtsp://10.2.1.21:8554/wave' or configure filtergraph

--
Timur

On 11/5/2016 11:49 AM, Michael Niedermayer wrote:

On Sat, Nov 05, 2016 at 01:15:44AM +0300, Timur Aydin wrote:

Hello guys,

When ffplay is used to play from the RTSP URL that serves 24 bit
audio content, ffplay fails to recognize the audio codec format. The
attached patch adds support for playing 24 bit audio content over
RTSP by defining a dynamic payload handler for "L24".


do you have a testcase for this ?

[...]



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] avformat/hls: Factor copying stream info to a separate function

2016-11-05 Thread Anssi Hannula
Signed-off-by: Anssi Hannula 
---
 libavformat/hls.c | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 3c09dd8..6fb652c 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1528,6 +1528,16 @@ static void add_stream_to_programs(AVFormatContext *s, 
struct playlist *pls, AVS
 av_dict_set_int(&stream->metadata, "variant_bitrate", bandwidth, 0);
 }
 
+static void set_stream_info_from_input_stream(AVStream *st, struct playlist 
*pls, AVStream *ist)
+{
+avcodec_parameters_copy(st->codecpar, ist->codecpar);
+
+if (pls->is_id3_timestamped) /* custom timestamps via id3 */
+avpriv_set_pts_info(st, 33, 1, MPEG_TIME_BASE);
+else
+avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, 
ist->time_base.den);
+}
+
 /* add new subdemuxer streams to our context, if any */
 static int update_streams_from_subdemuxer(AVFormatContext *s, struct playlist 
*pls)
 {
@@ -1540,13 +1550,7 @@ static int 
update_streams_from_subdemuxer(AVFormatContext *s, struct playlist *p
 return AVERROR(ENOMEM);
 
 st->id = pls->index;
-
-avcodec_parameters_copy(st->codecpar, ist->codecpar);
-
-if (pls->is_id3_timestamped) /* custom timestamps via id3 */
-avpriv_set_pts_info(st, 33, 1, MPEG_TIME_BASE);
-else
-avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, 
ist->time_base.den);
+set_stream_info_from_input_stream(st, pls, ist);
 
 dynarray_add(&pls->main_streams, &pls->n_main_streams, st);
 
-- 
2.7.4

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] hls: call avformat_find_stream_info for mpegts subdemuxer

2016-11-05 Thread Anssi Hannula
03.11.2016, 20:34, Andreas Cadhalpun kirjoitti:
> On 03.11.2016 11:18, Anssi Hannula wrote:
>> Andreas Cadhalpun kirjoitti 2016-11-03 02:12:
>>> This fixes probing dts/eac3/mp2 in hls.
>>>
>>> The problem was introduced in commit 
>>> 04964ac311abe670fb3b60290a330f2067544b13.
>>>
>>> Also update the fate reference for the fate-segment-mp4-to-ts test.
>>
>> Thanks.
>>
>> Can you point me to some example streams with this issue? (or how to 
>> generate one)
> 
> ffmpeg creates these, as I've mentioned in [1], e.g.:
> $ ./ffmpeg -f lavfi -i sine=d=0.1 -strict -2 -c:a dca -f hls dca.hls -y &> 
> /dev/null
> $ ./ffmpeg -f lavfi -i sine=d=0.1 -strict -2 -c:a eac3 -f hls eac3.hls -y &> 
> /dev/null
> $ ./ffmpeg -f lavfi -i sine=d=0.1 -strict -2 -c:a mp2 -f hls mp2.hls -y &> 
> /dev/null
> 
> Then run ffprobe on the created hls files to see the problems.
> 
>> Unfortunately calling avformat_find_stream_info() for sub-mpegts streams is 
>> quite
>> bandwidth-heavy (especially if there are many stream variants and/or 
>> alternative
>> renditions, and especially now that we no longer clear mpegts 
>> AVFMTCTX_NOHEADER
>> flag so that streams like #4930 work) so I tried to avoid that.
>> It is better than doing nothing, though, if we can't find an alternative 
>> solution
>> (better slow than not working).
>>
>> I'd first like to try to understand what is happening, though.
> 
> OK. A better solution is always welcome.

Thanks for the examples.

The two follow-up patches fix them for me, can you confirm and/or see anything 
else?


Anssi Hannula (2):
  avformat/hls: Factor copying stream info to a separate function
  avformat/hls: Fix probing mpegts audio streams that use probing

-- 
Anssi Hannula

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] avformat/hls: Fix probing mpegts audio streams that use probing

2016-11-05 Thread Anssi Hannula
Commit 04964ac311abe670f ("avformat/hls: Fix missing streams in some
cases with MPEG TS") caused a regression where subdemuxer streams that
use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly.

This is because the codec parameters from the subdemuxer stream, once
probed, are not passed on to the main stream.

Fix that by updating the codec parameters if the codec id changes.

Signed-off-by: Anssi Hannula 
---
 libavformat/hls.c | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 6fb652c..8527f33 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1950,6 +1950,8 @@ static int hls_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 /* If we got a packet, return it */
 if (minplaylist >= 0) {
 struct playlist *pls = c->playlists[minplaylist];
+AVStream *ist;
+AVStream *st;
 
 ret = update_streams_from_subdemuxer(s, pls);
 if (ret < 0) {
@@ -1972,8 +1974,11 @@ static int hls_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 return AVERROR_BUG;
 }
 
+ist = pls->ctx->streams[pls->pkt.stream_index];
+st = pls->main_streams[pls->pkt.stream_index];
+
 *pkt = pls->pkt;
-pkt->stream_index = pls->main_streams[pls->pkt.stream_index]->index;
+pkt->stream_index = st->index;
 reset_packet(&c->playlists[minplaylist]->pkt);
 
 if (pkt->dts != AV_NOPTS_VALUE)
@@ -1981,6 +1986,11 @@ static int hls_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 
pls->ctx->streams[pls->pkt.stream_index]->time_base,
 AV_TIME_BASE_Q);
 
+/* There may be more situations where this would be useful, but this 
at least
+ * handles newly probed codecs properly (i.e. request_probe by 
mpegts). */
+if (ist->codecpar->codec_id != st->codecpar->codec_id)
+set_stream_info_from_input_stream(st, pls, ist);
+
 return 0;
 }
 return AVERROR_EOF;
-- 
2.7.4

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3] ffmpeg: parameters for filter thread counts

2016-11-05 Thread DeHackEd
On 10/30/2016 09:25 AM, DeHackEd wrote:
> Enables specifying how many threads are available to each filtergraph.
> ---
> v2->v3:
> - Typos in docs fixed
> 
> v1->v2:
> - Reworded documentation
> - Removed hunk from ffmpeg_filter.c not directly applicable to patch
> 
>  doc/ffmpeg.texi | 10 ++
>  ffmpeg.h|  3 +++
>  ffmpeg_filter.c |  7 +++
>  ffmpeg_opt.c|  4 
>  4 files changed, 24 insertions(+)
> 
> diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
> index 47c8935..fd8a0c1 100644
> --- a/doc/ffmpeg.texi
> +++ b/doc/ffmpeg.texi
> @@ -415,6 +415,11 @@ This option is similar to @option{-filter}, the only 
> difference is that its
>  argument is the name of the file from which a filtergraph description is to 
> be
>  read.
>  
> +@item -filter_threads @var{nb_threads} (@emph{global})
> +Defines how many threads are used to process a filter pipeline. Each pipeline
> +will produce a thread pool with this many threads available for parallel 
> processing.
> +The default is the number of available CPUs.
> +
>  @item -pre[:@var{stream_specifier}] @var{preset_name} 
> (@emph{output,per-stream})
>  Specify the preset for matching stream(s).
>  
> @@ -1201,6 +1206,11 @@ To generate 5 seconds of pure red video using lavfi 
> @code{color} source:
>  ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv
>  @end example
>  
> +@item -filter_complex_threads @var{nb_threads} (@emph{global})
> +Defines how many threads are used to process a filter_complex graph.
> +Similar to filter_threads but used for @code{-filter_complex} graphs only.
> +The default is the number of available CPUs.
> +
>  @item -lavfi @var{filtergraph} (@emph{global})
>  Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or
>  outputs. Equivalent to @option{-filter_complex}.
> diff --git a/ffmpeg.h b/ffmpeg.h
> index e1d4593..9a4389f 100644
> --- a/ffmpeg.h
> +++ b/ffmpeg.h
> @@ -569,6 +569,9 @@ extern AVIOContext *progress_avio;
>  extern float max_error_rate;
>  extern char *videotoolbox_pixfmt;
>  
> +extern int filter_nbthreads;
> +extern int filter_complex_nbthreads;
> +
>  extern const AVIOInterruptCB int_cb;
>  
>  extern const OptionDef options[];
> diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
> index 27aeca0..95b9c43 100644
> --- a/ffmpeg_filter.c
> +++ b/ffmpeg_filter.c
> @@ -39,6 +39,9 @@
>  #include "libavutil/imgutils.h"
>  #include "libavutil/samplefmt.h"
>  
> +int filter_nbthreads = -1;
> +int filter_complex_nbthreads = -1;
> +
>  static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum 
> AVCodecID codec_id, const enum AVPixelFormat default_formats[])
>  {
>  static const enum AVPixelFormat mjpeg_formats[] =
> @@ -992,6 +995,8 @@ int configure_filtergraph(FilterGraph *fg)
>  char args[512];
>  AVDictionaryEntry *e = NULL;
>  
> +fg->graph->nb_threads = filter_complex_nbthreads;
> +
>  args[0] = 0;
>  while ((e = av_dict_get(ost->sws_dict, "", e,
>  AV_DICT_IGNORE_SUFFIX))) {
> @@ -1022,6 +1027,8 @@ int configure_filtergraph(FilterGraph *fg)
>  e = av_dict_get(ost->encoder_opts, "threads", NULL, 0);
>  if (e)
>  av_opt_set(fg->graph, "threads", e->value, 0);
> +} else {
> +fg->graph->nb_threads = filter_nbthreads;
>  }
>  
>  if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, 
> &outputs)) < 0)
> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
> index 4d25fff..dc94380 100644
> --- a/ffmpeg_opt.c
> +++ b/ffmpeg_opt.c
> @@ -3365,12 +3365,16 @@ const OptionDef options[] = {
>  "set profile", "profile" },
>  { "filter", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off 
> = OFFSET(filters) },
>  "set stream filtergraph", "filter_graph" },
> +{ "filter_threads",  HAS_ARG | OPT_INT,  { 
> &filter_nbthreads },
> +"number of non-complex filter threads" },
>  { "filter_script",  HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off 
> = OFFSET(filter_scripts) },
>  "read stream filtergraph description from a file", "filename" },
>  { "reinit_filter",  HAS_ARG | OPT_INT | OPT_SPEC | OPT_INPUT,{ .off 
> = OFFSET(reinit_filters) },
>  "reinit filtergraph on input parameter changes", "" },
>  { "filter_complex", HAS_ARG | OPT_EXPERT,{ 
> .func_arg = opt_filter_complex },
>  "create a complex filtergraph", "graph_description" },
> +{ "filter_complex_threads", HAS_ARG | OPT_INT,   { 
> &filter_complex_nbthreads },
> +"number of threads for -filter_complex" },
>  { "lavfi",  HAS_ARG | OPT_EXPERT,{ 
> .func_arg = opt_filter_complex },
>  "create a complex filtergraph", "graph_description" },
>  { "filter_complex_script", HAS_ARG | OPT_EXPERT, { 
> .func_arg = opt_filter_complex_script },
> 

All outstanding issues were fixed in this "v3" patch. 

Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Fallback to finding non-keyframe in fix_index, if keyframe search fails.

2016-11-05 Thread Derek Buitenhuis
On 11/4/2016 9:53 PM, Sasi Inguva wrote:
> So, if I am not wrong, the only case when that would happen is, if edit
> list media time was < 0 . And that would be a corrupt MOV file, unless edit
> list media time = -1.
> I tried to create such a file with AtomInspector but it doesn't let me.

FWIW, this also used 'work'. I made an example file in a hex editor:

https://transfer.sh/OPAkZ/out.mp4.xz (URL is good for 14 days.)

Near as I can tell, negative entries in .mov are actually allowed,
since mov timestamps are signed (ISOBMFF's are unsigned).

My opinion is that this failure should go under explode mode (AV_EF_EXPLODE),
and by default adjust to the first timestamp, as long as it's possible/makes
sense. This is, of course, just my opinion. I hope someone else from FFmpeg
will reply and chime in with theirs.

Cheers,
- Derek
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Add support for 24 bit RTSP audio playback

2016-11-05 Thread Michael Niedermayer
On Sat, Nov 05, 2016 at 09:21:46AM -0400, compn wrote:
> On Sat, 5 Nov 2016 01:15:44 +0300
> Timur Aydin  wrote:
> 
> > ff_register_rtp_dynamic_payload_handlers(void)
> > ff_register_dynamic_payload_handler(&ff_vorbis_dynamic_handler);
> > ff_register_dynamic_payload_handler(&ff_vp8_dynamic_handler);
> > ff_register_dynamic_payload_handler(&ff_vp9_dynamic_handler);
> > +ff_register_dynamic_payload_handler(&l24_dynamic_handler);
> >  ff_register_dynamic_payload_handler(&gsm_dynamic_handler);
> >  ff_register_dynamic_payload_handler(&opus_dynamic_handler);
> >  ff_register_dynamic_payload_handler(&realmedia_mp3_dynamic_handler);
> 
> should probably l24 be under gsm as this list looks like alphabetical
> order.

changed
applied

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] workaround for IOS9 getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve port number.

2016-11-05 Thread Michael Niedermayer
On Wed, Aug 24, 2016 at 10:46:41AM +, liu jc wrote:
> Signed-off-by: liujingchao 
> ---
>  libavformat/tcp.c | 8 
>  1 file changed, 8 insertions(+)
>  mode change 100644 => 100755 libavformat/tcp.c

applied

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: Fix probing mpegts audio streams that use probing

2016-11-05 Thread Hendrik Leppkes
On Sat, Nov 5, 2016 at 5:39 PM, Anssi Hannula  wrote:
> Commit 04964ac311abe670f ("avformat/hls: Fix missing streams in some
> cases with MPEG TS") caused a regression where subdemuxer streams that
> use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly.
>
> This is because the codec parameters from the subdemuxer stream, once
> probed, are not passed on to the main stream.
>
> Fix that by updating the codec parameters if the codec id changes.
>
> Signed-off-by: Anssi Hannula 
> ---
>  libavformat/hls.c | 12 +++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index 6fb652c..8527f33 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -1950,6 +1950,8 @@ static int hls_read_packet(AVFormatContext *s, AVPacket 
> *pkt)
>  /* If we got a packet, return it */
>  if (minplaylist >= 0) {
>  struct playlist *pls = c->playlists[minplaylist];
> +AVStream *ist;
> +AVStream *st;
>
>  ret = update_streams_from_subdemuxer(s, pls);
>  if (ret < 0) {
> @@ -1972,8 +1974,11 @@ static int hls_read_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  return AVERROR_BUG;
>  }
>
> +ist = pls->ctx->streams[pls->pkt.stream_index];
> +st = pls->main_streams[pls->pkt.stream_index];
> +
>  *pkt = pls->pkt;
> -pkt->stream_index = pls->main_streams[pls->pkt.stream_index]->index;
> +pkt->stream_index = st->index;
>  reset_packet(&c->playlists[minplaylist]->pkt);
>
>  if (pkt->dts != AV_NOPTS_VALUE)
> @@ -1981,6 +1986,11 @@ static int hls_read_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  
> pls->ctx->streams[pls->pkt.stream_index]->time_base,
>  AV_TIME_BASE_Q);
>
> +/* There may be more situations where this would be useful, but this 
> at least
> + * handles newly probed codecs properly (i.e. request_probe by 
> mpegts). */
> +if (ist->codecpar->codec_id != st->codecpar->codec_id)
> +set_stream_info_from_input_stream(st, pls, ist);
> +

A better solution would be checking
ist->internal->need_context_update, and also setting this in the
output stream when you copy params over, so the generic code knows
things changed.

- Hendrik
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avformat/hls: Factor copying stream info to a separate function

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 17:38, Anssi Hannula wrote:
> Signed-off-by: Anssi Hannula 
> ---
>  libavformat/hls.c | 18 +++---
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index 3c09dd8..6fb652c 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -1528,6 +1528,16 @@ static void add_stream_to_programs(AVFormatContext *s, 
> struct playlist *pls, AVS
>  av_dict_set_int(&stream->metadata, "variant_bitrate", bandwidth, 0);
>  }
>  
> +static void set_stream_info_from_input_stream(AVStream *st, struct playlist 
> *pls, AVStream *ist)
> +{
> +avcodec_parameters_copy(st->codecpar, ist->codecpar);

This can fail, so the return value should be checked.

Best regards,
Andreas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: Fix probing mpegts audio streams that use probing

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 17:39, Anssi Hannula wrote:
> Commit 04964ac311abe670f ("avformat/hls: Fix missing streams in some
> cases with MPEG TS") caused a regression where subdemuxer streams that
> use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly.
> 
> This is because the codec parameters from the subdemuxer stream, once
> probed, are not passed on to the main stream.
> 
> Fix that by updating the codec parameters if the codec id changes.
> 
> Signed-off-by: Anssi Hannula 
> ---
>  libavformat/hls.c | 12 +++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index 6fb652c..8527f33 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -1950,6 +1950,8 @@ static int hls_read_packet(AVFormatContext *s, AVPacket 
> *pkt)
>  /* If we got a packet, return it */
>  if (minplaylist >= 0) {
>  struct playlist *pls = c->playlists[minplaylist];
> +AVStream *ist;
> +AVStream *st;
>  
>  ret = update_streams_from_subdemuxer(s, pls);
>  if (ret < 0) {
> @@ -1972,8 +1974,11 @@ static int hls_read_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  return AVERROR_BUG;
>  }
>  
> +ist = pls->ctx->streams[pls->pkt.stream_index];
> +st = pls->main_streams[pls->pkt.stream_index];
> +
>  *pkt = pls->pkt;
> -pkt->stream_index = pls->main_streams[pls->pkt.stream_index]->index;
> +pkt->stream_index = st->index;
>  reset_packet(&c->playlists[minplaylist]->pkt);
>  
>  if (pkt->dts != AV_NOPTS_VALUE)
> @@ -1981,6 +1986,11 @@ static int hls_read_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  
> pls->ctx->streams[pls->pkt.stream_index]->time_base,
>  AV_TIME_BASE_Q);
>  
> +/* There may be more situations where this would be useful, but this 
> at least
> + * handles newly probed codecs properly (i.e. request_probe by 
> mpegts). */
> +if (ist->codecpar->codec_id != st->codecpar->codec_id)
> +set_stream_info_from_input_stream(st, pls, ist);

This has to set:
ist->internal->need_context_update = 1;

Otherwise mp2 is still detected as mp3.

Best regards,
Andreas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: Fix probing mpegts audio streams that use probing

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 18:47, Andreas Cadhalpun wrote:
> On 05.11.2016 17:39, Anssi Hannula wrote:
>> @@ -1981,6 +1986,11 @@ static int hls_read_packet(AVFormatContext *s, 
>> AVPacket *pkt)
>>  
>> pls->ctx->streams[pls->pkt.stream_index]->time_base,
>>  AV_TIME_BASE_Q);
>>  
>> +/* There may be more situations where this would be useful, but 
>> this at least
>> + * handles newly probed codecs properly (i.e. request_probe by 
>> mpegts). */
>> +if (ist->codecpar->codec_id != st->codecpar->codec_id)
>> +set_stream_info_from_input_stream(st, pls, ist);
> 
> This has to set:
> ist->internal->need_context_update = 1;
  ^
Should have been 'st' not 'ist'.

Best regards,
Andreas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [libav-devel] [PATCH] lzf: update pointer p after realloc

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 01:36, Luca Barbato wrote:
> On 04/11/2016 23:33, Andreas Cadhalpun wrote:
>> This fixes heap-use-after-free detected by AddressSanitizer.
>>
>> Signed-off-by: Andreas Cadhalpun 
>> ---
>>  libavcodec/lzf.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/lzf.c b/libavcodec/lzf.c
>> index 409a7ff..5b7526e 100644
>> --- a/libavcodec/lzf.c
>> +++ b/libavcodec/lzf.c
>> @@ -53,6 +53,7 @@ int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, 
>> int64_t *size)
>>  ret = av_reallocp(buf, *size);
>>  if (ret < 0)
>>  return ret;
>> +p = *buf + len;
>>  }
>>  
>>  bytestream2_get_buffer(gb, p, s);
>> @@ -75,6 +76,7 @@ int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, 
>> int64_t *size)
>>  ret = av_reallocp(buf, *size);
>>  if (ret < 0)
>>  return ret;
>> +p = *buf + len;
>>  }
>>  
>>  av_memcpy_backptr(p, off, l);
>>
> 
> Looks good, thank you!

Pushed.

Best regards,
Andreas

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mxfdec: fix NULL pointer dereference

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 02:09, Michael Niedermayer wrote:
> On Sat, Nov 05, 2016 at 12:20:21AM +0100, Andreas Cadhalpun wrote:
>> Metadata streams have priv_data set to NULL.
>>
>> Signed-off-by: Andreas Cadhalpun 
>> ---
>>  libavformat/mxfdec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> probably ok, iam not a mxf expert though

Pushed.

Best regards,
Andreas

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/mpegtsenc: write metadata descriptor for timed ID3 packets

2016-11-05 Thread Michael Niedermayer
On Sun, Aug 21, 2016 at 06:23:21PM +0200, Michael Niedermayer wrote:
> On Sun, Aug 21, 2016 at 10:44:27AM +0200, Stefano Sabatini wrote:
> > On date Saturday 2016-08-20 18:57:52 +0200, Michael Niedermayer encoded:
> > > On Sat, Aug 20, 2016 at 03:48:35PM +0200, Stefano Sabatini wrote:
> > > > On date Thursday 2016-05-19 18:45:35 +0200, Stefano Sabatini encoded:
> > > > > This is required since some softwares are not able to correctly 
> > > > > recognize
> > > > > the metadata.
> > > > > ---
> > > > >  libavformat/mpegtsenc.c | 24 ++--
> > > > >  1 file changed, 14 insertions(+), 10 deletions(-)
> > > > 
> > > > Updated, with some more documentation and references to the MPEGTS
> > > > standard.
> > > > 
> > > > Note: this patch was created comparing the output of FFmpeg with those
> > > > from encoding.com and elemental. With the change the output metadata
> > > > can be read by third-party players.
> > > > 
> > > > If the maintainers prefer, I can enable this output mode through a
> > > > flag.
> > > > -- 
> > > > FFmpeg = Fiendish & Fiendish Mastering Purposeless Egregious Goblin
> > > 
> > > >  mpegtsenc.c |   24 ++--
> > > >  1 file changed, 14 insertions(+), 10 deletions(-)
> > > > 3a6655bca70653c64bfb5f2073d01feee73e64c2  
> > > > 0003-lavf-mpegtsenc-write-metadata-descriptor-for-timed-I.patch
> > > > From 20f22c426a9f5c59d28f66a17b59d62301503d67 Mon Sep 17 00:00:00 2001
> > > > From: Stefano Sabatini 
> > > > Date: Tue, 12 Apr 2016 18:16:21 +0200
> > > > Subject: [PATCH] lavf/mpegtsenc: write metadata descriptor for timed ID3
> > > >  packets
> > > > 
> > > > This is required since some programs are not able to correctly recognize
> > > > the metadata. See H.222, 2.6.58 Metadata pointer descriptor.
> > > > 
> > > > putstr8() is modified in order to allow to skip writing the string
> > > > length.
> > > > ---
> > > >  libavformat/mpegtsenc.c | 24 ++--
> > > >  1 file changed, 14 insertions(+), 10 deletions(-)
> > > > 
> > > > diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> > > > index b437100..6f40615 100644
> > > > --- a/libavformat/mpegtsenc.c
> > > > +++ b/libavformat/mpegtsenc.c
> > > > @@ -256,7 +256,7 @@ static void mpegts_write_pat(AVFormatContext *s)
> > > >  }
> > > >  
> > > >  /* NOTE: !str is accepted for an empty string */
> > > > -static void putstr8(uint8_t **q_ptr, const char *str)
> > > > +static void putstr8(uint8_t **q_ptr, const char *str, int write_len)
> > > 
> > > breaks build, putstr8() seems after the place where a use is added
> > > in git master, or i did somehing silly
> > 
> > Another patch is needed (already approved, but doesn't make sense
> > without this other patch), in attachment.
> 
> patches probably ok

ping

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/6] lavc/qsv(hevc): Change default plugin from hevc_sw to hevc_default, which will load hevc_hw first, due to newly released MSDK.

2016-11-05 Thread Michael Niedermayer
On Sun, Oct 09, 2016 at 12:51:42PM +0200, Michael Niedermayer wrote:
> Hi
> 
> Patches 1,5,6 of this patchset have no comments, are they rejected
> need changes or something else ?

patches dont apply anymore
ill mark them as not applicable and consider them droped
this lack of interrest in qsv is disappointing

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/6] lavc/qsv(hevc): Change default plugin from hevc_sw to hevc_default, which will load hevc_hw first, due to newly released MSDK.

2016-11-05 Thread James Almer
On 11/5/2016 3:21 PM, Michael Niedermayer wrote:
> On Sun, Oct 09, 2016 at 12:51:42PM +0200, Michael Niedermayer wrote:
>> Hi
>>
>> Patches 1,5,6 of this patchset have no comments, are they rejected
>> need changes or something else ?
> 
> patches dont apply anymore
> ill mark them as not applicable and consider them droped
> this lack of interrest in qsv is disappointing

The supposed maintainers haven't replied to a single email in months,
which prompted another dev, Mark Thompson, to step in and clean the
qsv state so we could resume merges.
The limited amount of people capable of testing patches doesn't help
either.

Right now qsv is in a good state, synced with libav and afaik with a
couple extra features, thanks to the work of the aforementioned dev.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3] ffmpeg: parameters for filter thread counts

2016-11-05 Thread Michael Niedermayer
On Sun, Oct 30, 2016 at 09:25:39AM -0400, DeHackEd wrote:
> Enables specifying how many threads are available to each filtergraph.
> ---
> v2->v3:
> - Typos in docs fixed
> 
> v1->v2:
> - Reworded documentation
> - Removed hunk from ffmpeg_filter.c not directly applicable to patch
> 
>  doc/ffmpeg.texi | 10 ++
>  ffmpeg.h|  3 +++
>  ffmpeg_filter.c |  7 +++
>  ffmpeg_opt.c|  4 
>  4 files changed, 24 insertions(+)

Is "DeHackEd" the intended Author name for the commit ?

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avutil/softfloat_ieee754: make all functions inline

2016-11-05 Thread James Almer
On 11/5/2016 5:50 PM, Michael Niedermayer wrote:
> On Fri, Sep 16, 2016 at 11:44:48AM +0200, Michael Niedermayer wrote:
>> On Thu, Sep 15, 2016 at 11:08:47PM -0300, James Almer wrote:
>>> Removes "defined but not used" warnings
>>>
>>> Signed-off-by: James Almer 
>>> ---
>>>  libavutil/softfloat_ieee754.h | 14 +++---
>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> iam not the author/maintainer, but patch looks ok to me
> 
> ping

Sorry, completely forgot about this.

Pushed, thanks.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/matroskadec: fix DiscardPadding element parsing

2016-11-05 Thread James Almer
If the value is negative then it means padding at the start of the packet
instead of at the end.

Based on a patch by Hendrik Leppkes.

Signed-off-by: James Almer 
---
 libavformat/matroskadec.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 32f5e49..5a22193 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3082,10 +3082,16 @@ static int matroska_parse_frame(MatroskaDemuxContext 
*matroska,
 av_free(pkt);
 return AVERROR(ENOMEM);
 }
-AV_WL32(side_data, 0);
-AV_WL32(side_data + 4, av_rescale_q(discard_padding,
+discard_padding = av_rescale_q(discard_padding,
 (AVRational){1, 10},
-(AVRational){1, 
st->codecpar->sample_rate}));
+(AVRational){1, 
st->codecpar->sample_rate});
+if (discard_padding > 0) {
+AV_WL32(side_data, 0);
+AV_WL32(side_data + 4, discard_padding);
+} else {
+AV_WL32(side_data, -discard_padding);
+AV_WL32(side_data + 4, 0);
+}
 }
 
 if (track->ms_compat)
-- 
2.10.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avutil/softfloat_ieee754: make all functions inline

2016-11-05 Thread Michael Niedermayer
On Fri, Sep 16, 2016 at 11:44:48AM +0200, Michael Niedermayer wrote:
> On Thu, Sep 15, 2016 at 11:08:47PM -0300, James Almer wrote:
> > Removes "defined but not used" warnings
> > 
> > Signed-off-by: James Almer 
> > ---
> >  libavutil/softfloat_ieee754.h | 14 +++---
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> iam not the author/maintainer, but patch looks ok to me

ping

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 01/25] avformat/movenc: mov_write_ftyp_tag: write the major brand as a compatible brand

2016-11-05 Thread Michael Niedermayer
On Mon, Sep 19, 2016 at 04:25:24PM +0300, Erkki Seppälä wrote:
> when the option "brand" is used. This allows custom brands to end up in
> the compatible brands as well.
> 
> Signed-off-by: Erkki Seppälä 
> Signed-off-by: OZOPlayer 
> ---
>  libavformat/movenc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 525d103..571c2a7 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -4210,6 +4210,8 @@ static int mov_write_ftyp_tag(AVIOContext *pb, 
> AVFormatContext *s)
>  
>  avio_wb32(pb, minor);
>  
> +if (mov->mode == MODE_MP4 && mov->major_brand)
> +ffio_wfourcc(pb, mov->major_brand); /* write major brand as a 
> compatible brand */

missing length check, this would be writing uninitialized bytes
if it was nt 4 bytes long

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 03/25] avformat/movenc: support for multiple and client-provided track references

2016-11-05 Thread Michael Niedermayer
On Mon, Sep 19, 2016 at 04:25:26PM +0300, Erkki Seppälä wrote:
> Instead of one track reference, allow many, and instead of
> of track reference type (ie. 'cdsc'), allow many.
> 
> In addition this patch allows client to explicitly add track references
> with side packet AV_PKT_DATA_TRACK_REFERENCES containing
> AVTrackReferences (which of there can many many).
> 
> Internally MOVTrack's track references can be manipulated with helper
> functions ff_mov_tref* (and is used by a later patch for reading
> MOVTRefs).
> 
> Multiple track references can be useful in particular with timed meta
> data tracks, indicating the track is related to multiple other tracks.
> 
> This information ends up in ISO media file box 'tref' as specified by
> ISO/IEC 14496-12.
> 
> Signed-off-by: Erkki Seppälä 
> Signed-off-by: OZOPlayer 
> ---
>  libavcodec/avcodec.h  |  19 ++-
>  libavformat/Makefile  |   4 +-
>  libavformat/movenc.c  | 153 
> ++
>  libavformat/movenc.h  |   5 +-
>  libavformat/movtref.c | 115 +
>  libavformat/movtref.h |  75 +
>  6 files changed, 344 insertions(+), 27 deletions(-)
>  create mode 100644 libavformat/movtref.c
>  create mode 100644 libavformat/movtref.h

fails to build

CC  libavformat/movenc.o
libavformat/movenc.c: In function ‘mov_write_moov_tag’:
libavformat/movenc.c:3612:34: error: ‘ff_codec_metadata_tags’ undeclared (first 
use in this function)
libavformat/movenc.c:3612:34: note: each undeclared identifier is reported only 
once for each function it appears in
libavformat/movenc.c: In function ‘mov_init’:
libavformat/movenc.c:5578:33: warning: variable ‘tmcd_track’ set but not used 
[-Wunused-but-set-variable]
libavformat/movenc.c:5578:17: warning: variable ‘hint_track’ set but not used 
[-Wunused-but-set-variable]

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 04/25] avformat/mov, isom: read (multiple) track references (tag and multiple ids)

2016-11-05 Thread Michael Niedermayer
On Mon, Sep 19, 2016 at 04:25:27PM +0300, Erkki Seppälä wrote:
> This can be useful in particular with timed meta data tracks related
> to multiple tracks.
> 
> Signed-off-by: Erkki Seppälä 
> Signed-off-by: OZOPlayer 
> ---
>  libavformat/isom.h |   3 ++
>  libavformat/mov.c  | 119 
> -
>  2 files changed, 121 insertions(+), 1 deletion(-)

fails build

CC  libavformat/aiffdec.o
In file included from libavformat/aiffdec.c:29:0:
libavformat/isom.h:30:21: fatal error: movmeta.h: No such file or directory
compilation terminated.
make: *** [libavformat/aiffdec.o] Error 1

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 10/25] avformat/movenc: deal with AVMEDIA_TYPE_DATA by using AV_CODEC_ID_META

2016-11-05 Thread Michael Niedermayer
On Mon, Sep 19, 2016 at 04:25:33PM +0300, Erkki Seppälä wrote:
> This includes creating an AVCodecTag table ff_codec_metadata_tags as
> there are for video, audio and subtitles. The tag table is used for
> mov-compatiblity.
> 
> Signed-off-by: Erkki Seppälä 
> Signed-off-by: OZOPlayer 
> ---
>  libavformat/isom.c   | 5 +
>  libavformat/isom.h   | 1 +
>  libavformat/movenc.c | 6 ++
>  3 files changed, 12 insertions(+)

breaks fate

peg-bsf-remove-e
TESTcopy-trac236
TESTcopy-trac4914
--- ./tests/ref/fate/copy-trac236   2016-11-05 00:52:25.765219207 +0100
+++ tests/data/fate/copy-trac2362016-11-05 23:13:34.874235573 +0100
@@ -1,4 +1,4 @@
-d6e3d97b522ce881ed29c5da74cc7e63 *tests/data/fate/copy-trac236.mov
+5889bd4e5d9881379dfee52a282f29be *tests/data/fate/copy-trac236.mov
 630810 tests/data/fate/copy-trac236.mov
 #tb 0: 100/2997
 #media_type 0: video
Test copy-trac236 failed. Look at tests/data/fate/copy-trac236.err for details.
make: *** [fate-copy-trac236] Error 1
TESTcopy-trac4914-

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 11/25] avformat/movenc: add the urim sample descriptor

2016-11-05 Thread Michael Niedermayer
On Mon, Sep 19, 2016 at 04:25:34PM +0300, Erkki Seppälä wrote:
> This also adds libavformat/movmeta that contains the meta data
> information. Actually the sample configuration data is performed with
> side packet data AV_PKT_DATA_TIMED_METADATA_INFO where the value is
> stored inside AVTimedMetadataInfo.
> 
> Signed-off-by: Erkki Seppälä 
> Signed-off-by: OZOPlayer 
> ---
>  libavcodec/avcodec.h  | 16 ++
>  libavformat/isom.c|  1 +
>  libavformat/movenc.c  | 83 
> ---
>  libavformat/movenc.h  |  1 +
>  libavformat/movmeta.h | 46 
>  5 files changed, 143 insertions(+), 4 deletions(-)
>  create mode 100644 libavformat/movmeta.h
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 4219a9f..0079d22 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1350,6 +1350,16 @@ typedef struct AVCPBProperties {
>   * @{
>   */
>  
> +typedef struct AVTimedMetadataInfo {
> +charmeta_tag[4];/**< 4cc describing this metadata box type */
> +int meta_length;/**< length of data for the metadata type 
> information */
> +
> +charconf_tag[4];/**< configurationg box type 4cc, ie. 'conf' 
> */
> +int conf_length;/**< length of the data for the 
> configuration box */
> +
> +/** followed by meta_length bytes of meta data followed by conf_length 
> bytes of conf data */
> +} AVTimedMetadataInfo;
> +
>  typedef struct AVTrackReferences {
>  int next_tref_ofs;  /**< offset in bytes to the next 
> AVTrackReferences or 0 if this is the last one*/
>  chartag[4]; /**< 4cc used for describing this  */

> @@ -1546,6 +1556,12 @@ enum AVPacketSideDataType {
>  AV_PKT_DATA_TRACK_REFERENCES,
>  
>  /**
> + * Configured the timed metadata parameters, such as the uri and
> + * meta data configuration. The value is of type AVTimedMetadataInfo.
> + */
> +AV_PKT_DATA_TIMED_METADATA_INFO,
> +
> +/**
>   * Assign alternate groups for tracks. An example of alternate
>   * groups would be audio tracks (or video tracks) that are
>   * alternative to each other. Each alternative track shares the

you cannot add things into the middle of the enum, that breaks ABI
even if you just added the entry afterwards this is not correct
2 patches may or may nt be applied at the same time

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/framehash: also print channel layout as a string

2016-11-05 Thread Michael Niedermayer
On Wed, Sep 28, 2016 at 09:05:07PM -0300, James Almer wrote:
> This should be more useful for users since numerical values for channel
> layout can be confusing and unintuitive.
> 
> Signed-off-by: James Almer 

LGTM

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/mux: remove unnecessary autobsf hack

2016-11-05 Thread Michael Niedermayer
On Fri, Sep 23, 2016 at 02:04:08AM -0300, James Almer wrote:
> autobsf has been ported to the new bsf API.
> 
> Signed-off-by: James Almer 
> ---
>  libavformat/mux.c | 6 --
>  1 file changed, 6 deletions(-)

has this patch been forgotten ?

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/mux: remove unnecessary autobsf hack

2016-11-05 Thread James Almer
On 11/5/2016 9:46 PM, Michael Niedermayer wrote:
> On Fri, Sep 23, 2016 at 02:04:08AM -0300, James Almer wrote:
>> autobsf has been ported to the new bsf API.
>>
>> Signed-off-by: James Almer 
>> ---
>>  libavformat/mux.c | 6 --
>>  1 file changed, 6 deletions(-)
> 
> has this patch been forgotten ?

It didn't get a review, and then we began working on the ffmpeg bsf
port so i kinda forgot, yeah.
Will re-run fate with it now that we have a better autobsf coverage
and apply it if it passes.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3] ffmpeg: parameters for filter thread counts

2016-11-05 Thread DeHackEd
On 11/05/2016 02:51 PM, Michael Niedermayer wrote:
> On Sun, Oct 30, 2016 at 09:25:39AM -0400, DeHackEd wrote:
>> Enables specifying how many threads are available to each filtergraph.
>> ---
>> v2->v3:
>> - Typos in docs fixed
>>
>> v1->v2:
>> - Reworded documentation
>> - Removed hunk from ffmpeg_filter.c not directly applicable to patch
>>
>>  doc/ffmpeg.texi | 10 ++
>>  ffmpeg.h|  3 +++
>>  ffmpeg_filter.c |  7 +++
>>  ffmpeg_opt.c|  4 
>>  4 files changed, 24 insertions(+)
> 
> Is "DeHackEd" the intended Author name for the commit ?
> 

"DeHackEd" is the name I usually go by, but some patches read "DHE". That's my 
own fault, but either is fine.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/mux: remove unnecessary autobsf hack

2016-11-05 Thread James Almer
On 11/5/2016 9:49 PM, James Almer wrote:
> On 11/5/2016 9:46 PM, Michael Niedermayer wrote:
>> On Fri, Sep 23, 2016 at 02:04:08AM -0300, James Almer wrote:
>>> autobsf has been ported to the new bsf API.
>>>
>>> Signed-off-by: James Almer 
>>> ---
>>>  libavformat/mux.c | 6 --
>>>  1 file changed, 6 deletions(-)
>>
>> has this patch been forgotten ?
> 
> It didn't get a review, and then we began working on the ffmpeg bsf
> port so i kinda forgot, yeah.
> Will re-run fate with it now that we have a better autobsf coverage
> and apply it if it passes.

FATE passes, so applied.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/framehash: also print channel layout as a string

2016-11-05 Thread James Almer
On 11/5/2016 8:55 PM, Michael Niedermayer wrote:
> On Wed, Sep 28, 2016 at 09:05:07PM -0300, James Almer wrote:
>> This should be more useful for users since numerical values for channel
>> layout can be confusing and unintuitive.
>>
>> Signed-off-by: James Almer 
> 
> LGTM
> 
> thx

Pushed.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Fallback to finding non-keyframe in fix_index, if keyframe search fails.

2016-11-05 Thread Sasi Inguva
When I play the file using Quicktime Player 7 , it errs out saying "invalid
public movie atom found" . Quicktime 10.4 shows a black screen . Even vlc
doesn't play the video. It's true that it used to work before, but  don't
know if we need to support it.

On Sat, Nov 5, 2016 at 10:25 PM, Derek Buitenhuis <
derek.buitenh...@gmail.com> wrote:

> On 11/4/2016 9:53 PM, Sasi Inguva wrote:
> > So, if I am not wrong, the only case when that would happen is, if edit
> > list media time was < 0 . And that would be a corrupt MOV file, unless
> edit
> > list media time = -1.
> > I tried to create such a file with AtomInspector but it doesn't let me.
>
> FWIW, this also used 'work'. I made an example file in a hex editor:
>
> https://transfer.sh/OPAkZ/out.mp4.xz (URL is good for 14 days.)
>
> Near as I can tell, negative entries in .mov are actually allowed,
> since mov timestamps are signed (ISOBMFF's are unsigned).
>
> My opinion is that this failure should go under explode mode
> (AV_EF_EXPLODE),
> and by default adjust to the first timestamp, as long as it's
> possible/makes
> sense. This is, of course, just my opinion. I hope someone else from FFmpeg
> will reply and chime in with theirs.
>
> Cheers,
> - Derek
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel