Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges
On 15/09/14 01:50, Michael Niedermayer michae...@gmx.at wrote: On Sun, Sep 14, 2014 at 03:37:00PM +0300, Mika Raento wrote: This adds a new option -hls_flags single_file that creates one .ts file for HLS and adds byteranges to the .m3u8 file, instead of creating one .ts file for each segment. This is helpful at least for storing large number of videos, as the number of files per video is drastically reduced and copying and storing those files takes less requests and inodes. This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel in July 2014. That patch seems abandoned by the author, and contained unrelated changes. This patch tries to add the minimum amount of code to support the byterange playlists. --- doc/muxers.texi | 23 +++ libavformat/hlsenc.c | 65 ++-- 2 files changed, 72 insertions(+), 16 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 57e81f4..40ae857 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -194,15 +194,19 @@ can not be smaller than one centi second. Apple HTTP Live Streaming muxer that segments MPEG-TS according to the HTTP Live Streaming (HLS) specification. -It creates a playlist file and numbered segment files. The output -filename specifies the playlist filename; the segment filenames -receive the same basename as the playlist, a sequential number and -a .ts extension. +It creates a playlist file, and one or more segment files. The output filename +specifies the playlist filename. + +By default, the muxer creates a file for each segment produced. These files +have the same name as the playlist, followed by a sequential number and a +.ts extension. For example, to convert an input file with @command{ffmpeg}: @example ffmpeg -i in.nut out.m3u8 @end example +This example will produce the playlist, @file{out.m3u8}, and segment files: +@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc. See also the @ref{segment} muxer, which provides a more generic and flexible implementation of a segmenter, and can be used to perform HLS @@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique for each segment and it is not to be confused with the segment filename sequence number which can be cyclic, for example if the @option{wrap} option is specified. + +@item hls_flags single_file +If this flag is set, the muxer will store all segments in a single MPEG-TS +file, and will use byte ranges in the playlist. HLS playlists generated with +this way will have the version number 4. +For example: +@example +ffmpeg -i in.nut -hls_flags single_file out.m3u8 +@end example +Will produce the playlist, @file{out.m3u8}, and a single segment file, +@file{out.ts}. @end table @anchor{ico} diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 11f1e5b..9fcb999 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -34,10 +34,17 @@ typedef struct HLSSegment { char filename[1024]; double duration; /* in seconds */ +int64_t pos; +int64_t size; struct HLSSegment *next; } HLSSegment; +typedef enum HLSFlags { +// Generate a single media file and use byte ranges in the playlist. +HLS_SINGLE_FILE = (1 0), +} HLSFlags; + typedef struct HLSContext { const AVClass *class; // Class for private options. unsigned number; @@ -50,12 +57,15 @@ typedef struct HLSContext { float time;// Set by a private option. int max_nb_segments; // Set by a private option. int wrap; // Set by a private option. +uint32_t flags;// enum HLSFlags int64_t recording_time; int has_video; int64_t start_pts; int64_t end_pts; double duration; // last segment duration computed so far, in seconds +int64_t start_pos;// last segment starting position +int64_t size; // last segment size int nb_entries; HLSSegment *segments; @@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s) avcodec_copy_context(st-codec, s-streams[i]-codec); st-sample_aspect_ratio = s-streams[i]-sample_aspect_ratio; } +hls-start_pos = 0; return 0; } /* Create a new segment and append it to the segment list */ -static int hls_append_segment(HLSContext *hls, double duration) +static int hls_append_segment(HLSContext *hls, double duration, int64_t pos, + int64_t size) { HLSSegment *en = av_malloc(sizeof(*en)); @@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double duration) av_strlcpy(en-filename, av_basename(hls-avf-filename), sizeof(en-filename)); en-duration = duration; +en-pos = pos; +en-size = size; en-next = NULL; if (!hls-segments) @@ -142,6 +156,7 @@ static int hls_window(AVFormatContext
[FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges
This adds a new option -hls_flags single_file that creates one .ts file for HLS and adds byteranges to the .m3u8 file, instead of creating one .ts file for each segment. This is helpful at least for storing large number of videos, as the number of files per video is drastically reduced and copying and storing those files takes less requests and inodes. This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel in July 2014. That patch seems abandoned by the author, and contained unrelated changes. This patch tries to add the minimum amount of code to support the byterange playlists. --- doc/muxers.texi | 23 +++ libavformat/hlsenc.c | 63 ++-- 2 files changed, 70 insertions(+), 16 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 57e81f4..40ae857 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -194,15 +194,19 @@ can not be smaller than one centi second. Apple HTTP Live Streaming muxer that segments MPEG-TS according to the HTTP Live Streaming (HLS) specification. -It creates a playlist file and numbered segment files. The output -filename specifies the playlist filename; the segment filenames -receive the same basename as the playlist, a sequential number and -a .ts extension. +It creates a playlist file, and one or more segment files. The output filename +specifies the playlist filename. + +By default, the muxer creates a file for each segment produced. These files +have the same name as the playlist, followed by a sequential number and a +.ts extension. For example, to convert an input file with @command{ffmpeg}: @example ffmpeg -i in.nut out.m3u8 @end example +This example will produce the playlist, @file{out.m3u8}, and segment files: +@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc. See also the @ref{segment} muxer, which provides a more generic and flexible implementation of a segmenter, and can be used to perform HLS @@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique for each segment and it is not to be confused with the segment filename sequence number which can be cyclic, for example if the @option{wrap} option is specified. + +@item hls_flags single_file +If this flag is set, the muxer will store all segments in a single MPEG-TS +file, and will use byte ranges in the playlist. HLS playlists generated with +this way will have the version number 4. +For example: +@example +ffmpeg -i in.nut -hls_flags single_file out.m3u8 +@end example +Will produce the playlist, @file{out.m3u8}, and a single segment file, +@file{out.ts}. @end table @anchor{ico} diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 11f1e5b..c3fb341 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -34,10 +34,17 @@ typedef struct HLSSegment { char filename[1024]; double duration; /* in seconds */ +int64_t pos; +int64_t size; struct HLSSegment *next; } HLSSegment; +typedef enum HLSFlags { +// Generate a single media file and use byte ranges in the playlist. +HLS_SINGLE_FILE = (1 0), +} HLSFlags; + typedef struct HLSContext { const AVClass *class; // Class for private options. unsigned number; @@ -50,12 +57,15 @@ typedef struct HLSContext { float time;// Set by a private option. int max_nb_segments; // Set by a private option. int wrap; // Set by a private option. +uint32_t flags;// enum HLSFlags int64_t recording_time; int has_video; int64_t start_pts; int64_t end_pts; double duration; // last segment duration computed so far, in seconds +int64_t start_pos;// last segment starting position +int64_t size; // last segment size int nb_entries; HLSSegment *segments; @@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s) avcodec_copy_context(st-codec, s-streams[i]-codec); st-sample_aspect_ratio = s-streams[i]-sample_aspect_ratio; } +hls-start_pos = 0; return 0; } /* Create a new segment and append it to the segment list */ -static int hls_append_segment(HLSContext *hls, double duration) +static int hls_append_segment(HLSContext *hls, double duration, int64_t pos, + int64_t size) { HLSSegment *en = av_malloc(sizeof(*en)); @@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double duration) av_strlcpy(en-filename, av_basename(hls-avf-filename), sizeof(en-filename)); en-duration = duration; +en-pos = pos; +en-size = size; en-next = NULL; if (!hls-segments) @@ -142,6 +156,7 @@ static int hls_window(AVFormatContext *s, int last) int target_duration = 0; int ret = 0; int64_t sequence = FFMAX(hls-start_sequence, hls-sequence - hls-nb_entries); +int version = hls-flags HLS_SINGLE_FILE ? 4 : 3; if ((ret = avio_open2(hls-pb, s-filename,
Re: [FFmpeg-devel] [PATCH] avcodec: remove dead dsputil compat code
On Mon, Sep 15, 2014 at 3:16 AM, James Almer jamr...@gmail.com wrote: On 14/09/14 9:38 PM, Michael Niedermayer wrote: On Sun, Sep 14, 2014 at 08:47:11PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com --- should be ok Pushed. Thanks. This should have been done before 2.4 was cut since the two files are pretty much bloat in the tar file now. We can still cherry pick this for 2.4.1, though. removing a header is not ok in a point release, even if its a empty header, it could break build of an application It's not an installed header, but i guess applications that compile ffmpeg straight from the tree could be potentially affected. Applications that use private headers are doing so at their own risk, we change those around without thinking about compat all the time. This shouldn't block anything. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/18] avcodec: remove obsolete FF_API_FAST_MALLOC cruft
On Sun, Sep 14, 2014 at 10:46:03PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com about the patchset as a whole, not specifically this one we should check if theres any software left around that still uses the symbols before removing the code completely and if so consider to reintroduce them in a 2.4.1 while removing whats unused [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] RELEASE: update to 2.4.git
On Mon, Sep 15, 2014 at 01:50:11AM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com --- RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [WIP] lavfi: port mp/eq to a regular filter
On Mon, Sep 15, 2014 at 12:46:14AM +0200, James Darnley wrote: --- Still a couple of things on the todo list (see the top of the new file) but I thought I would send the basics along for people to nit pick. configure| 1 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_eq.c | 157 +++ 4 files changed, 160 insertions(+) create mode 100644 libavfilter/vf_eq.c Thanks, but note that eq is obsolete: we need a filter that merge the features performances from both eq and eq2. I should have mentioned that yesterday, I'm sorry... [...] -- Clément B. pgp4QXH6jvcYU.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges
On Mon, Sep 15, 2014 at 06:34:44AM +, Raento Mika wrote: On 15/09/14 01:50, Michael Niedermayer michae...@gmx.at wrote: On Sun, Sep 14, 2014 at 03:37:00PM +0300, Mika Raento wrote: [...] @@ -289,17 +314,27 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) if (can_split av_compare_ts(pkt-pts - hls-start_pts, st-time_base, end_pts, AV_TIME_BASE_Q) = 0) { -ret = hls_append_segment(hls, hls-duration); +av_write_frame(oc, NULL); /* Flush any buffered data */ + +hls-size = hls-avf-pb-pos - hls-start_pos; is it intended to access pos directly instead of using avio_tell() ? +int64_t start_pos = hls-avf-pb-pos; this mixes declarations and statements, some compilers dislike that did you miss the 2 comments above ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 5/18] avutil: remove obsolete FF_API_LLS1 cruft
On Sun, Sep 14, 2014 at 10:46:07PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com --- libavutil/version.h | 3 --- 1 file changed, 3 deletions(-) should be ok [...] -- 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 1/2] avformat/network: add union for avoiding strict aliassing violations with sockaddr*
On Fri, Sep 12, 2014 at 01:52:38AM +0200, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavformat/network.h |8 1 file changed, 8 insertions(+) applied [...] -- 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 2/2] avformat/rtpproto: fix strict aliasing violations with sockaddr
On Fri, Sep 12, 2014 at 01:52:39AM +0200, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavformat/rtpproto.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 15/18] avfilter: remove obsolete FF_API_BUFFERSRC_BUFFER cruft
On Sun, Sep 14, 2014 at 10:46:17PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com --- libavfilter/version.h | 3 --- 1 file changed, 3 deletions(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [WIP] lavfi: port mp/eq to a regular filter
On 2014-09-15 13:17, Clément Bœsch wrote: On Mon, Sep 15, 2014 at 12:46:14AM +0200, James Darnley wrote: --- Still a couple of things on the todo list (see the top of the new file) but I thought I would send the basics along for people to nit pick. configure| 1 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_eq.c | 157 +++ 4 files changed, 160 insertions(+) create mode 100644 libavfilter/vf_eq.c Thanks, but note that eq is obsolete: we need a filter that merge the features performances from both eq and eq2. I should have mentioned that yesterday, I'm sorry... I did notice that in the MPlayer docs. I wanted to start with the simpler one to get a feel of how to turn an mp filter into a regular one. I also noticed that eq2 has a simple mode that is the same as eq. I was planning on merging the two into one file, perhaps with a second filter class that is only allows setting the values from eq. As an after thought, this could also serve as some slight documentation for a newbie looking to write their own filter. signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Branchpoint tags
On Sun, 14 Sep 2014 23:36:14 +0200 Michael Niedermayer michae...@gmx.at wrote: On Sun, Sep 14, 2014 at 07:31:42PM +0200, wm4 wrote: On Sun, 14 Sep 2014 19:12:56 +0200 Michael Niedermayer michae...@gmx.at wrote: Hi Should we add git tags to the revissions where releases are branched off ? that way a git describe on master would look like: n2.5-dev-3-gb227be3 instead of: n2.0-11670-gb227be3 (or any other tag than n2.5-dev that we choose) it would not affect the ./version.sh output That sounds like an interesting idea. But just using the release tag name and appending -dev might be harmful for scripts which try to automatically pickup the latest version or such. what tag name would you suggest ? (note we cannot really change it once we create and push these tags) [...] Don't know. Maybe dev-n2.5 or after-n2.5 I'm not sure. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [WIP] lavfi: port mp/eq to a regular filter
On Mon, 15 Sep 2014 14:02:36 +0200 James Darnley james.darn...@gmail.com wrote: On 2014-09-15 13:17, Clément Bœsch wrote: On Mon, Sep 15, 2014 at 12:46:14AM +0200, James Darnley wrote: --- Still a couple of things on the todo list (see the top of the new file) but I thought I would send the basics along for people to nit pick. configure| 1 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_eq.c | 157 +++ 4 files changed, 160 insertions(+) create mode 100644 libavfilter/vf_eq.c Thanks, but note that eq is obsolete: we need a filter that merge the features performances from both eq and eq2. I should have mentioned that yesterday, I'm sorry... I did notice that in the MPlayer docs. I wanted to start with the simpler one to get a feel of how to turn an mp filter into a regular one. I also noticed that eq2 has a simple mode that is the same as eq. I was planning on merging the two into one file, perhaps with a second filter class that is only allows setting the values from eq. A single filter that does everything and that doesn't make you pay for more expensive features if you don't use them would probably be best. I don't understand why anyone in MPlayer thought it would be reasonable to copypaste a filter, add more features to it, and append a 2 to its name. Maybe politics? As an after thought, this could also serve as some slight documentation for a newbie looking to write their own filter. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 16/18] avfilter: remove obsolete FF_API_ACONVERT_FILTER cruft
On 9/15/14, James Almer jamr...@gmail.com wrote: Signed-off-by: James Almer jamr...@gmail.com --- configure | 2 - libavfilter/Makefile | 1 - libavfilter/af_aconvert.c | 196 -- libavfilter/allfilters.c | 3 - libavfilter/version.h | 3 - 5 files changed, 205 deletions(-) delete mode 100644 libavfilter/af_aconvert.c OK ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges
On 15/09/14 14:26, Michael Niedermayer michae...@gmx.at wrote: On Mon, Sep 15, 2014 at 06:34:44AM +, Raento Mika wrote: On 15/09/14 01:50, Michael Niedermayer michae...@gmx.at wrote: On Sun, Sep 14, 2014 at 03:37:00PM +0300, Mika Raento wrote: [...] @@ -289,17 +314,27 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) if (can_split av_compare_ts(pkt-pts - hls-start_pts, st-time_base, end_pts, AV_TIME_BASE_Q) = 0) { -ret = hls_append_segment(hls, hls-duration); +av_write_frame(oc, NULL); /* Flush any buffered data */ + +hls-size = hls-avf-pb-pos - hls-start_pos; is it intended to access pos directly instead of using avio_tell() ? +int64_t start_pos = hls-avf-pb-pos; this mixes declarations and statements, some compilers dislike that did you miss the 2 comments above ? I did, bugger. Will re-submit. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges
This adds a new option -hls_flags single_file that creates one .ts file for HLS and adds byteranges to the .m3u8 file, instead of creating one .ts file for each segment. This is helpful at least for storing large number of videos, as the number of files per video is drastically reduced and copying and storing those files takes less requests and inodes. This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel in July 2014. That patch seems abandoned by the author, and contained unrelated changes. This patch tries to add the minimum amount of code to support the byterange playlists. --- doc/muxers.texi | 23 +++ libavformat/hlsenc.c | 64 ++-- 2 files changed, 71 insertions(+), 16 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 57e81f4..40ae857 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -194,15 +194,19 @@ can not be smaller than one centi second. Apple HTTP Live Streaming muxer that segments MPEG-TS according to the HTTP Live Streaming (HLS) specification. -It creates a playlist file and numbered segment files. The output -filename specifies the playlist filename; the segment filenames -receive the same basename as the playlist, a sequential number and -a .ts extension. +It creates a playlist file, and one or more segment files. The output filename +specifies the playlist filename. + +By default, the muxer creates a file for each segment produced. These files +have the same name as the playlist, followed by a sequential number and a +.ts extension. For example, to convert an input file with @command{ffmpeg}: @example ffmpeg -i in.nut out.m3u8 @end example +This example will produce the playlist, @file{out.m3u8}, and segment files: +@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc. See also the @ref{segment} muxer, which provides a more generic and flexible implementation of a segmenter, and can be used to perform HLS @@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique for each segment and it is not to be confused with the segment filename sequence number which can be cyclic, for example if the @option{wrap} option is specified. + +@item hls_flags single_file +If this flag is set, the muxer will store all segments in a single MPEG-TS +file, and will use byte ranges in the playlist. HLS playlists generated with +this way will have the version number 4. +For example: +@example +ffmpeg -i in.nut -hls_flags single_file out.m3u8 +@end example +Will produce the playlist, @file{out.m3u8}, and a single segment file, +@file{out.ts}. @end table @anchor{ico} diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 11f1e5b..c03737a 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -34,10 +34,17 @@ typedef struct HLSSegment { char filename[1024]; double duration; /* in seconds */ +int64_t pos; +int64_t size; struct HLSSegment *next; } HLSSegment; +typedef enum HLSFlags { +// Generate a single media file and use byte ranges in the playlist. +HLS_SINGLE_FILE = (1 0), +} HLSFlags; + typedef struct HLSContext { const AVClass *class; // Class for private options. unsigned number; @@ -50,12 +57,15 @@ typedef struct HLSContext { float time;// Set by a private option. int max_nb_segments; // Set by a private option. int wrap; // Set by a private option. +uint32_t flags;// enum HLSFlags int64_t recording_time; int has_video; int64_t start_pts; int64_t end_pts; double duration; // last segment duration computed so far, in seconds +int64_t start_pos;// last segment starting position +int64_t size; // last segment size int nb_entries; HLSSegment *segments; @@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s) avcodec_copy_context(st-codec, s-streams[i]-codec); st-sample_aspect_ratio = s-streams[i]-sample_aspect_ratio; } +hls-start_pos = 0; return 0; } /* Create a new segment and append it to the segment list */ -static int hls_append_segment(HLSContext *hls, double duration) +static int hls_append_segment(HLSContext *hls, double duration, int64_t pos, + int64_t size) { HLSSegment *en = av_malloc(sizeof(*en)); @@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double duration) av_strlcpy(en-filename, av_basename(hls-avf-filename), sizeof(en-filename)); en-duration = duration; +en-pos = pos; +en-size = size; en-next = NULL; if (!hls-segments) @@ -142,6 +156,7 @@ static int hls_window(AVFormatContext *s, int last) int target_duration = 0; int ret = 0; int64_t sequence = FFMAX(hls-start_sequence, hls-sequence - hls-nb_entries); +int version = hls-flags HLS_SINGLE_FILE ? 4 : 3; if ((ret = avio_open2(hls-pb, s-filename,
Re: [FFmpeg-devel] Branchpoint tags
On Mon, Sep 15, 2014 at 02:13:27PM +0200, wm4 wrote: On Sun, 14 Sep 2014 23:36:14 +0200 Michael Niedermayer michae...@gmx.at wrote: On Sun, Sep 14, 2014 at 07:31:42PM +0200, wm4 wrote: On Sun, 14 Sep 2014 19:12:56 +0200 Michael Niedermayer michae...@gmx.at wrote: Hi Should we add git tags to the revissions where releases are branched off ? that way a git describe on master would look like: n2.5-dev-3-gb227be3 instead of: n2.0-11670-gb227be3 (or any other tag than n2.5-dev that we choose) it would not affect the ./version.sh output That sounds like an interesting idea. But just using the release tag name and appending -dev might be harmful for scripts which try to automatically pickup the latest version or such. what tag name would you suggest ? (note we cannot really change it once we create and push these tags) [...] Don't know. Maybe dev-n2.5 or after-n2.5 I'm not sure. I prefer -dev as suffix, in case someone wants to make a small bikeshed vote. -- Clément B. pgphB8_HPBM9I.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2 1/4] ffprobe: add -show_pixel_formats option
Have updated my work according to the suggestions of Stefano and split into four patches for easier review. Any feedback/comments are welcome. Tobias From 5d4376d0562853f6cbad0acf03872896cd8485c6 Mon Sep 17 00:00:00 2001 From: Tobias Rapp t.r...@noa-audio.com Date: Thu, 11 Sep 2014 09:16:52 +0200 Subject: [PATCH 1/4] ffprobe: add -show_pixel_formats option Adds option -show_pixel_formats to ffprobe which lists all available pixel formats with some details. --- doc/ffprobe.texi | 6 ++ doc/ffprobe.xsd | 13 + ffprobe.c| 33 +++-- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi index 0a39ed4..5c90470 100644 --- a/doc/ffprobe.texi +++ b/doc/ffprobe.texi @@ -321,6 +321,12 @@ Show information related to program and library versions. This is the equivalent of setting both @option{-show_program_version} and @option{-show_library_versions} options. +@item -show_pixel_formats +Show information about all pixel formats supported by FFmpeg. + +Pixel format information for each format is printed within a section +with name PIXEL_FORMAT. + @item -bitexact Force bitexact output, useful to produce output which is not dependent on the specific build. diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 5dfbb47..598f651 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -10,6 +10,7 @@ xsd:sequence xsd:element name=program_version type=ffprobe:programVersionType minOccurs=0 maxOccurs=1 / xsd:element name=library_versions type=ffprobe:libraryVersionsType minOccurs=0 maxOccurs=1 / +xsd:element name=pixel_formats type=ffprobe:pixelFormatsTypeminOccurs=0 maxOccurs=1 / xsd:element name=packets type=ffprobe:packetsType minOccurs=0 maxOccurs=1 / xsd:element name=frames type=ffprobe:framesType minOccurs=0 maxOccurs=1 / xsd:element name=programs type=ffprobe:programsType minOccurs=0 maxOccurs=1 / @@ -277,4 +278,16 @@ xsd:element name=library_version type=ffprobe:libraryVersionType minOccurs=0 maxOccurs=unbounded/ /xsd:sequence /xsd:complexType + +xsd:complexType name=pixelFormatType + xsd:attribute name=nametype=xsd:string use=required/ + xsd:attribute name=nb_components type=xsd:int use=required/ + xsd:attribute name=bits_per_pixel type=xsd:int/ +/xsd:complexType + +xsd:complexType name=pixelFormatsType + xsd:sequence +xsd:element name=pixel_format type=ffprobe:pixelFormatType minOccurs=0 maxOccurs=unbounded/ + /xsd:sequence +/xsd:complexType /xsd:schema diff --git a/ffprobe.c b/ffprobe.c index 9bb0f0f..41667f1 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -66,6 +66,7 @@ static int do_show_stream_disposition = 0; static int do_show_data= 0; static int do_show_program_version = 0; static int do_show_library_versions = 0; +static int do_show_pixel_formats = 0; static int do_show_chapter_tags = 0; static int do_show_format_tags = 0; @@ -132,6 +133,8 @@ typedef enum { SECTION_ID_PACKET, SECTION_ID_PACKETS, SECTION_ID_PACKETS_AND_FRAMES, +SECTION_ID_PIXEL_FORMAT, +SECTION_ID_PIXEL_FORMATS, SECTION_ID_PROGRAM_STREAM_DISPOSITION, SECTION_ID_PROGRAM_STREAM_TAGS, SECTION_ID_PROGRAM, @@ -165,6 +168,8 @@ static struct section sections[] = { [SECTION_ID_PACKETS] ={ SECTION_ID_PACKETS, packets, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} }, [SECTION_ID_PACKETS_AND_FRAMES] = { SECTION_ID_PACKETS_AND_FRAMES, packets_and_frames, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} }, [SECTION_ID_PACKET] = { SECTION_ID_PACKET, packet, 0, { -1 } }, +[SECTION_ID_PIXEL_FORMATS] = { SECTION_ID_PIXEL_FORMATS, pixel_formats, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PIXEL_FORMAT, -1 } }, +[SECTION_ID_PIXEL_FORMAT] = { SECTION_ID_PIXEL_FORMAT, pixel_format, 0, { -1 } }, [SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, disposition, 0, { -1 }, .unique_name = program_stream_disposition }, [SECTION_ID_PROGRAM_STREAM_TAGS] ={ SECTION_ID_PROGRAM_STREAM_TAGS, tags, SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = tag, .unique_name = program_stream_tags }, [SECTION_ID_PROGRAM] ={ SECTION_ID_PROGRAM, program, 0, { SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_STREAMS, -1 } }, @@ -175,7 +180,8 @@ static struct section sections[] = { [SECTION_ID_PROGRAMS] = { SECTION_ID_PROGRAMS, programs, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PROGRAM, -1 } }, [SECTION_ID_ROOT] = { SECTION_ID_ROOT, root, SECTION_FLAG_IS_WRAPPER, { SECTION_ID_CHAPTERS, SECTION_ID_FORMAT, SECTION_ID_FRAMES, SECTION_ID_PROGRAMS, SECTION_ID_STREAMS, -
Re: [FFmpeg-devel] [PATCH v2 2/4] ffprobe: add pixel format flags output
Adds output of pixel format flags to ffprobe -show_pixel_formats option. --- doc/ffprobe.xsd | 15 +++ ffprobe.c | 23 ++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 598f651..e460e01 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -279,7 +279,22 @@ /xsd:sequence /xsd:complexType +xsd:complexType name=pixelFormatFlagsType + xsd:attribute name=big_endian type=xsd:int use=required/ + xsd:attribute name=palettetype=xsd:int use=required/ + xsd:attribute name=bitstream type=xsd:int use=required/ + xsd:attribute name=hwacceltype=xsd:int use=required/ + xsd:attribute name=planar type=xsd:int use=required/ + xsd:attribute name=rgbtype=xsd:int use=required/ + xsd:attribute name=pseudopal type=xsd:int use=required/ + xsd:attribute name=alpha type=xsd:int use=required/ +/xsd:complexType + xsd:complexType name=pixelFormatType + xsd:sequence +xsd:element name=flags type=ffprobe:pixelFormatFlagsType minOccurs=0 maxOccurs=1/ + /xsd:sequence + xsd:attribute name=nametype=xsd:string use=required/ xsd:attribute name=nb_components type=xsd:int use=required/ xsd:attribute name=bits_per_pixel type=xsd:int/ diff --git a/ffprobe.c b/ffprobe.c index 41667f1..c0f9b84 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -67,6 +67,7 @@ static int do_show_data= 0; static int do_show_program_version = 0; static int do_show_library_versions = 0; static int do_show_pixel_formats = 0; +static int do_show_pixel_format_flags = 0; static int do_show_chapter_tags = 0; static int do_show_format_tags = 0; @@ -134,6 +135,7 @@ typedef enum { SECTION_ID_PACKETS, SECTION_ID_PACKETS_AND_FRAMES, SECTION_ID_PIXEL_FORMAT, +SECTION_ID_PIXEL_FORMAT_FLAGS, SECTION_ID_PIXEL_FORMATS, SECTION_ID_PROGRAM_STREAM_DISPOSITION, SECTION_ID_PROGRAM_STREAM_TAGS, @@ -169,7 +171,8 @@ static struct section sections[] = { [SECTION_ID_PACKETS_AND_FRAMES] = { SECTION_ID_PACKETS_AND_FRAMES, packets_and_frames, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} }, [SECTION_ID_PACKET] = { SECTION_ID_PACKET, packet, 0, { -1 } }, [SECTION_ID_PIXEL_FORMATS] = { SECTION_ID_PIXEL_FORMATS, pixel_formats, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PIXEL_FORMAT, -1 } }, -[SECTION_ID_PIXEL_FORMAT] = { SECTION_ID_PIXEL_FORMAT, pixel_format, 0, { -1 } }, +[SECTION_ID_PIXEL_FORMAT] = { SECTION_ID_PIXEL_FORMAT, pixel_format, 0, { SECTION_ID_PIXEL_FORMAT_FLAGS, -1 } }, +[SECTION_ID_PIXEL_FORMAT_FLAGS] = { SECTION_ID_PIXEL_FORMAT_FLAGS, flags, 0, { -1 }, .unique_name = pixel_format_flags }, [SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, disposition, 0, { -1 }, .unique_name = program_stream_disposition }, [SECTION_ID_PROGRAM_STREAM_TAGS] ={ SECTION_ID_PROGRAM_STREAM_TAGS, tags, SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = tag, .unique_name = program_stream_tags }, [SECTION_ID_PROGRAM] ={ SECTION_ID_PROGRAM, program, 0, { SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_STREAMS, -1 } }, @@ -2563,6 +2566,11 @@ static void ffprobe_show_library_versions(WriterContext *w) writer_print_section_footer(w); } +#define PRINT_PIX_FMT_FLAG(flagname, name)\ +do { \ +print_int(name, !!(pixdesc-flags AV_PIX_FMT_FLAG_##flagname)); \ +} while (0) + static void ffprobe_show_pixel_formats(WriterContext *w) { const AVPixFmtDescriptor *pixdesc = NULL; @@ -2576,6 +2584,18 @@ static void ffprobe_show_pixel_formats(WriterContext *w) n = av_get_bits_per_pixel(pixdesc); if (n) print_int(bits_per_pixel, n); else print_str_opt(bits_per_pixel, N/A); +if (do_show_pixel_format_flags) { +writer_print_section_header(w, SECTION_ID_PIXEL_FORMAT_FLAGS); +PRINT_PIX_FMT_FLAG(BE,big_endian); +PRINT_PIX_FMT_FLAG(PAL, palette); +PRINT_PIX_FMT_FLAG(BITSTREAM, bitstream); +PRINT_PIX_FMT_FLAG(HWACCEL, hwaccel); +PRINT_PIX_FMT_FLAG(PLANAR,planar); +PRINT_PIX_FMT_FLAG(RGB, rgb); +PRINT_PIX_FMT_FLAG(PSEUDOPAL, pseudopal); +PRINT_PIX_FMT_FLAG(ALPHA, alpha); +writer_print_section_footer(w); +} writer_print_section_footer(w); } writer_print_section_footer(w); @@ -3011,6 +3031,7 @@ int main(int argc, char **argv) SET_DO_SHOW(LIBRARY_VERSIONS, library_versions); SET_DO_SHOW(PACKETS, packets); SET_DO_SHOW(PIXEL_FORMATS, pixel_formats); +SET_DO_SHOW(PIXEL_FORMAT_FLAGS, pixel_format_flags); SET_DO_SHOW(PROGRAM_VERSION,
Re: [FFmpeg-devel] [PATCH v2 4/4] ffprobe: add pixel format chroma sub-sampling output
Adds output of chroma sub-sampling information to ffprobe -show_pixel_formats option. Note: This patch just prints the raw log2_charoma_w/h values instead of the previously suggested mapping into a chroma sub-sampling pattern string like 4:2:2. --- doc/ffprobe.xsd | 2 ++ ffprobe.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index bf17186..84b3810 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -309,6 +309,8 @@ xsd:attribute name=nametype=xsd:string use=required/ xsd:attribute name=nb_components type=xsd:int use=required/ + xsd:attribute name=log2_chroma_w type=xsd:int/ + xsd:attribute name=log2_chroma_h type=xsd:int/ xsd:attribute name=bits_per_pixel type=xsd:int/ /xsd:complexType diff --git a/ffprobe.c b/ffprobe.c index b6df74b..f35b780 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -2586,6 +2586,13 @@ static void ffprobe_show_pixel_formats(WriterContext *w) writer_print_section_header(w, SECTION_ID_PIXEL_FORMAT); print_str(name, pixdesc-name); print_int(nb_components, pixdesc-nb_components); +if ((pixdesc-nb_components = 3) !(pixdesc-flags AV_PIX_FMT_FLAG_RGB)) { +print_int(log2_chroma_w, pixdesc-log2_chroma_w); +print_int(log2_chroma_h, pixdesc-log2_chroma_h); +} else { +print_str_opt(log2_chroma_w, N/A); +print_str_opt(log2_chroma_h, N/A); +} n = av_get_bits_per_pixel(pixdesc); if (n) print_int(bits_per_pixel, n); else print_str_opt(bits_per_pixel, N/A); -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Status of dvdsub forced_subs_only patch
Oliver Fromme wrote: Michael Niedermayer wrote: On Sun, Jun 29, 2014 at 05:36:32PM +0200, Oliver Fromme wrote: [...] The problem with dropping rectangles in utils.c is that there might be multiple output streams. The flag (forced subtitles only) might be set for some output streams, but not for others. So, if we dropped some rectangles from the AVSubtitle structure in utils.c, they will be missing from other output streams that are encoded afterwards. You can put the, to be kept rectangles in a new AVSubtitle struct. Oh, it didn't occur to me to generate an new AVSubtitle struct in utils.c. Thanks for pointing that out. I'll give that a try and make a new patch. Best regards Oliver Has there been any update on this? I would like to be able to pick out only the forced subtitles from a dvdsub track. This looks like it was my best bet. I can't find any documentation of this or figure out a useful place to put -forced_subs_only 1 in the command line: ffmpeg -forced_subs_only 1 -i tmp.mkv -map 0 -c:s dvdsub out.mkv I get ... Codec AVOption forced_subs_only (Only show forced subtitles) specified for input file #0 (tmp.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream. tmp.mkv is just: Stream #0:0(eng): Subtitle: dvd_subtitle, 720x480 (default) Metadata: LANGUAGE: eng ENCODER : Lavc55.69.100 dvdsub -Nick ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add input support for DeckLink devices.
It's work already more than 24h Maybe it's not a big problem but in some scenario may do some problem Input #0, decklink, from 'DeckLink SDI (3)@3': Duration: N/A, start: 0.00, bitrate: 172032 kb/s Stream #0:0: Audio: pcm_s16le, 48000 Hz, 8 channels, s16, 6144 kb/s Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, 165888 kb/s, 25 tbr, 1000k tbn, 25 tbc Audio stream map to 0:0 2014-09-14 17:33 GMT+03:00 Amnon Israely amno...@gmail.com: I can help with testing under Linux. We use many deckling devices in production. 2014-09-14 17:15 GMT+03:00 Dave Rice d...@dericed.com: On Sep 14, 2014, at 7:07 AM, Deti Fliegl d...@fliegl.de wrote: I really would like to bring things forward, but currently nobody wants to review this patch. It's primarily something that is used under Linux and not Windows. So please would anyone have a look at my patch. I have a few decklink devices and would be happy to review this on Mac. Does it work on Mac? Dave Rice Deti On 30.08.14 01:22, Michael Niedermayer wrote: On Sat, Aug 23, 2014 at 10:50:37PM +0200, Deti Fliegl wrote: On 19.08.14 15:43, Carl Eugen Hoyos wrote: Deti Fliegl deti at fliegl.de writes: Minor update to propagate field dominance. At least a Changelog entry and a libavdevice version bump are still missing, but consider waiting for a real review. Well in the meantime I updated my patch once again to add proper frame sizes and frame rates to the video codec. Maybe somebody wants to review the patch. Deti configure |4 doc/indevs.texi | 54 libavdevice/Makefile|5 libavdevice/alldevices.c|2 libavdevice/decklink_common.cpp | 229 + libavdevice/decklink_common.h | 98 +++ libavdevice/decklink_common_c.h | 32 ++ libavdevice/decklink_dec.cpp| 531 libavdevice/decklink_dec.h | 32 ++ libavdevice/decklink_dec_c.c| 54 libavdevice/decklink_enc.cpp| 196 +- moving code from (like from decklink_enc.cpp to decklink_common.cpp) should be in a seperate patch libavdevice/decklink_enc.h | 11 libavdevice/decklink_enc_c.c|1 13 files changed, 1055 insertions(+), 194 deletions(-) If you want to maintain this code, please add yourself to the MAINTAINERs file [...] +#ifdef _WIN32 +char *dup_wchar_to_utf8(wchar_t *w) non static functions should have a ff_ prefix (or av if they are public but that isnt) also i dont really know windows decklink stuff, so iam not the ideal one to review ... [...] ___ 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 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
Re: [FFmpeg-devel] [PATCH 1/3] avfilter/ass: make sure the log level are in available range
On Thu, Sep 11, 2014 at 11:53:57PM +0200, Michael Niedermayer wrote: On Thu, Sep 11, 2014 at 09:13:29PM +0200, Clément Bœsch wrote: --- libavfilter/vf_subtitles.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 4fa1174..44273cb 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -80,7 +80,9 @@ static const int ass_libavfilter_log_level_map[] = { static void ass_log(int ass_level, const char *fmt, va_list args, void *ctx) { -int level = ass_libavfilter_log_level_map[ass_level]; +const int ass_level_clip = av_clip(ass_level, 0, +FF_ARRAY_ELEMS(ass_libavfilter_log_level_map) - 1); +const int level = ass_libavfilter_log_level_map[ass_level_clip]; LGTM btw, in [2] = AV_LOG_WARNING, /* MSGL_WARN */ [3] = AV_LOG_WARNING, /* undefined */ [4] = AV_LOG_INFO, /* MSGL_INFO */ [5] = AV_LOG_INFO, /* undefined */ [6] = AV_LOG_VERBOSE, /* MSGL_V */ AV_LOG levels have finer level values than the named identifers so it would be possible to use different levels instead of using info and warning twice Right, but we don't really need that extra complexity with finer grain; the undefined entries are basically just unmapped unused in libass so they won't be called. I'll apply the patchset soon unless someone object. Thanks [...] -- Clément B. pgpv0EGBXs0qO.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/18] avcodec: remove obsolete FF_API_FAST_MALLOC cruft
On Mon, Sep 15, 2014 at 04:08:49PM -0300, James Almer wrote: On 15/09/14 6:07 AM, Michael Niedermayer wrote: On Sun, Sep 14, 2014 at 10:46:03PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com about the patchset as a whole, not specifically this one we should check if theres any software left around that still uses the symbols before removing the code completely and if so consider to reintroduce them in a 2.4.1 while removing whats unused Pushed the three you reviewed since either no code depended on them, or in the OpenCL case it's an API that nobody has ever been able to use anyway. I'm not exactly interested in looking around to see if any of this deprecated stuff is still used. And IMO reintroducing them in a point release is quite ugly. An exception could be FF_API_DRAWTEXT_OLD_TIMELINE since as Clément pointed in another email might be needed to remain compatible with libav. probably you only have to wait, as i suspect andreas (in CC) will test building all dependant packages in debian against 2.4 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. 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/18] avcodec: remove obsolete FF_API_FAST_MALLOC cruft
On Mon, Sep 15, 2014 at 1:03 PM, Michael Niedermayer michae...@gmx.at wrote: On Mon, Sep 15, 2014 at 04:08:49PM -0300, James Almer wrote: I'm not exactly interested in looking around to see if any of this deprecated stuff is still used. And IMO reintroducing them in a point release is quite ugly. An exception could be FF_API_DRAWTEXT_OLD_TIMELINE since as Clément pointed in another email might be needed to remain compatible with libav. probably you only have to wait, as i suspect andreas (in CC) will test building all dependant packages in debian against 2.4 FF_API_DRAWTEXT_OLD_TIMELINE deprecates an option, which means that a rebuild won't show if the application works with FFmpeg or not. Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges
Hi On Mon, Sep 15, 2014 at 04:26:57PM +0300, Mika Raento wrote: This adds a new option -hls_flags single_file that creates one .ts file for HLS and adds byteranges to the .m3u8 file, instead of creating one .ts file for each segment. This is helpful at least for storing large number of videos, as the number of files per video is drastically reduced and copying and storing those files takes less requests and inodes. This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel in July 2014. That patch seems abandoned by the author, and contained unrelated changes. This patch tries to add the minimum amount of code to support the byterange playlists. --- doc/muxers.texi | 23 +++ libavformat/hlsenc.c | 64 ++-- 2 files changed, 71 insertions(+), 16 deletions(-) patch applied can you add a fate test so that this feature is also tested ? Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- 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 1/3] avfilter/ass: make sure the log level are in available range
On Mon, Sep 15, 2014 at 08:59:06PM +0200, Clément Bœsch wrote: On Thu, Sep 11, 2014 at 11:53:57PM +0200, Michael Niedermayer wrote: On Thu, Sep 11, 2014 at 09:13:29PM +0200, Clément Bœsch wrote: --- libavfilter/vf_subtitles.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 4fa1174..44273cb 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -80,7 +80,9 @@ static const int ass_libavfilter_log_level_map[] = { static void ass_log(int ass_level, const char *fmt, va_list args, void *ctx) { -int level = ass_libavfilter_log_level_map[ass_level]; +const int ass_level_clip = av_clip(ass_level, 0, +FF_ARRAY_ELEMS(ass_libavfilter_log_level_map) - 1); +const int level = ass_libavfilter_log_level_map[ass_level_clip]; LGTM btw, in [2] = AV_LOG_WARNING, /* MSGL_WARN */ [3] = AV_LOG_WARNING, /* undefined */ [4] = AV_LOG_INFO, /* MSGL_INFO */ [5] = AV_LOG_INFO, /* undefined */ [6] = AV_LOG_VERBOSE, /* MSGL_V */ AV_LOG levels have finer level values than the named identifers so it would be possible to use different levels instead of using info and warning twice Right, but we don't really need that extra complexity with finer grain; the undefined entries are basically just unmapped unused in libass so they won't be called. ahh, ok, i did not know they where unused [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong. 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/18] avcodec: remove obsolete FF_API_FAST_MALLOC cruft
On 15.09.2014 22:03, Michael Niedermayer wrote: On Mon, Sep 15, 2014 at 04:08:49PM -0300, James Almer wrote: On 15/09/14 6:07 AM, Michael Niedermayer wrote: On Sun, Sep 14, 2014 at 10:46:03PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com about the patchset as a whole, not specifically this one we should check if theres any software left around that still uses the symbols before removing the code completely and if so consider to reintroduce them in a 2.4.1 while removing whats unused Pushed the three you reviewed since either no code depended on them, or in the OpenCL case it's an API that nobody has ever been able to use anyway. I'm not exactly interested in looking around to see if any of this deprecated stuff is still used. And IMO reintroducing them in a point release is quite ugly. An exception could be FF_API_DRAWTEXT_OLD_TIMELINE since as Clément pointed in another email might be needed to remain compatible with libav. probably you only have to wait, as i suspect andreas (in CC) will test building all dependant packages in debian against 2.4 You're right that I'm currently rebuilding those against 2.4, but I don't expect any problems there, since I already have rebuilt them against a git snapshot about two weeks ago and didn't notice anything problematic. Best regards, Andreas PS: FFmpeg is probably going to be accepted into Debian experimental real soon now. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] Don't use CMOV in MMX code
On Fri, 2014-09-12 at 14:53 -0700, Daniel Kang wrote: All processors supporing mmx2 also support cmov, so if a test for mmx2 succeeds, we can use cmov. Since I originally thought mmx = cmov (and apparently am wrong) is there official documentation supporting this? As an example, here's the /proc/cpuinfo contents for my AMD K6 box. You'll note that on the flags line it does have 'mmx', but does not have 'cmov'. (It also doesn't have 3dnow; that was introduced in later chips in the K6 series.) I'm actually looking into getting FATE running on this box right now, we'll see how that goes. processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 7 model name : AMD-K6tm w/ multimedia extensions stepping: 0 cpu MHz : 266.603 cache size : 64 KB fdiv_bug: no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr cx8 mmx bogomips: 533.42 clflush size: 32 cache_alignment : 32 address sizes : 32 bits physical, 32 bits virtual power management: -- Calvin Walton calvin.wal...@kepstin.ca ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: simplify libwebp check
On Tue, Sep 02, 2014 at 06:59:42AM +0200, Clément Bœsch wrote: On Mon, Sep 01, 2014 at 11:33:34PM +, Carl Eugen Hoyos wrote: Clément Bœsch u at pkh.me writes: From: Clément Bœsch clement at stupeflix.com Check is simpler, faster, and explicits the required version. faster? Please remove this if I don't miss anything again... It doesn't make a huge difference but it doesn't need to write a temporary file and attempt to compile it anymore. I can drop the whole sentence if you want. Timeout, applied as is. -- Clément B. pgpI4l2CrcnHm.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v2] web/contact: clarify mailing list descriptions
Also organize mailing lists by development, help, then logs. Also link some phrases to relevant pages. Signed-off-by: Lou Logan l...@lrcd.com --- src/contact | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/contact b/src/contact index 640ae58..449127a 100644 --- a/src/contact +++ b/src/contact @@ -32,30 +32,30 @@ /div br div class=list-group +a class=list-group-item href=https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel/; + strongffmpeg-devel/strongbr + For discussions involving development of FFmpeg. Patches for FFmpeg should be submitted + here. It is strongnot/strong for development of software that use the FFmpeg libraries + and strongnot/strong for a href=bugreports.htmlbug reports/a unless you are + submitting a patch that fixes the problem. +/a a class=list-group-item href=https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-user/; strongffmpeg-user/strongbr - This list is for regular user questions and discussions including usage of - codeffmpeg/code, codeffplay/code, codeffprobe/code, and - codeffserver/code + For general user questions and discussions involving the FFmpeg cli tools: + codeffmpeg/code, codeffplay/code, codeffprobe/code, and codeffserver/code. /a a class=list-group-item href=https://lists.ffmpeg.org/mailman/listinfo/libav-user/; stronglibav-user/strongbr - This list is for application developer questions about development using the - FFmpeg libraries -/a -a class=list-group-item href=https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel/; - strongffmpeg-devel/strongbr - This list is for development of FFmpeg itself. It is strongnot/strong for - development of software that use the FFmpeg libraries and strongnot/strong - for bug reports + For questions about using the FFmpeg libraries and API. /a a class=list-group-item href=https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-cvslog/; strongffmpeg-cvslog/strongbr - This list gets all changes to the FFmpeg sources / main git repository. + A log of all changes and updates made to the FFmpeg source. /a a class=list-group-item href=https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-trac/; strongffmpeg-trac/strongbr - This list gets all changes to the FFmpeg Trac issue tracker. + Receives all bug reports, comments, and status changes made on the + a href=https://trac.ffmpeg.org/;FFmpeg Bug Tracker/a. /a /div !-- list-group -- /div !-- col -- -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [WIP] lavfi: port mp/eq to a regular filter
On 2014-09-15 00:46, James Darnley wrote: ... Update: I've got eq2 merged into the one file and working. I would send another WIP patch but I've made several commits, all of which should be merged together. One question I do have though is: should the user options for contrast in eq and eq2 be different? eq has the range -1..1 (-100..100 in the original) with no change being 0. eq2 has the range -2..2 with no change being 1 (a more obvious scaling factor) and a negative value inverting the image. I don't know if this difference is desired or not. There was some minor talk on IRC earlier about merging this with our current vf_hue, which itself is a port from libmpcodecs. Is this something that people want? signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] web/index: add FFmpeg 2.4
--- src/index | 12 1 file changed, 12 insertions(+) diff --git a/src/index b/src/index index f8224f1..d2f761a 100644 --- a/src/index +++ b/src/index @@ -36,6 +36,18 @@ News /h1 + a id=pr2.4/ah3September 15, 2014, FFmpeg 2.4/h3 + p +We have made a new major release (ba href=download.html#release_2.42.4/a/b) +It contains all features and bugfixes of the git master branch from the 14th July. +Please see the ba href=http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=n2.4;Release Notes/a/b for a +list of note-worthy changes. + /p + p +We recommend users, distributors and system integrators to upgrade unless they use +current git master. + /p + a id=pr2.3.3/ah3August 20, 2014, FFmpeg 2.3.3, 2.2.7, 1.2.8/h3 p We have made several new point releases (ba href=download.html#release_2.32.3.3/a, -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] web/index: add FFmpeg 2.4
On Tue, Sep 16, 2014 at 01:22:02AM +0200, Michael Niedermayer wrote: --- src/index | 12 1 file changed, 12 insertions(+) reviewed by llogan on IRC applied [...] -- 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
[FFmpeg-devel] [PATCH] doc/filters: add geq gradient examples
Radial gradient by Víctor Paesa. Linear gradient by Paul Gentemann. Also-by: Víctor Paesa victorpa...@googlemail.com Also-by: Paul Gentemann beriu...@gmail.com Signed-off-by: Lou Logan l...@lrcd.com --- doc/filters.texi | 13 + 1 file changed, 13 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index bb486ea..5a7ad58 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5124,6 +5124,19 @@ Modify RGB components depending on pixel position: @example geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)' @end example + +@item +Create a radial gradient that is the same size as the input: +@example +geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray +@end example + +@item +Create a linear gradient to use as a mask for another filter, then +compose with @ref{overlay}: +@example +geq=lum=255*(Y/H),format=gray[grad];[0:v]boxblur=4[blur];[blur][grad]alphamerge[alpha];[0:v][alpha]overlay +@end example @end itemize @section gradfun -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel