আমি এফএফএমপিএগ দিয়ে এভিআই থেকে হুবহু ফ্রেমগুলি কেটে ফেলতে পারি


1

আমি ফ্রেম কাটতে নীচের কমান্ডটি ব্যবহার করি। আমি আমার ভিডিওটির জন্য 48 ফ্রেম চাই যা 7 সেকেন্ড।

ffmpeg -i output.avi -r 6.4 -s sxga images\\image%d.jpeg

এটি আমার ফ্রেম তৈরি করে তবে আমি এটি বিভিন্ন ভিডিওর সাথে ব্যবহার করছিলাম এবং এটি আমাকে বিভিন্ন ফলাফল দেয়। আউটপুট.ইভিটি 7 সেকেন্ড তবে এটি আমাকে সন্নিবেশ করানো আউটপুট ভিডিওর উপর নির্ভর করে 46 - 50 ফ্রেম দেয়।

প্রথম ভিডিওর জন্য কমান্ড লাইনের আউটপুট হল:

>ffmpeg -i "only7s.avi" -r 6.4 -s sxga images\\image%d.jpeg
ffmpeg version N-62121-g634636e Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr  3 2014 23:30:16 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable
-zlib
  libavutil      52. 73.100 / 52. 73.100
  libavcodec     55. 56.107 / 55. 56.107
  libavformat    55. 36.101 / 55. 36.101
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, avi, from 'only7s.avi':
  Metadata:
    encoder         : Lavf55.36.101
  Duration: 00:00:07.04, start: 0.000000, bitrate: 4890 kb/s
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p, 1024x768, 4924
 kb/s, 30 fps, 30 tbr, 30 tbn, 59.99 tbc
    Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, fltp, 1
28 kb/s
[swscaler @ 0358bec0] deprecated pixel format used, make sure you did set range
correctly
Output #0, image2, to 'images\\image%d.jpeg':
  Metadata:
    encoder         : Lavf55.36.101
    Stream #0:0: Video: mjpeg, yuvj420p, 1280x1024, q=2-31, 200 kb/s, 90k tbn, 6
.40 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
*** dropping frame 8 from stream 0 at ts 5
*** dropping frame 9 from stream 0 at ts 6
    Last message repeated 3 times
*** dropping frame 10 from stream 0 at ts 7
    Last message repeated 3 times
frame=   11 fps=0.0 q=22.7 size=N/A time=00:00:01.71 bitrate=N/A dup=4 drop=9
*** dropping frame 11 from stream 0 at ts 8
    Last message repeated 2 times
*** dropping frame 12 from stream 0 at ts 9
    Last message repeated 3 times
*** dropping frame 13 from stream 0 at ts 10
    Last message repeated 3 times
*** dropping frame 14 from stream 0 at ts 11
    Last message repeated 1 times
*** dropping frame 15 from stream 0 at ts 12
*** dropping frame 16 from stream 0 at ts 13
    Last message repeated 1 times
*** dropping frame 17 from stream 0 at ts 14
*** dropping frame 18 from stream 0 at ts 15
frame=   19 fps= 18 q=24.8 size=N/A time=00:00:02.96 bitrate=N/A dup=4 drop=27
*** dropping frame 19 from stream 0 at ts 16
    Last message repeated 1 times
*** dropping frame 20 from stream 0 at ts 17
*** dropping frame 21 from stream 0 at ts 18
*** dropping frame 22 from stream 0 at ts 19
    Last message repeated 1 times
*** dropping frame 23 from stream 0 at ts 20
*** dropping frame 24 from stream 0 at ts 21
frame=   24 fps= 15 q=24.8 size=N/A time=00:00:03.75 bitrate=N/A dup=4 drop=35
*** dropping frame 25 from stream 0 at ts 22
    Last message repeated 1 times
*** dropping frame 26 from stream 0 at ts 23
*** dropping frame 27 from stream 0 at ts 24
*** dropping frame 28 from stream 0 at ts 25
    Last message repeated 1 times
