Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On Mon, Dec 05, 2016 at 07:06:35AM -0700, Roger Pack wrote: > On 12/2/16, James Almerwrote: > > On 12/2/2016 10:06 PM, Roger Pack wrote: > >> On 11/25/16, Roger Pack wrote: > >>> On 11/18/16, Roger Pack wrote: > On 11/15/16, James Almer wrote: > > On 11/10/2016 4:26 PM, Roger Pack wrote: > >> On 11/1/16, James Almer wrote: > On 11/1/2016 6:43 PM, James Almer wrote: > >> On 10/25/2016 9:38 PM, Roger Pack wrote: > From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 > 00:00:00 > 2001 > From: rogerdpack > Date: Tue, 25 Oct 2016 18:33:12 -0600 > Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based > on > patch > from > Yuval Adam > > Signed-off-by: rogerdpack > --- > doc/muxers.texi| 13 + > libavformat/avformat.h | 3 ++- > libavformat/hlsenc.c | 6 +++--- > libavformat/img2enc.c | 6 -- > libavformat/utils.c| 42 > ++ > 5 files changed, 60 insertions(+), 10 deletions(-) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 0d856db..0c3a198 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -619,6 +619,12 @@ If the pattern contains "%d" or > "%0@var{N}d", > the > first filename of > the file list specified will contain the number 1, all the > following > numbers will be sequential. > > +If the pattern contains "%t", the frame's timestamps will be > inserted > +in the filename like "00.00.00.000" for hours, minutes, > seconds, > +and milliseconds. > + > +The "%t" and "%d" patterns may be used simultaneously. > + > The pattern may contain a suffix which is used to automatically > determine the format of the image files to write. > > @@ -664,6 +670,13 @@ can be used: > ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 > "%Y-%m-%d_%H-%M-%S.jpg" > @end example > > +The following example uses the timestamp parameter to generate > one > +image file per video frame from the input, and name it > including > its > original > +timestamp. > +@example > +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg > +@end example > + > @subsection Options > > @table @option > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > index f9f4d72..7f39698 100644 > --- a/libavformat/avformat.h > +++ b/libavformat/avformat.h > @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, > * @param path numbered sequence string > * @param number frame number > * @param flags AV_FRAME_FILENAME_FLAGS_* > + * @param ts frame timestamp in AV_TIME_BASE fractional > seconds. > * @return 0 if OK, -1 on format error > */ > int av_get_frame_filename2(char *buf, int buf_size, > - const char *path, int number, int > flags); > + const char *path, int number, int > flags, > int64_t ts); > >> > >> Uhh, what? did you just break API modifying a public function? > >> > > For the record, this was reverted. > > Shouldn't be hard to solve, i think. Just add a new > ff_get_frame_filename() > function to internal.h with this new signature, at least for now and > for > this > feature, to avoid adding a third public function doing the same > thing > unless > absolutely necessary. > >> OK see attached. Wasn't sure if I should duplicate docs or not, feel > >> free to modify. > >> Cheers! > >> -roger- > >> > >> > >> 0001-img2-encoder-allow-t-in-filepattern-based-on-patch-f.patch > >> > >> > >> From 8287f1ca543f764e9e88659ee5a07873860d607d Mon Sep 17 00:00:00 2001 > >> From: rogerdpack > >> Date: Thu, 10 Nov 2016 12:24:49 -0700 > >> Subject: [PATCH]
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 12/2/16, James Almerwrote: > On 12/2/2016 10:06 PM, Roger Pack wrote: >> On 11/25/16, Roger Pack wrote: >>> On 11/18/16, Roger Pack wrote: On 11/15/16, James Almer wrote: > On 11/10/2016 4:26 PM, Roger Pack wrote: >> On 11/1/16, James Almer wrote: On 11/1/2016 6:43 PM, James Almer wrote: >> On 10/25/2016 9:38 PM, Roger Pack wrote: From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 2001 From: rogerdpack Date: Tue, 25 Oct 2016 18:33:12 -0600 Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on patch from Yuval Adam Signed-off-by: rogerdpack --- doc/muxers.texi| 13 + libavformat/avformat.h | 3 ++- libavformat/hlsenc.c | 6 +++--- libavformat/img2enc.c | 6 -- libavformat/utils.c| 42 ++ 5 files changed, 60 insertions(+), 10 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 0d856db..0c3a198 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the first filename of the file list specified will contain the number 1, all the following numbers will be sequential. +If the pattern contains "%t", the frame's timestamps will be inserted +in the filename like "00.00.00.000" for hours, minutes, seconds, +and milliseconds. + +The "%t" and "%d" patterns may be used simultaneously. + The pattern may contain a suffix which is used to automatically determine the format of the image files to write. @@ -664,6 +670,13 @@ can be used: ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg" @end example +The following example uses the timestamp parameter to generate one +image file per video frame from the input, and name it including its original +timestamp. +@example +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg +@end example + @subsection Options @table @option diff --git a/libavformat/avformat.h b/libavformat/avformat.h index f9f4d72..7f39698 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, * @param path numbered sequence string * @param number frame number * @param flags AV_FRAME_FILENAME_FLAGS_* + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. * @return 0 if OK, -1 on format error */ int av_get_frame_filename2(char *buf, int buf_size, - const char *path, int number, int flags); + const char *path, int number, int flags, int64_t ts); >> >> Uhh, what? did you just break API modifying a public function? >> For the record, this was reverted. Shouldn't be hard to solve, i think. Just add a new ff_get_frame_filename() function to internal.h with this new signature, at least for now and for this feature, to avoid adding a third public function doing the same thing unless absolutely necessary. >> OK see attached. Wasn't sure if I should duplicate docs or not, feel >> free to modify. >> Cheers! >> -roger- >> >> >> 0001-img2-encoder-allow-t-in-filepattern-based-on-patch-f.patch >> >> >> From 8287f1ca543f764e9e88659ee5a07873860d607d Mon Sep 17 00:00:00 2001 >> From: rogerdpack >> Date: Thu, 10 Nov 2016 12:24:49 -0700 >> Subject: [PATCH] img2 encoder: allow %t in filepattern, based on patch >> from >> Yuval Adam >> >> Signed-off-by: rogerdpack >> --- >> doc/muxers.texi| 13 + >> libavformat/img2enc.c | 8 +--- >> libavformat/internal.h | 18
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 11/18/16, Roger Packwrote: > On 11/15/16, James Almer wrote: >> On 11/10/2016 4:26 PM, Roger Pack wrote: >>> On 11/1/16, James Almer wrote: > On 11/1/2016 6:43 PM, James Almer wrote: > >> On 10/25/2016 9:38 PM, Roger Pack wrote: >> >>> From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 >> >>> 2001 >> >>> From: rogerdpack >> >>> Date: Tue, 25 Oct 2016 18:33:12 -0600 >> >>> Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on >> >>> patch >> >>> from >> >>> Yuval Adam >> >>> >> >>> Signed-off-by: rogerdpack >> >>> --- >> >>> doc/muxers.texi| 13 + >> >>> libavformat/avformat.h | 3 ++- >> >>> libavformat/hlsenc.c | 6 +++--- >> >>> libavformat/img2enc.c | 6 -- >> >>> libavformat/utils.c| 42 >> >>> ++ >> >>> 5 files changed, 60 insertions(+), 10 deletions(-) >> >>> >> >>> diff --git a/doc/muxers.texi b/doc/muxers.texi >> >>> index 0d856db..0c3a198 100644 >> >>> --- a/doc/muxers.texi >> >>> +++ b/doc/muxers.texi >> >>> @@ -619,6 +619,12 @@ If the pattern contains "%d" or >> >>> "%0@var{N}d", >> >>> the >> >>> first filename of >> >>> the file list specified will contain the number 1, all the >> >>> following >> >>> numbers will be sequential. >> >>> >> >>> +If the pattern contains "%t", the frame's timestamps will be >> >>> inserted >> >>> +in the filename like "00.00.00.000" for hours, minutes, seconds, >> >>> +and milliseconds. >> >>> + >> >>> +The "%t" and "%d" patterns may be used simultaneously. >> >>> + >> >>> The pattern may contain a suffix which is used to automatically >> >>> determine the format of the image files to write. >> >>> >> >>> @@ -664,6 +670,13 @@ can be used: >> >>> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 >> >>> "%Y-%m-%d_%H-%M-%S.jpg" >> >>> @end example >> >>> >> >>> +The following example uses the timestamp parameter to generate >> >>> one >> >>> +image file per video frame from the input, and name it including >> >>> its >> >>> original >> >>> +timestamp. >> >>> +@example >> >>> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg >> >>> +@end example >> >>> + >> >>> @subsection Options >> >>> >> >>> @table @option >> >>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h >> >>> index f9f4d72..7f39698 100644 >> >>> --- a/libavformat/avformat.h >> >>> +++ b/libavformat/avformat.h >> >>> @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, >> >>> * @param path numbered sequence string >> >>> * @param number frame number >> >>> * @param flags AV_FRAME_FILENAME_FLAGS_* >> >>> + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. >> >>> * @return 0 if OK, -1 on format error >> >>> */ >> >>> int av_get_frame_filename2(char *buf, int buf_size, >> >>> - const char *path, int number, int >> >>> flags); >> >>> + const char *path, int number, int >> >>> flags, >> >>> int64_t ts); > >> > >> Uhh, what? did you just break API modifying a public function? > >> > > For the record, this was reverted. > > Shouldn't be hard to solve, i think. Just add a new > ff_get_frame_filename() > function to internal.h with this new signature, at least for now and > for > this > feature, to avoid adding a third public function doing the same thing > unless > absolutely necessary. >>> OK see attached. Wasn't sure if I should duplicate docs or not, feel >>> free to modify. >>> Cheers! >>> -roger- >>> >>> >>> 0001-img2-encoder-allow-t-in-filepattern-based-on-patch-f.patch >>> >>> >>> From 8287f1ca543f764e9e88659ee5a07873860d607d Mon Sep 17 00:00:00 2001 >>> From: rogerdpack >>> Date: Thu, 10 Nov 2016 12:24:49 -0700 >>> Subject: [PATCH] img2 encoder: allow %t in filepattern, based on patch >>> from >>> Yuval Adam >>> >>> Signed-off-by: rogerdpack >>> --- >>> doc/muxers.texi| 13 + >>> libavformat/img2enc.c | 8 +--- >>> libavformat/internal.h | 18 ++ >>> libavformat/utils.c| 45 >>> ++--- >>> 4 files changed, 78 insertions(+), 6 deletions(-) >> >> No hlsenc.c? > > Yeah, good idea, moved them all to use the ff_get_frame_filename3 now > just so people would realize the extra parameter is available. > >>> >>> diff --git a/doc/muxers.texi b/doc/muxers.texi >>> index 806182a..670fcca 100644 >>> --- a/doc/muxers.texi >>> +++ b/doc/muxers.texi >>> @@ -622,6 +622,12 @@ If the
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 11/15/16, James Almerwrote: > On 11/10/2016 4:26 PM, Roger Pack wrote: >> On 11/1/16, James Almer wrote: >>> > On 11/1/2016 6:43 PM, James Almer wrote: >> On 10/25/2016 9:38 PM, Roger Pack wrote: > >>> From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 > >>> 2001 > >>> From: rogerdpack > >>> Date: Tue, 25 Oct 2016 18:33:12 -0600 > >>> Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on > >>> patch > >>> from > >>> Yuval Adam > >>> > >>> Signed-off-by: rogerdpack > >>> --- > >>> doc/muxers.texi| 13 + > >>> libavformat/avformat.h | 3 ++- > >>> libavformat/hlsenc.c | 6 +++--- > >>> libavformat/img2enc.c | 6 -- > >>> libavformat/utils.c| 42 > >>> ++ > >>> 5 files changed, 60 insertions(+), 10 deletions(-) > >>> > >>> diff --git a/doc/muxers.texi b/doc/muxers.texi > >>> index 0d856db..0c3a198 100644 > >>> --- a/doc/muxers.texi > >>> +++ b/doc/muxers.texi > >>> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", > >>> the > >>> first filename of > >>> the file list specified will contain the number 1, all the > >>> following > >>> numbers will be sequential. > >>> > >>> +If the pattern contains "%t", the frame's timestamps will be > >>> inserted > >>> +in the filename like "00.00.00.000" for hours, minutes, seconds, > >>> +and milliseconds. > >>> + > >>> +The "%t" and "%d" patterns may be used simultaneously. > >>> + > >>> The pattern may contain a suffix which is used to automatically > >>> determine the format of the image files to write. > >>> > >>> @@ -664,6 +670,13 @@ can be used: > >>> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 > >>> "%Y-%m-%d_%H-%M-%S.jpg" > >>> @end example > >>> > >>> +The following example uses the timestamp parameter to generate one > >>> +image file per video frame from the input, and name it including > >>> its > >>> original > >>> +timestamp. > >>> +@example > >>> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg > >>> +@end example > >>> + > >>> @subsection Options > >>> > >>> @table @option > >>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h > >>> index f9f4d72..7f39698 100644 > >>> --- a/libavformat/avformat.h > >>> +++ b/libavformat/avformat.h > >>> @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, > >>> * @param path numbered sequence string > >>> * @param number frame number > >>> * @param flags AV_FRAME_FILENAME_FLAGS_* > >>> + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. > >>> * @return 0 if OK, -1 on format error > >>> */ > >>> int av_get_frame_filename2(char *buf, int buf_size, > >>> - const char *path, int number, int > >>> flags); > >>> + const char *path, int number, int flags, > >>> int64_t ts); >> >> Uhh, what? did you just break API modifying a public function? >> >>> > >>> > For the record, this was reverted. >>> > >>> > Shouldn't be hard to solve, i think. Just add a new >>> > ff_get_frame_filename() >>> > function to internal.h with this new signature, at least for now and >>> > for >>> > this >>> > feature, to avoid adding a third public function doing the same thing >>> > unless >>> > absolutely necessary. >> OK see attached. Wasn't sure if I should duplicate docs or not, feel >> free to modify. >> Cheers! >> -roger- >> >> >> 0001-img2-encoder-allow-t-in-filepattern-based-on-patch-f.patch >> >> >> From 8287f1ca543f764e9e88659ee5a07873860d607d Mon Sep 17 00:00:00 2001 >> From: rogerdpack >> Date: Thu, 10 Nov 2016 12:24:49 -0700 >> Subject: [PATCH] img2 encoder: allow %t in filepattern, based on patch >> from >> Yuval Adam >> >> Signed-off-by: rogerdpack >> --- >> doc/muxers.texi| 13 + >> libavformat/img2enc.c | 8 +--- >> libavformat/internal.h | 18 ++ >> libavformat/utils.c| 45 ++--- >> 4 files changed, 78 insertions(+), 6 deletions(-) > > No hlsenc.c? Yeah, good idea, moved them all to use the ff_get_frame_filename3 now just so people would realize the extra parameter is available. >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 806182a..670fcca 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -622,6 +622,12 @@ If the pattern contains "%d" or "%0@var{N}d", the >> first filename of >> the file list specified will contain the number 1, all the following >> numbers will be sequential. >> >> +If the pattern contains "%t", the frame's
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 11/10/2016 4:26 PM, Roger Pack wrote: > On 11/1/16, James Almerwrote: >> > On 11/1/2016 6:43 PM, James Almer wrote: >>> >> On 10/25/2016 9:38 PM, Roger Pack wrote: >>> From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 2001 >>> From: rogerdpack >>> Date: Tue, 25 Oct 2016 18:33:12 -0600 >>> Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on patch >>> from >>> Yuval Adam >>> >>> Signed-off-by: rogerdpack >>> --- >>> doc/muxers.texi| 13 + >>> libavformat/avformat.h | 3 ++- >>> libavformat/hlsenc.c | 6 +++--- >>> libavformat/img2enc.c | 6 -- >>> libavformat/utils.c| 42 ++ >>> 5 files changed, 60 insertions(+), 10 deletions(-) >>> >>> diff --git a/doc/muxers.texi b/doc/muxers.texi >>> index 0d856db..0c3a198 100644 >>> --- a/doc/muxers.texi >>> +++ b/doc/muxers.texi >>> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the >>> first filename of >>> the file list specified will contain the number 1, all the following >>> numbers will be sequential. >>> >>> +If the pattern contains "%t", the frame's timestamps will be inserted >>> +in the filename like "00.00.00.000" for hours, minutes, seconds, >>> +and milliseconds. >>> + >>> +The "%t" and "%d" patterns may be used simultaneously. >>> + >>> The pattern may contain a suffix which is used to automatically >>> determine the format of the image files to write. >>> >>> @@ -664,6 +670,13 @@ can be used: >>> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 >>> "%Y-%m-%d_%H-%M-%S.jpg" >>> @end example >>> >>> +The following example uses the timestamp parameter to generate one >>> +image file per video frame from the input, and name it including its >>> original >>> +timestamp. >>> +@example >>> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg >>> +@end example >>> + >>> @subsection Options >>> >>> @table @option >>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h >>> index f9f4d72..7f39698 100644 >>> --- a/libavformat/avformat.h >>> +++ b/libavformat/avformat.h >>> @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, >>> * @param path numbered sequence string >>> * @param number frame number >>> * @param flags AV_FRAME_FILENAME_FLAGS_* >>> + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. >>> * @return 0 if OK, -1 on format error >>> */ >>> int av_get_frame_filename2(char *buf, int buf_size, >>> - const char *path, int number, int flags); >>> + const char *path, int number, int flags, >>> int64_t ts); >>> >> >>> >> Uhh, what? did you just break API modifying a public function? >>> >> >> > >> > For the record, this was reverted. >> > >> > Shouldn't be hard to solve, i think. Just add a new ff_get_frame_filename() >> > function to internal.h with this new signature, at least for now and for >> > this >> > feature, to avoid adding a third public function doing the same thing >> > unless >> > absolutely necessary. > OK see attached. Wasn't sure if I should duplicate docs or not, feel > free to modify. > Cheers! > -roger- > > > 0001-img2-encoder-allow-t-in-filepattern-based-on-patch-f.patch > > > From 8287f1ca543f764e9e88659ee5a07873860d607d Mon Sep 17 00:00:00 2001 > From: rogerdpack > Date: Thu, 10 Nov 2016 12:24:49 -0700 > Subject: [PATCH] img2 encoder: allow %t in filepattern, based on patch from > Yuval Adam > > Signed-off-by: rogerdpack > --- > doc/muxers.texi| 13 + > libavformat/img2enc.c | 8 +--- > libavformat/internal.h | 18 ++ > libavformat/utils.c| 45 ++--- > 4 files changed, 78 insertions(+), 6 deletions(-) No hlsenc.c? > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 806182a..670fcca 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -622,6 +622,12 @@ If the pattern contains "%d" or "%0@var{N}d", the first > filename of > the file list specified will contain the number 1, all the following > numbers will be sequential. > > +If the pattern contains "%t", the frame's timestamps will be inserted > +in the filename like "00.00.00.000" for hours, minutes, seconds, > +and milliseconds. > + > +The "%t" and "%d" patterns may be used simultaneously. > + > The pattern may contain a suffix which is used to automatically > determine the format of the image files to write. > > @@ -667,6 +673,13 @@ can be used: > ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 11/10/16, Roger Packwrote: > On 11/1/16, James Almer wrote: >> On 11/1/2016 6:43 PM, James Almer wrote: >>> On 10/25/2016 9:38 PM, Roger Pack wrote: From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 2001 From: rogerdpack Date: Tue, 25 Oct 2016 18:33:12 -0600 Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on patch from Yuval Adam Signed-off-by: rogerdpack --- doc/muxers.texi| 13 + libavformat/avformat.h | 3 ++- libavformat/hlsenc.c | 6 +++--- libavformat/img2enc.c | 6 -- libavformat/utils.c| 42 ++ 5 files changed, 60 insertions(+), 10 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 0d856db..0c3a198 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the first filename of the file list specified will contain the number 1, all the following numbers will be sequential. +If the pattern contains "%t", the frame's timestamps will be inserted +in the filename like "00.00.00.000" for hours, minutes, seconds, +and milliseconds. + +The "%t" and "%d" patterns may be used simultaneously. + The pattern may contain a suffix which is used to automatically determine the format of the image files to write. @@ -664,6 +670,13 @@ can be used: ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg" @end example +The following example uses the timestamp parameter to generate one +image file per video frame from the input, and name it including its original +timestamp. +@example +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg +@end example + @subsection Options @table @option diff --git a/libavformat/avformat.h b/libavformat/avformat.h index f9f4d72..7f39698 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, * @param path numbered sequence string * @param number frame number * @param flags AV_FRAME_FILENAME_FLAGS_* + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. * @return 0 if OK, -1 on format error */ int av_get_frame_filename2(char *buf, int buf_size, - const char *path, int number, int flags); + const char *path, int number, int flags, int64_t ts); >>> >>> Uhh, what? did you just break API modifying a public function? >>> >> >> For the record, this was reverted. >> >> Shouldn't be hard to solve, i think. Just add a new >> ff_get_frame_filename() >> function to internal.h with this new signature, at least for now and for >> this >> feature, to avoid adding a third public function doing the same thing >> unless >> absolutely necessary. > > OK see attached. Wasn't sure if I should duplicate docs or not, feel > free to modify. Ping...if no response in another few days I'll go ahead and get write access and commit it myself. Thanks. -roger- ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 11/1/16, James Almerwrote: > On 11/1/2016 6:43 PM, James Almer wrote: >> On 10/25/2016 9:38 PM, Roger Pack wrote: >>> From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 2001 >>> From: rogerdpack >>> Date: Tue, 25 Oct 2016 18:33:12 -0600 >>> Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on patch >>> from >>> Yuval Adam >>> >>> Signed-off-by: rogerdpack >>> --- >>> doc/muxers.texi| 13 + >>> libavformat/avformat.h | 3 ++- >>> libavformat/hlsenc.c | 6 +++--- >>> libavformat/img2enc.c | 6 -- >>> libavformat/utils.c| 42 ++ >>> 5 files changed, 60 insertions(+), 10 deletions(-) >>> >>> diff --git a/doc/muxers.texi b/doc/muxers.texi >>> index 0d856db..0c3a198 100644 >>> --- a/doc/muxers.texi >>> +++ b/doc/muxers.texi >>> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the >>> first filename of >>> the file list specified will contain the number 1, all the following >>> numbers will be sequential. >>> >>> +If the pattern contains "%t", the frame's timestamps will be inserted >>> +in the filename like "00.00.00.000" for hours, minutes, seconds, >>> +and milliseconds. >>> + >>> +The "%t" and "%d" patterns may be used simultaneously. >>> + >>> The pattern may contain a suffix which is used to automatically >>> determine the format of the image files to write. >>> >>> @@ -664,6 +670,13 @@ can be used: >>> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 >>> "%Y-%m-%d_%H-%M-%S.jpg" >>> @end example >>> >>> +The following example uses the timestamp parameter to generate one >>> +image file per video frame from the input, and name it including its >>> original >>> +timestamp. >>> +@example >>> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg >>> +@end example >>> + >>> @subsection Options >>> >>> @table @option >>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h >>> index f9f4d72..7f39698 100644 >>> --- a/libavformat/avformat.h >>> +++ b/libavformat/avformat.h >>> @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, >>> * @param path numbered sequence string >>> * @param number frame number >>> * @param flags AV_FRAME_FILENAME_FLAGS_* >>> + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. >>> * @return 0 if OK, -1 on format error >>> */ >>> int av_get_frame_filename2(char *buf, int buf_size, >>> - const char *path, int number, int flags); >>> + const char *path, int number, int flags, >>> int64_t ts); >> >> Uhh, what? did you just break API modifying a public function? >> > > For the record, this was reverted. > > Shouldn't be hard to solve, i think. Just add a new ff_get_frame_filename() > function to internal.h with this new signature, at least for now and for > this > feature, to avoid adding a third public function doing the same thing unless > absolutely necessary. OK see attached. Wasn't sure if I should duplicate docs or not, feel free to modify. Cheers! -roger- 0001-img2-encoder-allow-t-in-filepattern-based-on-patch-f.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 11/1/16, James Almerwrote: > On 10/25/2016 9:38 PM, Roger Pack wrote: >> From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 2001 >> From: rogerdpack >> Date: Tue, 25 Oct 2016 18:33:12 -0600 >> Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on patch >> from >> Yuval Adam >> >> Signed-off-by: rogerdpack >> --- >> doc/muxers.texi| 13 + >> libavformat/avformat.h | 3 ++- >> libavformat/hlsenc.c | 6 +++--- >> libavformat/img2enc.c | 6 -- >> libavformat/utils.c| 42 ++ >> 5 files changed, 60 insertions(+), 10 deletions(-) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 0d856db..0c3a198 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the >> first filename of >> the file list specified will contain the number 1, all the following >> numbers will be sequential. >> >> +If the pattern contains "%t", the frame's timestamps will be inserted >> +in the filename like "00.00.00.000" for hours, minutes, seconds, >> +and milliseconds. >> + >> +The "%t" and "%d" patterns may be used simultaneously. >> + >> The pattern may contain a suffix which is used to automatically >> determine the format of the image files to write. >> >> @@ -664,6 +670,13 @@ can be used: >> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 >> "%Y-%m-%d_%H-%M-%S.jpg" >> @end example >> >> +The following example uses the timestamp parameter to generate one >> +image file per video frame from the input, and name it including its >> original >> +timestamp. >> +@example >> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg >> +@end example >> + >> @subsection Options >> >> @table @option >> diff --git a/libavformat/avformat.h b/libavformat/avformat.h >> index f9f4d72..7f39698 100644 >> --- a/libavformat/avformat.h >> +++ b/libavformat/avformat.h >> @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, >> * @param path numbered sequence string >> * @param number frame number >> * @param flags AV_FRAME_FILENAME_FLAGS_* >> + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. >> * @return 0 if OK, -1 on format error >> */ >> int av_get_frame_filename2(char *buf, int buf_size, >> - const char *path, int number, int flags); >> + const char *path, int number, int flags, >> int64_t ts); > > Uhh, what? did you just break API modifying a public function? Yes, it was a recently added method so I hoped to get it "included" before a version was released (but it took so long it maybe missed a deadline...?) Cheers! -roger- ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 11/1/2016 6:43 PM, James Almer wrote: > On 10/25/2016 9:38 PM, Roger Pack wrote: >> From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 2001 >> From: rogerdpack>> Date: Tue, 25 Oct 2016 18:33:12 -0600 >> Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on patch from >> Yuval Adam >> >> Signed-off-by: rogerdpack >> --- >> doc/muxers.texi| 13 + >> libavformat/avformat.h | 3 ++- >> libavformat/hlsenc.c | 6 +++--- >> libavformat/img2enc.c | 6 -- >> libavformat/utils.c| 42 ++ >> 5 files changed, 60 insertions(+), 10 deletions(-) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 0d856db..0c3a198 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the first >> filename of >> the file list specified will contain the number 1, all the following >> numbers will be sequential. >> >> +If the pattern contains "%t", the frame's timestamps will be inserted >> +in the filename like "00.00.00.000" for hours, minutes, seconds, >> +and milliseconds. >> + >> +The "%t" and "%d" patterns may be used simultaneously. >> + >> The pattern may contain a suffix which is used to automatically >> determine the format of the image files to write. >> >> @@ -664,6 +670,13 @@ can be used: >> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 >> "%Y-%m-%d_%H-%M-%S.jpg" >> @end example >> >> +The following example uses the timestamp parameter to generate one >> +image file per video frame from the input, and name it including its >> original >> +timestamp. >> +@example >> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg >> +@end example >> + >> @subsection Options >> >> @table @option >> diff --git a/libavformat/avformat.h b/libavformat/avformat.h >> index f9f4d72..7f39698 100644 >> --- a/libavformat/avformat.h >> +++ b/libavformat/avformat.h >> @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, >> * @param path numbered sequence string >> * @param number frame number >> * @param flags AV_FRAME_FILENAME_FLAGS_* >> + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. >> * @return 0 if OK, -1 on format error >> */ >> int av_get_frame_filename2(char *buf, int buf_size, >> - const char *path, int number, int flags); >> + const char *path, int number, int flags, int64_t >> ts); > > Uhh, what? did you just break API modifying a public function? > For the record, this was reverted. Shouldn't be hard to solve, i think. Just add a new ff_get_frame_filename() function to internal.h with this new signature, at least for now and for this feature, to avoid adding a third public function doing the same thing unless absolutely necessary. >> >> int av_get_frame_filename(char *buf, int buf_size, >>const char *path, int number); > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 10/25/2016 9:38 PM, Roger Pack wrote: > From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00 2001 > From: rogerdpack> Date: Tue, 25 Oct 2016 18:33:12 -0600 > Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on patch from > Yuval Adam > > Signed-off-by: rogerdpack > --- > doc/muxers.texi| 13 + > libavformat/avformat.h | 3 ++- > libavformat/hlsenc.c | 6 +++--- > libavformat/img2enc.c | 6 -- > libavformat/utils.c| 42 ++ > 5 files changed, 60 insertions(+), 10 deletions(-) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 0d856db..0c3a198 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the first > filename of > the file list specified will contain the number 1, all the following > numbers will be sequential. > > +If the pattern contains "%t", the frame's timestamps will be inserted > +in the filename like "00.00.00.000" for hours, minutes, seconds, > +and milliseconds. > + > +The "%t" and "%d" patterns may be used simultaneously. > + > The pattern may contain a suffix which is used to automatically > determine the format of the image files to write. > > @@ -664,6 +670,13 @@ can be used: > ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 > "%Y-%m-%d_%H-%M-%S.jpg" > @end example > > +The following example uses the timestamp parameter to generate one > +image file per video frame from the input, and name it including its original > +timestamp. > +@example > +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg > +@end example > + > @subsection Options > > @table @option > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > index f9f4d72..7f39698 100644 > --- a/libavformat/avformat.h > +++ b/libavformat/avformat.h > @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic, > * @param path numbered sequence string > * @param number frame number > * @param flags AV_FRAME_FILENAME_FLAGS_* > + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. > * @return 0 if OK, -1 on format error > */ > int av_get_frame_filename2(char *buf, int buf_size, > - const char *path, int number, int flags); > + const char *path, int number, int flags, int64_t > ts); Uhh, what? did you just break API modifying a public function? > > int av_get_frame_filename(char *buf, int buf_size, >const char *path, int number); ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On Tue, Nov 01, 2016 at 11:23:47AM -0600, Roger Pack wrote: > On 10/26/16, Michael Niedermayerwrote: > > On Tue, Oct 25, 2016 at 06:38:12PM -0600, Roger Pack wrote: > >> On 10/25/16, Michael Niedermayer wrote: > >> > On Mon, Oct 24, 2016 at 03:20:14PM -0600, Roger Pack wrote: > >> >> On 10/16/16, Michael Niedermayer wrote: > >> >> > On Mon, Oct 10, 2016 at 02:56:24PM -0600, Roger Pack wrote: > >> >> >> On 9/22/16, Roger Pack wrote: > >> >> >> > On 1/4/12, Yuval Adam wrote: > >> >> >> >> From: Yuval Adam > >> >> >> >> > >> >> >> >> The image2 muxer now supports timestamps in output filenames. > >> >> >> >> When used in an output patterm '%t' will be replaced with the > >> >> >> >> frames > >> >> >> >> timestamp in hours, minutes and seconds (hh:mm:ss). > >> >> >> > > >> >> >> > A somewhat updated (but not yet cleaned up) revision: > >> >> >> > > >> >> >> > https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 > >> >> >> > > >> >> >> > see also https://trac.ffmpeg.org/ticket/1452 > >> >> >> > >> >> >> OK attached is the "cleaned up" patch, ready for review/commit. > >> >> >> > >> >> >> how to test: > >> >> >> (apply then) run this: > >> >> >> > >> >> >> ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg > >> >> >> and compare filenames with the timestamps from video packets of > >> >> >> ffprobe -show_packets. > >> >> >> > >> >> >> Probably a better way would have been to mix it into > >> >> >> av_bprint_strftime however I wasn't sure how to use that within > >> >> >> libavformat/utils.c av_get_frame_filename2 > >> >> >> > >> >> >> Adam's initial patch > >> >> >> (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) > >> >> >> also deprecated av_get_frame_filename > >> >> >> > >> >> >> but I wasn't sure if we wanted that here or not so didn't include > >> >> >> it. > >> >> >> Thank you for your consideration. > >> >> >> -roger- > >> >> > > >> >> >> doc/muxers.texi| 19 --- > >> >> >> libavformat/avformat.h |3 ++- > >> >> >> libavformat/hlsenc.c |6 +++--- > >> >> >> libavformat/img2enc.c |7 +-- > >> >> >> libavformat/utils.c| 36 > >> >> >> 5 files changed, 58 insertions(+), 13 deletions(-) > >> >> >> 06950fc8ba5a9163ffb838a2bff9933e69255b41 > >> >> >> 0001-img2-encoder-allow-t-in-filename-based-on-patch-from.patch > >> >> >> From 11deddfacc595c43a4f542fffe5e90b142e39c85 Mon Sep 17 00:00:00 > >> >> >> 2001 > >> >> >> From: rogerdpack > >> >> >> Date: Mon, 10 Oct 2016 14:50:20 -0600 > >> >> >> Subject: [PATCH] img2 encoder: allow %t in filename, based on patch > >> >> >> from > >> >> >> Yuval > >> >> >> Adam > >> >> >> > >> >> >> Signed-off-by: rogerdpack > >> >> >> --- > >> >> >> doc/muxers.texi| 19 --- > >> >> >> libavformat/avformat.h | 3 ++- > >> >> >> libavformat/hlsenc.c | 6 +++--- > >> >> >> libavformat/img2enc.c | 7 +-- > >> >> >> libavformat/utils.c| 36 > >> >> >> 5 files changed, 58 insertions(+), 13 deletions(-) > >> >> >> > >> >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi > >> >> >> index 9ec2e31..6fff966 100644 > >> >> >> --- a/doc/muxers.texi > >> >> >> +++ b/doc/muxers.texi > >> >> >> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", > >> >> >> the > >> >> >> first filename of > >> >> >> the file list specified will contain the number 1, all the > >> >> >> following > >> >> >> numbers will be sequential. > >> >> >> > >> >> >> +If the pattern contains "%t", the frame's timestamps will be > >> >> >> inserted > >> >> >> +in the filename like "00.00.00.000" for hours, minutes, seconds, > >> >> >> +and milliseconds. > >> >> >> + > >> >> >> +The "%t" and "%d" patterns may be used simultaneously. > >> >> >> + > >> >> >> The pattern may contain a suffix which is used to automatically > >> >> >> determine the format of the image files to write. > >> >> >> > >> >> >> @@ -635,7 +641,7 @@ The following example shows how to use > >> >> >> @command{ffmpeg} for creating a > >> >> >> sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., > >> >> >> taking one image every second from the input video: > >> >> >> @example > >> >> >> -ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg' > >> >> >> +ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' > >> >> >> @end example > >> >> >> > >> >> >> Note that with @command{ffmpeg}, if the format is not specified > >> >> >> with > >> >> >> the > >> >> >> @@ -643,12 +649,12 @@ Note that with @command{ffmpeg}, if the > >> >> >> format > >> >> >> is > >> >> >> not specified with the > >> >> >> format, the image2 muxer is automatically selected, so the > >> >> >> previous > >> >> >> command can be written as: > >> >>
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 10/26/16, Michael Niedermayerwrote: > On Tue, Oct 25, 2016 at 06:38:12PM -0600, Roger Pack wrote: >> On 10/25/16, Michael Niedermayer wrote: >> > On Mon, Oct 24, 2016 at 03:20:14PM -0600, Roger Pack wrote: >> >> On 10/16/16, Michael Niedermayer wrote: >> >> > On Mon, Oct 10, 2016 at 02:56:24PM -0600, Roger Pack wrote: >> >> >> On 9/22/16, Roger Pack wrote: >> >> >> > On 1/4/12, Yuval Adam wrote: >> >> >> >> From: Yuval Adam >> >> >> >> >> >> >> >> The image2 muxer now supports timestamps in output filenames. >> >> >> >> When used in an output patterm '%t' will be replaced with the >> >> >> >> frames >> >> >> >> timestamp in hours, minutes and seconds (hh:mm:ss). >> >> >> > >> >> >> > A somewhat updated (but not yet cleaned up) revision: >> >> >> > >> >> >> > https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 >> >> >> > >> >> >> > see also https://trac.ffmpeg.org/ticket/1452 >> >> >> >> >> >> OK attached is the "cleaned up" patch, ready for review/commit. >> >> >> >> >> >> how to test: >> >> >> (apply then) run this: >> >> >> >> >> >> ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg >> >> >> and compare filenames with the timestamps from video packets of >> >> >> ffprobe -show_packets. >> >> >> >> >> >> Probably a better way would have been to mix it into >> >> >> av_bprint_strftime however I wasn't sure how to use that within >> >> >> libavformat/utils.c av_get_frame_filename2 >> >> >> >> >> >> Adam's initial patch >> >> >> (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) >> >> >> also deprecated av_get_frame_filename >> >> >> >> >> >> but I wasn't sure if we wanted that here or not so didn't include >> >> >> it. >> >> >> Thank you for your consideration. >> >> >> -roger- >> >> > >> >> >> doc/muxers.texi| 19 --- >> >> >> libavformat/avformat.h |3 ++- >> >> >> libavformat/hlsenc.c |6 +++--- >> >> >> libavformat/img2enc.c |7 +-- >> >> >> libavformat/utils.c| 36 >> >> >> 5 files changed, 58 insertions(+), 13 deletions(-) >> >> >> 06950fc8ba5a9163ffb838a2bff9933e69255b41 >> >> >> 0001-img2-encoder-allow-t-in-filename-based-on-patch-from.patch >> >> >> From 11deddfacc595c43a4f542fffe5e90b142e39c85 Mon Sep 17 00:00:00 >> >> >> 2001 >> >> >> From: rogerdpack >> >> >> Date: Mon, 10 Oct 2016 14:50:20 -0600 >> >> >> Subject: [PATCH] img2 encoder: allow %t in filename, based on patch >> >> >> from >> >> >> Yuval >> >> >> Adam >> >> >> >> >> >> Signed-off-by: rogerdpack >> >> >> --- >> >> >> doc/muxers.texi| 19 --- >> >> >> libavformat/avformat.h | 3 ++- >> >> >> libavformat/hlsenc.c | 6 +++--- >> >> >> libavformat/img2enc.c | 7 +-- >> >> >> libavformat/utils.c| 36 >> >> >> 5 files changed, 58 insertions(+), 13 deletions(-) >> >> >> >> >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> >> >> index 9ec2e31..6fff966 100644 >> >> >> --- a/doc/muxers.texi >> >> >> +++ b/doc/muxers.texi >> >> >> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", >> >> >> the >> >> >> first filename of >> >> >> the file list specified will contain the number 1, all the >> >> >> following >> >> >> numbers will be sequential. >> >> >> >> >> >> +If the pattern contains "%t", the frame's timestamps will be >> >> >> inserted >> >> >> +in the filename like "00.00.00.000" for hours, minutes, seconds, >> >> >> +and milliseconds. >> >> >> + >> >> >> +The "%t" and "%d" patterns may be used simultaneously. >> >> >> + >> >> >> The pattern may contain a suffix which is used to automatically >> >> >> determine the format of the image files to write. >> >> >> >> >> >> @@ -635,7 +641,7 @@ The following example shows how to use >> >> >> @command{ffmpeg} for creating a >> >> >> sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., >> >> >> taking one image every second from the input video: >> >> >> @example >> >> >> -ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg' >> >> >> +ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' >> >> >> @end example >> >> >> >> >> >> Note that with @command{ffmpeg}, if the format is not specified >> >> >> with >> >> >> the >> >> >> @@ -643,12 +649,12 @@ Note that with @command{ffmpeg}, if the >> >> >> format >> >> >> is >> >> >> not specified with the >> >> >> format, the image2 muxer is automatically selected, so the >> >> >> previous >> >> >> command can be written as: >> >> >> @example >> >> >> -ffmpeg -i in.avi -vsync 1 -r 1 'img-%03d.jpeg' >> >> >> +ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg' >> >> >> @end example >> >> >> >> >> >> Note also that the pattern must not necessarily contain "%d" or >> >> >> "%0@var{N}d", for example to create
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On Tue, Oct 25, 2016 at 06:38:12PM -0600, Roger Pack wrote: > On 10/25/16, Michael Niedermayerwrote: > > On Mon, Oct 24, 2016 at 03:20:14PM -0600, Roger Pack wrote: > >> On 10/16/16, Michael Niedermayer wrote: > >> > On Mon, Oct 10, 2016 at 02:56:24PM -0600, Roger Pack wrote: > >> >> On 9/22/16, Roger Pack wrote: > >> >> > On 1/4/12, Yuval Adam wrote: > >> >> >> From: Yuval Adam > >> >> >> > >> >> >> The image2 muxer now supports timestamps in output filenames. > >> >> >> When used in an output patterm '%t' will be replaced with the > >> >> >> frames > >> >> >> timestamp in hours, minutes and seconds (hh:mm:ss). > >> >> > > >> >> > A somewhat updated (but not yet cleaned up) revision: > >> >> > > >> >> > https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 > >> >> > > >> >> > see also https://trac.ffmpeg.org/ticket/1452 > >> >> > >> >> OK attached is the "cleaned up" patch, ready for review/commit. > >> >> > >> >> how to test: > >> >> (apply then) run this: > >> >> > >> >> ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg > >> >> and compare filenames with the timestamps from video packets of > >> >> ffprobe -show_packets. > >> >> > >> >> Probably a better way would have been to mix it into > >> >> av_bprint_strftime however I wasn't sure how to use that within > >> >> libavformat/utils.c av_get_frame_filename2 > >> >> > >> >> Adam's initial patch > >> >> (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) > >> >> also deprecated av_get_frame_filename > >> >> > >> >> but I wasn't sure if we wanted that here or not so didn't include it. > >> >> Thank you for your consideration. > >> >> -roger- > >> > > >> >> doc/muxers.texi| 19 --- > >> >> libavformat/avformat.h |3 ++- > >> >> libavformat/hlsenc.c |6 +++--- > >> >> libavformat/img2enc.c |7 +-- > >> >> libavformat/utils.c| 36 > >> >> 5 files changed, 58 insertions(+), 13 deletions(-) > >> >> 06950fc8ba5a9163ffb838a2bff9933e69255b41 > >> >> 0001-img2-encoder-allow-t-in-filename-based-on-patch-from.patch > >> >> From 11deddfacc595c43a4f542fffe5e90b142e39c85 Mon Sep 17 00:00:00 2001 > >> >> From: rogerdpack > >> >> Date: Mon, 10 Oct 2016 14:50:20 -0600 > >> >> Subject: [PATCH] img2 encoder: allow %t in filename, based on patch > >> >> from > >> >> Yuval > >> >> Adam > >> >> > >> >> Signed-off-by: rogerdpack > >> >> --- > >> >> doc/muxers.texi| 19 --- > >> >> libavformat/avformat.h | 3 ++- > >> >> libavformat/hlsenc.c | 6 +++--- > >> >> libavformat/img2enc.c | 7 +-- > >> >> libavformat/utils.c| 36 > >> >> 5 files changed, 58 insertions(+), 13 deletions(-) > >> >> > >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi > >> >> index 9ec2e31..6fff966 100644 > >> >> --- a/doc/muxers.texi > >> >> +++ b/doc/muxers.texi > >> >> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the > >> >> first filename of > >> >> the file list specified will contain the number 1, all the following > >> >> numbers will be sequential. > >> >> > >> >> +If the pattern contains "%t", the frame's timestamps will be inserted > >> >> +in the filename like "00.00.00.000" for hours, minutes, seconds, > >> >> +and milliseconds. > >> >> + > >> >> +The "%t" and "%d" patterns may be used simultaneously. > >> >> + > >> >> The pattern may contain a suffix which is used to automatically > >> >> determine the format of the image files to write. > >> >> > >> >> @@ -635,7 +641,7 @@ The following example shows how to use > >> >> @command{ffmpeg} for creating a > >> >> sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., > >> >> taking one image every second from the input video: > >> >> @example > >> >> -ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg' > >> >> +ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' > >> >> @end example > >> >> > >> >> Note that with @command{ffmpeg}, if the format is not specified with > >> >> the > >> >> @@ -643,12 +649,12 @@ Note that with @command{ffmpeg}, if the format > >> >> is > >> >> not specified with the > >> >> format, the image2 muxer is automatically selected, so the previous > >> >> command can be written as: > >> >> @example > >> >> -ffmpeg -i in.avi -vsync 1 -r 1 'img-%03d.jpeg' > >> >> +ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg' > >> >> @end example > >> >> > >> >> Note also that the pattern must not necessarily contain "%d" or > >> >> "%0@var{N}d", for example to create a single image file > >> >> -@file{img.jpeg} from the input video you can employ the command: > >> >> +@file{img.jpeg} from the start of the input video you can employ the > >> >> command: > >> >> @example > >> >> ffmpeg -i in.avi -f image2
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On Mon, Oct 24, 2016 at 03:20:14PM -0600, Roger Pack wrote: > On 10/16/16, Michael Niedermayerwrote: > > On Mon, Oct 10, 2016 at 02:56:24PM -0600, Roger Pack wrote: > >> On 9/22/16, Roger Pack wrote: > >> > On 1/4/12, Yuval Adam wrote: > >> >> From: Yuval Adam > >> >> > >> >> The image2 muxer now supports timestamps in output filenames. > >> >> When used in an output patterm '%t' will be replaced with the frames > >> >> timestamp in hours, minutes and seconds (hh:mm:ss). > >> > > >> > A somewhat updated (but not yet cleaned up) revision: > >> > > >> > https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 > >> > > >> > see also https://trac.ffmpeg.org/ticket/1452 > >> > >> OK attached is the "cleaned up" patch, ready for review/commit. > >> > >> how to test: > >> (apply then) run this: > >> > >> ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg > >> and compare filenames with the timestamps from video packets of > >> ffprobe -show_packets. > >> > >> Probably a better way would have been to mix it into > >> av_bprint_strftime however I wasn't sure how to use that within > >> libavformat/utils.c av_get_frame_filename2 > >> > >> Adam's initial patch > >> (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) > >> also deprecated av_get_frame_filename > >> > >> but I wasn't sure if we wanted that here or not so didn't include it. > >> Thank you for your consideration. > >> -roger- > > > >> doc/muxers.texi| 19 --- > >> libavformat/avformat.h |3 ++- > >> libavformat/hlsenc.c |6 +++--- > >> libavformat/img2enc.c |7 +-- > >> libavformat/utils.c| 36 > >> 5 files changed, 58 insertions(+), 13 deletions(-) > >> 06950fc8ba5a9163ffb838a2bff9933e69255b41 > >> 0001-img2-encoder-allow-t-in-filename-based-on-patch-from.patch > >> From 11deddfacc595c43a4f542fffe5e90b142e39c85 Mon Sep 17 00:00:00 2001 > >> From: rogerdpack > >> Date: Mon, 10 Oct 2016 14:50:20 -0600 > >> Subject: [PATCH] img2 encoder: allow %t in filename, based on patch from > >> Yuval > >> Adam > >> > >> Signed-off-by: rogerdpack > >> --- > >> doc/muxers.texi| 19 --- > >> libavformat/avformat.h | 3 ++- > >> libavformat/hlsenc.c | 6 +++--- > >> libavformat/img2enc.c | 7 +-- > >> libavformat/utils.c| 36 > >> 5 files changed, 58 insertions(+), 13 deletions(-) > >> > >> diff --git a/doc/muxers.texi b/doc/muxers.texi > >> index 9ec2e31..6fff966 100644 > >> --- a/doc/muxers.texi > >> +++ b/doc/muxers.texi > >> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the > >> first filename of > >> the file list specified will contain the number 1, all the following > >> numbers will be sequential. > >> > >> +If the pattern contains "%t", the frame's timestamps will be inserted > >> +in the filename like "00.00.00.000" for hours, minutes, seconds, > >> +and milliseconds. > >> + > >> +The "%t" and "%d" patterns may be used simultaneously. > >> + > >> The pattern may contain a suffix which is used to automatically > >> determine the format of the image files to write. > >> > >> @@ -635,7 +641,7 @@ The following example shows how to use > >> @command{ffmpeg} for creating a > >> sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., > >> taking one image every second from the input video: > >> @example > >> -ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg' > >> +ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' > >> @end example > >> > >> Note that with @command{ffmpeg}, if the format is not specified with the > >> @@ -643,12 +649,12 @@ Note that with @command{ffmpeg}, if the format is > >> not specified with the > >> format, the image2 muxer is automatically selected, so the previous > >> command can be written as: > >> @example > >> -ffmpeg -i in.avi -vsync 1 -r 1 'img-%03d.jpeg' > >> +ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg' > >> @end example > >> > >> Note also that the pattern must not necessarily contain "%d" or > >> "%0@var{N}d", for example to create a single image file > >> -@file{img.jpeg} from the input video you can employ the command: > >> +@file{img.jpeg} from the start of the input video you can employ the > >> command: > >> @example > >> ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg > >> @end example > >> @@ -664,6 +670,13 @@ can be used: > >> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 > >> "%Y-%m-%d_%H-%M-%S.jpg" > >> @end example > >> > >> +The following example uses the timestamp parameter to generate one > >> +image file per video frame from the input, and name it including its > >> original > >> +timestamp. > >> +@example > >> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg > >> +@end example > >> + > >>
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 10/16/16, Michael Niedermayerwrote: > On Mon, Oct 10, 2016 at 02:56:24PM -0600, Roger Pack wrote: >> On 9/22/16, Roger Pack wrote: >> > On 1/4/12, Yuval Adam wrote: >> >> From: Yuval Adam >> >> >> >> The image2 muxer now supports timestamps in output filenames. >> >> When used in an output patterm '%t' will be replaced with the frames >> >> timestamp in hours, minutes and seconds (hh:mm:ss). >> > >> > A somewhat updated (but not yet cleaned up) revision: >> > >> > https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 >> > >> > see also https://trac.ffmpeg.org/ticket/1452 >> >> OK attached is the "cleaned up" patch, ready for review/commit. >> >> how to test: >> (apply then) run this: >> >> ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg >> and compare filenames with the timestamps from video packets of >> ffprobe -show_packets. >> >> Probably a better way would have been to mix it into >> av_bprint_strftime however I wasn't sure how to use that within >> libavformat/utils.c av_get_frame_filename2 >> >> Adam's initial patch >> (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) >> also deprecated av_get_frame_filename >> >> but I wasn't sure if we wanted that here or not so didn't include it. >> Thank you for your consideration. >> -roger- > >> doc/muxers.texi| 19 --- >> libavformat/avformat.h |3 ++- >> libavformat/hlsenc.c |6 +++--- >> libavformat/img2enc.c |7 +-- >> libavformat/utils.c| 36 >> 5 files changed, 58 insertions(+), 13 deletions(-) >> 06950fc8ba5a9163ffb838a2bff9933e69255b41 >> 0001-img2-encoder-allow-t-in-filename-based-on-patch-from.patch >> From 11deddfacc595c43a4f542fffe5e90b142e39c85 Mon Sep 17 00:00:00 2001 >> From: rogerdpack >> Date: Mon, 10 Oct 2016 14:50:20 -0600 >> Subject: [PATCH] img2 encoder: allow %t in filename, based on patch from >> Yuval >> Adam >> >> Signed-off-by: rogerdpack >> --- >> doc/muxers.texi| 19 --- >> libavformat/avformat.h | 3 ++- >> libavformat/hlsenc.c | 6 +++--- >> libavformat/img2enc.c | 7 +-- >> libavformat/utils.c| 36 >> 5 files changed, 58 insertions(+), 13 deletions(-) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 9ec2e31..6fff966 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the >> first filename of >> the file list specified will contain the number 1, all the following >> numbers will be sequential. >> >> +If the pattern contains "%t", the frame's timestamps will be inserted >> +in the filename like "00.00.00.000" for hours, minutes, seconds, >> +and milliseconds. >> + >> +The "%t" and "%d" patterns may be used simultaneously. >> + >> The pattern may contain a suffix which is used to automatically >> determine the format of the image files to write. >> >> @@ -635,7 +641,7 @@ The following example shows how to use >> @command{ffmpeg} for creating a >> sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., >> taking one image every second from the input video: >> @example >> -ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg' >> +ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' >> @end example >> >> Note that with @command{ffmpeg}, if the format is not specified with the >> @@ -643,12 +649,12 @@ Note that with @command{ffmpeg}, if the format is >> not specified with the >> format, the image2 muxer is automatically selected, so the previous >> command can be written as: >> @example >> -ffmpeg -i in.avi -vsync 1 -r 1 'img-%03d.jpeg' >> +ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg' >> @end example >> >> Note also that the pattern must not necessarily contain "%d" or >> "%0@var{N}d", for example to create a single image file >> -@file{img.jpeg} from the input video you can employ the command: >> +@file{img.jpeg} from the start of the input video you can employ the >> command: >> @example >> ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg >> @end example >> @@ -664,6 +670,13 @@ can be used: >> ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 >> "%Y-%m-%d_%H-%M-%S.jpg" >> @end example >> >> +The following example uses the timestamp parameter to generate one >> +image file per video frame from the input, and name it including its >> original >> +timestamp. >> +@example >> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg >> +@end example >> + >> @subsection Options >> >> @table @option >> diff --git a/libavformat/avformat.h b/libavformat/avformat.h >> index 057f8c5..4eeb6f4 100644 >> --- a/libavformat/avformat.h >> +++ b/libavformat/avformat.h >> @@ -2744,10 +2744,11 @@ void av_dump_format(AVFormatContext *ic, >> * @param path numbered sequence
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On Mon, Oct 10, 2016 at 02:56:24PM -0600, Roger Pack wrote: > On 9/22/16, Roger Packwrote: > > On 1/4/12, Yuval Adam wrote: > >> From: Yuval Adam > >> > >> The image2 muxer now supports timestamps in output filenames. > >> When used in an output patterm '%t' will be replaced with the frames > >> timestamp in hours, minutes and seconds (hh:mm:ss). > > > > A somewhat updated (but not yet cleaned up) revision: > > > > https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 > > > > see also https://trac.ffmpeg.org/ticket/1452 > > OK attached is the "cleaned up" patch, ready for review/commit. > > how to test: > (apply then) run this: > > ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg > and compare filenames with the timestamps from video packets of > ffprobe -show_packets. > > Probably a better way would have been to mix it into > av_bprint_strftime however I wasn't sure how to use that within > libavformat/utils.c av_get_frame_filename2 > > Adam's initial patch > (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) > also deprecated av_get_frame_filename > > but I wasn't sure if we wanted that here or not so didn't include it. > Thank you for your consideration. > -roger- > doc/muxers.texi| 19 --- > libavformat/avformat.h |3 ++- > libavformat/hlsenc.c |6 +++--- > libavformat/img2enc.c |7 +-- > libavformat/utils.c| 36 > 5 files changed, 58 insertions(+), 13 deletions(-) > 06950fc8ba5a9163ffb838a2bff9933e69255b41 > 0001-img2-encoder-allow-t-in-filename-based-on-patch-from.patch > From 11deddfacc595c43a4f542fffe5e90b142e39c85 Mon Sep 17 00:00:00 2001 > From: rogerdpack > Date: Mon, 10 Oct 2016 14:50:20 -0600 > Subject: [PATCH] img2 encoder: allow %t in filename, based on patch from Yuval > Adam > > Signed-off-by: rogerdpack > --- > doc/muxers.texi| 19 --- > libavformat/avformat.h | 3 ++- > libavformat/hlsenc.c | 6 +++--- > libavformat/img2enc.c | 7 +-- > libavformat/utils.c| 36 > 5 files changed, 58 insertions(+), 13 deletions(-) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 9ec2e31..6fff966 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -619,6 +619,12 @@ If the pattern contains "%d" or "%0@var{N}d", the first > filename of > the file list specified will contain the number 1, all the following > numbers will be sequential. > > +If the pattern contains "%t", the frame's timestamps will be inserted > +in the filename like "00.00.00.000" for hours, minutes, seconds, > +and milliseconds. > + > +The "%t" and "%d" patterns may be used simultaneously. > + > The pattern may contain a suffix which is used to automatically > determine the format of the image files to write. > > @@ -635,7 +641,7 @@ The following example shows how to use @command{ffmpeg} > for creating a > sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., > taking one image every second from the input video: > @example > -ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg' > +ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' > @end example > > Note that with @command{ffmpeg}, if the format is not specified with the > @@ -643,12 +649,12 @@ Note that with @command{ffmpeg}, if the format is not > specified with the > format, the image2 muxer is automatically selected, so the previous > command can be written as: > @example > -ffmpeg -i in.avi -vsync 1 -r 1 'img-%03d.jpeg' > +ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg' > @end example > > Note also that the pattern must not necessarily contain "%d" or > "%0@var{N}d", for example to create a single image file > -@file{img.jpeg} from the input video you can employ the command: > +@file{img.jpeg} from the start of the input video you can employ the command: > @example > ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg > @end example > @@ -664,6 +670,13 @@ can be used: > ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 > "%Y-%m-%d_%H-%M-%S.jpg" > @end example > > +The following example uses the timestamp parameter to generate one > +image file per video frame from the input, and name it including its original > +timestamp. > +@example > +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg > +@end example > + > @subsection Options > > @table @option > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > index 057f8c5..4eeb6f4 100644 > --- a/libavformat/avformat.h > +++ b/libavformat/avformat.h > @@ -2744,10 +2744,11 @@ void av_dump_format(AVFormatContext *ic, > * @param path numbered sequence string > * @param number frame number > * @param flags AV_FRAME_FILENAME_FLAGS_* > + * @param ts frame timestamp in AV_TIME_BASE fractional seconds. > * @return 0 if
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 10/10/16, Roger Packwrote: > On 9/22/16, Roger Pack wrote: >> On 1/4/12, Yuval Adam wrote: >>> From: Yuval Adam >>> >>> The image2 muxer now supports timestamps in output filenames. >>> When used in an output patterm '%t' will be replaced with the frames >>> timestamp in hours, minutes and seconds (hh:mm:ss). >> >> A somewhat updated (but not yet cleaned up) revision: >> >> https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 >> >> see also https://trac.ffmpeg.org/ticket/1452 > > OK attached is the "cleaned up" patch, ready for review/commit. > > how to test: > (apply then) run this: > > ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg > and compare filenames with the timestamps from video packets of > ffprobe -show_packets. > > Probably a better way would have been to mix it into > av_bprint_strftime however I wasn't sure how to use that within > libavformat/utils.c av_get_frame_filename2 > > Adam's initial patch > (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) > also deprecated av_get_frame_filename > > but I wasn't sure if we wanted that here or not so didn't include it. > Thank you for your consideration. bump (this last one is cleaned up enough to be considered for merge please...). -roger- ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 9/22/16, Roger Packwrote: > On 1/4/12, Yuval Adam wrote: >> From: Yuval Adam >> >> The image2 muxer now supports timestamps in output filenames. >> When used in an output patterm '%t' will be replaced with the frames >> timestamp in hours, minutes and seconds (hh:mm:ss). > > A somewhat updated (but not yet cleaned up) revision: > > https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 > > see also https://trac.ffmpeg.org/ticket/1452 OK attached is the "cleaned up" patch, ready for review/commit. how to test: (apply then) run this: ./ffmpeg -i input -copyts -vsync vfr temp/abc-%d-%t.jpeg and compare filenames with the timestamps from video packets of ffprobe -show_packets. Probably a better way would have been to mix it into av_bprint_strftime however I wasn't sure how to use that within libavformat/utils.c av_get_frame_filename2 Adam's initial patch (https://github.com/yuvadm/FFmpeg/commit/0eb002821a2076cb3593c823399aeef9fdd29525) also deprecated av_get_frame_filename but I wasn't sure if we wanted that here or not so didn't include it. Thank you for your consideration. -roger- 0001-img2-encoder-allow-t-in-filename-based-on-patch-from.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern
On 1/4/12, Yuval Adamwrote: > From: Yuval Adam > > The image2 muxer now supports timestamps in output filenames. > When used in an output patterm '%t' will be replaced with the frames > timestamp in hours, minutes and seconds (hh:mm:ss). A somewhat updated (but not yet cleaned up) revision: https://gist.github.com/rdp/e518616f2a702367ae5a922b56e09e04 see also https://trac.ffmpeg.org/ticket/1452 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel