Re: [FFmpeg-user] 'incorrect' number of extracted frames in a non-VFR video

2021-08-12 Thread Jon Beyer
> A quick calculation gave me the impression that the number of decoded
frames mostly matches the expectation ((8x60+9.5)x3/1001) - what did
you calculate?

Thanks for the reply Carl, and I apologize.  I had pasted two commands that
used slightly different files.

We had an 'original' file from the old hardware.  That video was supposedly
26:10.77, as reported by ffmpeg and VLC.  When we tried to extract jpegs
from that video, we ended up with 14,671 frames or ~ 8 minutes of video at
29.97 fps.  If we scaled the original video, we also ended up with ~ 8
minutes of video.

So I was trying to figure out how we were only getting 14,671 frames at
29.97 fps from 26 minutes of video.

I see now that the original is definitely corrupted.  If I let it play
through in VLC, there are times where the timestamp jumps a full 3 minutes
ahead.

So I think this isn't an issue with ffmpeg or ffprobe, and simply a
corrupted video whose file implies there is 26 minutes of video, when there
is only 8 minutes.

Thanks,
Jon
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] 'incorrect' number of extracted frames in a non-VFR video

2021-08-11 Thread Carl Eugen Hoyos



> Am 11.08.2021 um 03:35 schrieb Jon Beyer :
> 
> I have a video that is supposedly not VFR (ffmpeg vfrdet command and output
> pasted at the very bottom), but the number of extracted frames, or
> frame count with ffprobe, doesn't match what would be expected based on
> frame rate and duration by a large margin (off by a factor of nearly 3x).

A quick calculation gave me the impression that the number of decoded frames 
mostly matches the expectation ((8x60+9.5)x3/1001) - what did you calculate?

Carl Eugen 
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] 'incorrect' number of extracted frames in a non-VFR video

2021-08-10 Thread Jon Beyer
I have a video that is supposedly not VFR (ffmpeg vfrdet command and output
pasted at the very bottom), but the number of extracted frames, or
frame count with ffprobe, doesn't match what would be expected based on
frame rate and duration by a large margin (off by a factor of nearly 3x).
Please note that this video comes from an older camera, and could well be
corrupted.

If I try to force a frame rate with the following, I still have an
incorrect number of frames.  Any ideas on how I can force the video to
29.97 and actually extract the number of frames that would be correct for a
CFR video of that duration and fps?


./ffmpeg -i 0578ad6d7c6e.original.mp4 -r 3/1001 -vsync 2 -qscale 1
0578ad6d7c6e_img/%d.jpg
ffmpeg version N-103117-g1f58503013-tessus
https://evermeet.cx/ffmpeg/  Copyright
(c) 2000-2021 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
--enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
--enable-libfreetype --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg
--enable-libopus --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvmaf
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3
--pkg-config-flags=--static --disable-ffplay
  libavutil  57.  3.100 / 57.  3.100
  libavcodec 59.  3.102 / 59.  3.102
  libavformat59.  4.101 / 59.  4.101
  libavdevice59.  0.100 / 59.  0.100
  libavfilter 8.  1.103 /  8.  1.103
  libswscale  6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc56.  0.100 / 56.  0.100
Input #0, mpeg, from '0578ad6d7c6e.original.mp4':
  Duration: 00:26:10.77, start: 0.218556, bitrate: 789 kb/s
  Stream #0:0[0x1bf]: Data: dvd_nav_packet
  Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, smpte170m, top
first), 480x480 [SAR 4:3 DAR 4:3], Closed Captions, 29.97 fps, 29.97 tbr,
90k tbn
Side data:
  cpb: bitrate max/min/avg: 2252800/0/0 buffer size: 1835008 vbv_delay:
N/A
  Stream #0:2[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
Please use -q:a or -q:v, -qscale is ambiguous
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7fcc30008000] deprecated pixel format used, make sure you did
set range correctly
Output #0, image2, to '0578ad6d7c6e_img/%d.jpg':
  Metadata:
encoder : Lavf59.4.101
  Stream #0:0: Video: mjpeg, yuvj420p(pc, smpte170m, top first), 480x480
[SAR 4:3 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn
Metadata:
  encoder : Lavc59.3.102 mjpeg
Side data:
  cpb: bitrate max/min/avg: 0/0/20 buffer size: 0 vbv_delay: N/A
[mpeg2video @ 0x7fcc6f417200] ac-tex damaged at 25 26bitrate=N/A speed=  43x
[mpeg2video @ 0x7fcc6f417200] Warning MVs not available
[mpeg2video @ 0x7fcc6f417200] concealing 120 DC, 120 AC, 120 MV errors in I
frame
0578ad6d7c6e.original.mp4: corrupt decoded frame in stream 1
frame=14671 fps=1294 q=1.0 Lsize=N/A time=00:08:09.52 bitrate=N/A
speed=43.2x
video:235031kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown


> ./ffmpeg -i 0578ad6d7c6e.mp4 -vf vfrdet -an -f null -

ffmpeg version N-103117-g1f58503013-tessus
https://evermeet.cx/ffmpeg/  Copyright
(c) 2000-2021 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
--enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
--enable-libfreetype --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg
--enable-libopus --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvmaf
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3
--pkg-config-flags=--static --disable-ffplay
  libavutil  57.  3.100 / 57.  3.100
  libavcodec 59.  3.102 / 59.  3.102
  libavformat59.  4.101 / 59.  4.101
  libavdevice59.  0.100 / 59.  0.100
  libavfilter 8.  1.103 /  8.  1.103
  libswscale  6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc