Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-13 Thread Michael Niedermayer
On Mon, Jul 14, 2014 at 12:18:09AM +0800, Star Brilliant wrote: > The updated patch along with sample LRC file. > > Moved to SCNu64 during reading timestamp as Derek suggests. > > I have no idea on how to use FATE. Please help me, if possible, to add > this lrc file to the FATE dataset. Thanks.

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-13 Thread Michael Niedermayer
On Sun, Jul 13, 2014 at 06:09:09PM +0100, Derek Buitenhuis wrote: > On 7/13/2014 5:36 PM, Star Brilliant wrote: > > The updated patch and sample file. > > Seems fairly reasonable to me. sample uploaded patch applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC78

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-13 Thread Star Brilliant
On 2014-07-14 01:09, Derek Buitenhuis wrote: On 7/13/2014 5:36 PM, Star Brilliant wrote: The updated patch and sample file. Seems fairly reasonable to me. So is there any problems now? (I'm just too impatient) Thanks. ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-13 Thread Star Brilliant
On 2014-07-14 01:09, Derek Buitenhuis wrote: On 7/13/2014 5:36 PM, Star Brilliant wrote: The updated patch and sample file. Seems fairly reasonable to me. So is there any problems now? (Sorry but I'm just too impatient) Thanks. ___ ffmpeg-devel ma

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-13 Thread Derek Buitenhuis
On 7/13/2014 5:36 PM, Star Brilliant wrote: > The updated patch and sample file. Seems fairly reasonable to me. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-13 Thread Star Brilliant
On 2014-07-14 00:18, Star Brilliant wrote: The updated patch along with sample LRC file. Moved to SCNu64 during reading timestamp as Derek suggests. I have no idea on how to use FATE. Please help me, if possible, to add this lrc file to the FATE dataset. Thanks. Wish to see it in FFmpeg 2.4 re

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-13 Thread Star Brilliant
The updated patch along with sample LRC file. Moved to SCNu64 during reading timestamp as Derek suggests. I have no idea on how to use FATE. Please help me, if possible, to add this lrc file to the FATE dataset. Thanks. Wish to see it in FFmpeg 2.4 release. >From 5ba3c51eaa8a46f813acdea344e987c

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-12 Thread Derek Buitenhuis
On 7/11/2014 12:16 PM, Star Brilliant wrote: > I forgot to mention it in the previous mail. > It is not a bug. Although %d reads negative integers, the seconds and > centiseconds are not correctly read. > I have tried various ways to read both mm:ss.cs -mm:ss.cs combination, > and the one I am us

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-12 Thread Michael Niedermayer
On Thu, Jul 10, 2014 at 09:31:57PM +0800, Star Brilliant wrote: > Some improvements in lrc_probe. > > Updated patch is attached. > > Thanks. > Changelog|1 > doc/general.texi |1 > libavformat/Makefile |2 > libavformat/allformats.c |1 > libavfor

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-12 Thread Michael Niedermayer
On Fri, Jul 11, 2014 at 07:16:04PM +0800, Star Brilliant wrote: > On 2014-07-09 23:09, Derek Buitenhuis wrote: > +*start = -(mm*6LL + ss*1000LL + cs*10LL); // just in case > negative pts > > > >That said, there is still a bug. %d will read negative integers already, you > >do n

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-11 Thread Star Brilliant
On 2014-07-09 23:09, Derek Buitenhuis wrote: +*start = -(mm*6LL + ss*1000LL + cs*10LL); // just in case negative pts That said, there is still a bug. %d will read negative integers already, you do not need to check for '-'. I forgot to mention it in the previous mail. It is not a

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-10 Thread Star Brilliant
Some improvements in lrc_probe. Updated patch is attached. Thanks. >From 6ad46495be298fc7254676b141378295c2238e69 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Wed, 9 Jul 2014 14:24:05 +0800 Subject: [PATCH] AVFormat: LRC demuxer and muxer --- Changelog| 1 + doc/gener

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Star Brilliant
On 2014-07-10 02:27, Michael Niedermayer wrote: On Wed, Jul 09, 2014 at 11:37:31PM +0800, Star Brilliant wrote: On 2014-07-09 23:09, Derek Buitenhuis wrote: You misunderstand what I am asking. int may be 32bits, and timestamps generate 64. is LRC guaranteed to only have 32bit timestamps? I f

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Michael Niedermayer
On Wed, Jul 09, 2014 at 11:37:31PM +0800, Star Brilliant wrote: > On 2014-07-09 23:09, Derek Buitenhuis wrote: > >You misunderstand what I am asking. int may be 32bits, and timestamps > >generate 64. > >is LRC guaranteed to only have 32bit timestamps? > > I find no portable way to scanf a 64-bit

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Michael Niedermayer
On Wed, Jul 09, 2014 at 10:55:47PM +0800, Star Brilliant wrote: > 于 2014年07月09日 22:24, Derek Buitenhuis 写道: > >>+/* > >>+ * LRC lyrics file format decoder > >>+ * Copyright (c) 2014 StarBrilliant > > > >For copyright purposes we generally use real names. > > Thank you for your reminder. > But I c

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Star Brilliant
On 2014-07-09 23:09, Derek Buitenhuis wrote: You misunderstand what I am asking. int may be 32bits, and timestamps generate 64. is LRC guaranteed to only have 32bit timestamps? I find no portable way to scanf a 64-bit integer in C90 standard. sscanf(buf, "%" SCNd64, &ptr); is a C99 thing. Does

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Derek Buitenhuis
On 7/9/2014 3:55 PM, Star Brilliant wrote: >>> +#include "libavutil/bprint.h" >>> +#include "libavutil/dict.h" >>> + >>> +typedef struct LRCContext { >>> +FFDemuxSubtitlesQueue q; >>> +int ts_offset; >> >> Is int enough for a timestamp difference? > > bprint is used for string and buffer m

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Star Brilliant
于 2014年07月09日 22:24, Derek Buitenhuis 写道: +/* + * LRC lyrics file format decoder + * Copyright (c) 2014 StarBrilliant For copyright purposes we generally use real names. Thank you for your reminder. But I consider my real name piracy. If this really causes trouble to FFmpeg team, I will chan

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Derek Buitenhuis
On 7/9/2014 3:24 PM, Derek Buitenhuis wrote: > '-' is a printf/scanf modifier, I'm not sure this will work. Sorry, ignore this part. It's before the % so it will obviously work. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmp

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Derek Buitenhuis
> +/* > + * LRC lyrics file format decoder > + * Copyright (c) 2014 StarBrilliant For copyright purposes we generally use real names. > +#include "libavcodec/internal.h" Ew. What are you using from this? > +#include "libavutil/bprint.h" > +#include "libavutil/dict.h" > + > +typedef struct LRCC

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Derek Buitenhuis
On 7/9/2014 2:42 PM, Carl Eugen Hoyos wrote: >> +if(!memcmp(p->buf + offset, "[ti:", 4) || >> + !memcmp(p->buf + offset, "[al:", 4) || >> + !memcmp(p->buf + offset, "[ar:", 4)) >> +return AVPROBE_SCORE_MAX; > > MAX score is not ok for 32bit, use MAX/2 (or less). Too elabor

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Star Brilliant
On 2014-07-09 21:42, Carl Eugen Hoyos wrote: It looks as if your mailer broke the patch, consider to attach the patch. (Sorry if I am wrong on this.) I am really sorry that I misconfigured my Thunderbird. So I attached my patch. I fixed things you mentioned in the last mail. Thanks. >From a9

Re: [FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Carl Eugen Hoyos
Star Brilliant hotmail.com> writes: > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > 02110-1301 USA It looks as if your mailer broke the patch, consider to attach the patch. (Sorry if I am wrong on this.) > +static const AVMetadataConv ffpriv_lrc_metadata_conv[] = { This

[FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

2014-07-09 Thread Star Brilliant
LRC is widely used to represent music lyrics. It is useful to have lavf decode LRC during playback or transcode it to other subtitle formats. I know there once was a rejected patch here: http://ffmpeg.org/pipermail/ffmpeg-devel/2010-December/084342.html So this is why I rewrote another implemen