Query

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Query

Hari Babu Muga
Hello,

My name is Hari Babu Muga. I am Machine Learning engineer at Quantiphi
Analytics. I am using ffmpeg for resizing and extracting the frames from
the videos. In this process I got some queries about the process logic of
ffmpeg.

When I read a video for knowing the total number of frames present in it,
ffmpeg gives me 'x' count but when I actually extracted the frames using
ffmpeg, it gave me 'x+3' frames. and the additional number of frames that
are coming are variable with respect to the format of the video. Kindly
tell me why this is happening.

If ffmpeg is creating duplicate frames while extracting frames from video,
please tell me whether its creating duplicate frames at random time stamps
or at the end of the video.

Thanks!!

--
_This message contains information that may be privileged or confidential
and is the property of the Quantiphi Inc and/or its affiliates_. It is
intended only for the person to whom it is addressed. _If you are not the
intended recipient, any review, dissemination, distribution, copying,
storage or other use of all or any portion of this message is strictly
prohibited. If you received this message in error, please immediately
notify the sender by reply e-mail and delete this message in its 
*entirety*___
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Query

Carl Zwanzig
On 1/8/2019 1:15 AM, Hari Babu Muga wrote:
> When I read a video for knowing the total number of frames present in it,
> ffmpeg gives me 'x' count but when I actually extracted the frames using
> ffmpeg, it gave me 'x+3' frames. and the additional number of frames that
> are coming are variable with respect to the format of the video. Kindly
> tell me why this is happening.

Hard to tell much without the complete command line you're using, please
include that.

Regarding formats- if you're pulling from a lossy format, such as mpeg, and
the selected frame isn't a "B" frame, you may get the extras. What's the
export format? video or image?

Later,

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Query

Hari Babu Muga
Thanks for the earliest reply!!

The following are the commands that I used for different operations.

1) For extracting all frames from the video:
ffmpeg -i video.mpg frames/frame%06d.jpg

2) For extracting resized all frames from the video:
ffmpeg -i video.mpg -vf scale=640:-2 frames/frame%06d.jpg

3) For reading total number of frames in a video:
ffprobe -v error -count_frames -select_streams v:0 -show_entries
stream=nb_read_frames video.mpg

Input format of the videos that I am using are: mpg, mp4, mov, flv
Output formats are: mp4 for video and jpg for an image.

Thanks!!

On Tue, Jan 8, 2019 at 10:07 PM Carl Zwanzig <[hidden email]> wrote:

> On 1/8/2019 1:15 AM, Hari Babu Muga wrote:
> > When I read a video for knowing the total number of frames present in it,
> > ffmpeg gives me 'x' count but when I actually extracted the frames using
> > ffmpeg, it gave me 'x+3' frames. and the additional number of frames that
> > are coming are variable with respect to the format of the video. Kindly
> > tell me why this is happening.
>
> Hard to tell much without the complete command line you're using, please
> include that.
>
> Regarding formats- if you're pulling from a lossy format, such as mpeg,
> and
> the selected frame isn't a "B" frame, you may get the extras. What's the
> export format? video or image?
>
> Later,
>
> z!
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

--
_This message contains information that may be privileged or confidential
and is the property of the Quantiphi Inc and/or its affiliates_. It is
intended only for the person to whom it is addressed. _If you are not the
intended recipient, any review, dissemination, distribution, copying,
storage or other use of all or any portion of this message is strictly
prohibited. If you received this message in error, please immediately
notify the sender by reply e-mail and delete this message in its 
*entirety*___
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Query

Carl Eugen Hoyos-2
2019-01-09 10:32 GMT+01:00, Hari Babu Muga <[hidden email]>:

> The following are the commands that I used for different operations.
>
> 1) For extracting all frames from the video:
> ffmpeg -i video.mpg frames/frame%06d.jpg

Please add the complete, uncut console output.

> 2) For extracting resized all frames from the video:
> ffmpeg -i video.mpg -vf scale=640:-2 frames/frame%06d.jpg
>
> 3) For reading total number of frames in a video:
> ffprobe -v error -count_frames -select_streams v:0 -show_entries
> stream=nb_read_frames video.mpg

This may not be the ideal command.

> _This message contains information that may be
> privileged or confidential

Please remove this from emails sent to a public
mailing list.

Please find out what top-posting means and avoid it here.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".