*** dropping frame 29 from stream 0 at ts 26
*** dropping frame 30 from stream 0 at ts 27
*** dropping frame 31 from stream 0 at ts 28
frame=   31 fps= 15 q=24.8 size=N/A time=00:00:04.84 bitrate=N/A dup=4 drop=44
*** dropping frame 31 from stream 0 at ts 28
*** dropping frame 32 from stream 0 at ts 29
*** dropping frame 33 from stream 0 at ts 30
*** dropping frame 34 from stream 0 at ts 31
    Last message repeated 1 times
*** dropping frame 35 from stream 0 at ts 32
*** dropping frame 36 from stream 0 at ts 33
    Last message repeated 1 times
frame=   37 fps= 14 q=24.8 size=N/A time=00:00:05.78 bitrate=N/A dup=4 drop=52
*** dropping frame 37 from stream 0 at ts 34
*** dropping frame 38 from stream 0 at ts 35
*** dropping frame 39 from stream 0 at ts 36
    Last message repeated 1 times
*** dropping frame 40 from stream 0 at ts 37
*** dropping frame 41 from stream 0 at ts 38
*** dropping frame 42 from stream 0 at ts 39
    Last message repeated 1 times
frame=   43 fps= 14 q=24.8 size=N/A time=00:00:06.71 bitrate=N/A dup=4 drop=60
*** dropping frame 43 from stream 0 at ts 40
*** dropping frame 44 from stream 0 at ts 41
*** dropping frame 45 from stream 0 at ts 42
    Last message repeated 1 times
*** dropping frame 46 from stream 0 at ts 43
*** dropping frame 47 from stream 0 at ts 44
frame=   47 fps= 13 q=24.8 Lsize=N/A time=00:00:07.34 bitrate=N/A dup=4 drop=66

video:2537kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 709977824034816.000000%

দ্বিতীয় ভিডিওর জন্য কমান্ড লাইনের আউটপুট হল:

>ffmpeg -i "C:\ArtWedding\bin\x86\Debug\flipvideo\video180327.avi" -r 6.4 -s sxg
a images\\image%d.jpeg
ffmpeg version N-62121-g634636e Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr  3 2014 23:30:16 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable
-zlib
  libavutil      52. 73.100 / 52. 73.100
  libavcodec     55. 56.107 / 55. 56.107
  libavformat    55. 36.101 / 55. 36.101
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, avi, from 'C:\ArtWedding\bin\x86\Debug\flipvideo\video180327.avi':
  Metadata:
    encoder         : Lavf55.36.101
  Duration: 00:00:07.47, start: 0.000000, bitrate: 128364 kb/s
    Stream #0:0: Video: rawvideo, bgr24, 640x480, 128928 kb/s, 30 tbr, 30 tbn, 3
0 tbc
[swscaler @ 029adf40] deprecated pixel format used, make sure you did set range
correctly
Output #0, image2, to 'images\\image%d.jpeg':
  Metadata:
    encoder         : Lavf55.36.101
    Stream #0:0: Video: mjpeg, yuvj444p, 1280x1024, q=2-31, 200 kb/s, 90k tbn, 6
.40 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mjpeg)
Press [q] to stop, [?] for help
*** dropping frame 10 from stream 0 at ts 7
frame=   10 fps=0.0 q=19.9 size=N/A time=00:00:01.56 bitrate=N/A dup=1 drop=1
*** dropping frame 10 from stream 0 at ts 7
*** dropping frame 11 from stream 0 at ts 8
    Last message repeated 2 times
*** dropping frame 12 from stream 0 at ts 9
*** dropping frame 13 from stream 0 at ts 10
    Last message repeated 1 times
*** dropping frame 14 from stream 0 at ts 11
*** dropping frame 15 from stream 0 at ts 12
frame=   16 fps= 16 q=24.8 size=N/A time=00:00:02.50 bitrate=N/A dup=1 drop=10
*** dropping frame 16 from stream 0 at ts 13
*** dropping frame 17 from stream 0 at ts 14
    Last message repeated 2 times
*** dropping frame 18 from stream 0 at ts 15
    Last message repeated 3 times
*** dropping frame 19 from stream 0 at ts 16
*** dropping frame 21 from stream 0 at ts 18
frame=   21 fps= 14 q=24.8 size=N/A time=00:00:03.28 bitrate=N/A dup=1 drop=20
*** dropping frame 23 from stream 0 at ts 20
*** dropping frame 24 from stream 0 at ts 21
*** dropping frame 25 from stream 0 at ts 22
*** dropping frame 27 from stream 0 at ts 24
frame=   28 fps= 14 q=24.8 size=N/A time=00:00:04.37 bitrate=N/A dup=1 drop=24
*** dropping frame 29 from stream 0 at ts 26
*** dropping frame 31 from stream 0 at ts 28
*** dropping frame 33 from stream 0 at ts 30
*** dropping frame 34 from stream 0 at ts 31
    Last message repeated 2 times
frame=   34 fps= 13 q=24.8 size=N/A time=00:00:05.31 bitrate=N/A dup=1 drop=30
*** dropping frame 35 from stream 0 at ts 32
    Last message repeated 1 times
*** dropping frame 36 from stream 0 at ts 33
    Last message repeated 3 times
*** dropping frame 37 from stream 0 at ts 34
    Last message repeated 2 times
*** dropping frame 38 from stream 0 at ts 35
    Last message repeated 3 times
frame=   39 fps= 13 q=24.8 size=N/A time=00:00:06.09 bitrate=N/A dup=1 drop=43
*** dropping frame 39 from stream 0 at ts 36
    Last message repeated 3 times
*** dropping frame 40 from stream 0 at ts 37
    Last message repeated 2 times
*** dropping frame 41 from stream 0 at ts 38
    Last message repeated 2 times
*** dropping frame 42 from stream 0 at ts 39
    Last message repeated 1 times
*** dropping frame 43 from stream 0 at ts 40
frame=   43 fps= 12 q=24.8 size=N/A time=00:00:06.71 bitrate=N/A dup=1 drop=56
*** dropping frame 44 from stream 0 at ts 41
    Last message repeated 3 times
*** dropping frame 45 from stream 0 at ts 42
    Last message repeated 3 times
*** dropping frame 46 from stream 0 at ts 43
    Last message repeated 2 times
*** dropping frame 47 from stream 0 at ts 44
    Last message repeated 2 times
frame=   47 fps= 11 q=24.8 size=N/A time=00:00:07.34 bitrate=N/A dup=1 drop=70
*** dropping frame 48 from stream 0 at ts 45
    Last message repeated 2 times
*** dropping frame 49 from stream 0 at ts 46
    Last message repeated 2 times
*** dropping frame 50 from stream 0 at ts 47
    Last message repeated 1 times
frame=   50 fps= 11 q=24.8 size=N/A time=00:00:07.81 bitrate=N/A dup=1 drop=78
*** dropping frame 50 from stream 0 at ts 47
    Last message repeated 1 times
frame=   51 fps= 11 q=24.8 Lsize=N/A time=00:00:07.96 bitrate=N/A dup=1 drop=80

video:4415kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 407988875558912.000000%

দুটি পৃথক ক্ষেত্রে সম্পূর্ণ কমান্ড লাইন আউটপুট অন্তর্ভুক্ত করুন। আপনার যদি ভিডিওর নমুনা থাকে তবে এটি আরও ভাল।
slhck

আমি এটি সম্পাদনা। এবং আমি উভয় ভিডিওর ফলাফল লিখেছি।
নিকনাম

একটি 7.04 সেকেন্ড এবং অন্যটি 07.47 সেকেন্ড। অবশ্যই আপনি আউটপুট হিসাবে বিভিন্ন সংখ্যা ফ্রেম পাবেন। আপনি যদি ffmpeg নির্দিষ্ট নম্বর ফ্রেম লিখতে চান তবে -frames:v 48বিকল্পটি যুক্ত করুন , উদাহরণস্বরূপ। এটি আপনার যা প্রয়োজন তা অর্জন করে?
slhck

শুধুমাত্র দ্বিতীয় এক। প্রথমে 47 টি ফ্রেম তৈরি করে। এটি 48 তৈরি করে না
নিকনেম

কারণ 47 তম ফ্রেমটি ইতিমধ্যে মোট সময়সীমার বাইরে, সুতরাং এটি তৈরি করতে পারে এমন 48 তম ফ্রেম নেই। এই ক্ষেত্রে আপনার অন্য ফ্রেমরেট ব্যবহার করার প্রয়োজন হতে পারে যাতে এটি "প্রসারিত" করতে সক্ষম হয়।
slhck
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.