Is SD and HD 422 Video Capture obtainable with V4L(2)?
With reference to Adam Wilt: https://www.adamwilt.com/DV-FAQ-editing.html#transcoding
I-frame-only MPEG-2 is said to be comparable to DV format compression at the same bit rate. Thus 25 megabit MPEG-2 should yield results (and transcoding errors) similar to DV, and 50 Megabit MPEG-2 should be comparable to DV50.
MPEG-2 at 25 Megabits should be roughly comparable to DV, though its 4:2:2 color sampling may be more beneficial for graphics. Are 25 Mbps MPEG-2's benefits worth the transcoding hit coming from DV? It's arguable: I've been comparing DV25 and MPEG-2 25Mbit, and can't say I see a huge difference one way or the other. Both have their artifacts, and their tradeoffs.
DV50 or MPEG-2 at 50 Megabits will be clearly superior in quality to DV, albeit at twice the data rate (think about the disk space and disk speed necessary). Indeed, if you're originating on DV50 (D-9, DVCPRO50) there's no reason to go with anything other than a DV50 NLE, using SDTI in place of 1394 for the transfer. The only way up from DV50, practically speaking, is to to go totally uncompressed -- and nowadays, that's increasingly viable, what with fast disks and inexpensive arrays. ====================
As I already pointed on in another thread, a solution to capture Hi8 to SD DV50 in 4:2:2 format was possible already 10 years ago https://lists.cinelerra-gg.org/pipermail/cin/2021-December/004308.html In a more recent thread here, Andrew mentioned a hdmi capture card (with v4l2) https://www.mail-archive.com/[email protected]/msg02865.html =================== Therefore I wonder if we, CinGG users and devs, are able to setup and test a recommended capture solution (w/card and guide) for SD and HD video in 4:2:2 colorspace, preferably using free drivers and tools like V4L/V4L2 and FFMpeg? https://en.wikipedia.org/wiki/Video4Linux https://www.linuxtv.org/wiki/index.php/V4L_capturing Terje J. H
On Thursday, December 16, 2021, Terje J. Hanssen via Cin < [email protected]> wrote:
With reference to Adam Wilt: https://www.adamwilt.com/DV-FAQ-editing.html#transcoding
I-frame-only MPEG-2 is said to be comparable to DV format compression at the same bit rate. Thus 25 megabit MPEG-2 should yield results (and transcoding errors) similar to DV, and 50 Megabit MPEG-2 should be comparable to DV50.
MPEG-2 at 25 Megabits should be roughly comparable to DV, though its 4:2:2 color sampling may be more beneficial for graphics. Are 25 Mbps MPEG-2's benefits worth the transcoding hit coming from DV? It's arguable: I've been comparing DV25 and MPEG-2 25Mbit, and can't say I see a huge difference one way or the other. Both have their artifacts, and their tradeoffs.
DV50 or MPEG-2 at 50 Megabits will be clearly superior in quality to DV, albeit at twice the data rate (think about the disk space and disk speed necessary). Indeed, if you're originating on DV50 (D-9, DVCPRO50) there's no reason to go with anything other than a DV50 NLE, using SDTI in place of 1394 for the transfer. The only way up from DV50, practically speaking, is to to go totally uncompressed -- and nowadays, that's increasingly viable, what with fast disks and inexpensive arrays.
====================
As I already pointed on in another thread, a solution to capture Hi8 to SD DV50 in 4:2:2 format was possible already 10 years ago https://lists.cinelerra-gg.org/pipermail/cin/2021-December/004308.html
In a more recent thread here, Andrew mentioned a hdmi capture card (with v4l2) https://www.mail-archive.com/[email protected]/msg02865.html ===================
Therefore I wonder if we, CinGG users and devs, are able to setup and test a recommended capture solution (w/card and guide) for SD and HD video in 4:2:2 colorspace, preferably using free drivers and tools like V4L/V4L2 and FFMpeg? https://en.wikipedia.org/wiki/Video4Linux https://www.linuxtv.org/wiki/index.php/V4L_capturing
I think I personally will be away from my desktop machine for few more months.. Terje, you already subscribed to ffmpeg-users, may be forward your call for testing to this list too? I was think about one specific Youtuber https://www.youtube.com/user/renerebe he does have quite a bit of exotic/non-x86 hw, so may be he will be able to get capture card(s) we talked about and even compile Cin on some non-x86 devices and/or test our BD output on Playstation 3 :-)
Terje J. H
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Den 16.12.2021 20:08, skrev Andrew Randrianasulu:
On Thursday, December 16, 2021, Terje J. Hanssen via Cin <[email protected]> wrote:
[......]
As I already pointed on in another thread, a solution to capture Hi8 to SD DV50 in 4:2:2 format was possible already 10 years ago https://lists.cinelerra-gg.org/pipermail/cin/2021-December/004308.html <https://lists.cinelerra-gg.org/pipermail/cin/2021-December/004308.html>
In a more recent thread here, Andrew mentioned a hdmi capture card (with v4l2) https://www.mail-archive.com/[email protected]/msg02865.html <https://www.mail-archive.com/[email protected]/msg02865.html> ===================
Therefore I wonder if we, CinGG users and devs, are able to setup and test a recommended capture solution (w/card and guide) for SD and HD video in 4:2:2 colorspace, preferably using free drivers and tools like V4L/V4L2 and FFMpeg? https://en.wikipedia.org/wiki/Video4Linux <https://en.wikipedia.org/wiki/Video4Linux> https://www.linuxtv.org/wiki/index.php/V4L_capturing <https://www.linuxtv.org/wiki/index.php/V4L_capturing>
I think I personally will be away from my desktop machine for few more months..
Terje, you already subscribed to ffmpeg-users, may be forward your call for testing to this list too?
I was think about one specific Youtuber https://www.youtube.com/user/renerebe
he does have quite a bit of exotic/non-x86 hw, so may be he will be able to get capture card(s) we talked about and even compile Cin on some non-x86 devices and/or test our BD output on Playstation 3 :-)
Well, I posted a few topics at ffmpeg-users some years ago. Time will tell - this "project" is nor hurry, as we have several other tasks to complete. I had preferably thought this as a possibly updated testcase for video capturing withing CinGG as here in the manual: https://cinelerra-gg.org/download/CinelerraGG_Manual/Transfer_VHS_DVD_Media_... Regardless, as mentioned would part of this be to evaluate more current capture cards with preV4L2 Linux support. I just googled around and without knowing their actuality or price levels for con-/pro-sumers, one name Gateworks at least seems to promote V4L2 heavily in their product wikies, i.e http://trac.gateworks.com/wiki/Yocto/Video_In http://trac.gateworks.com/wiki/linux/v4l2 http://trac.gateworks.com/wiki/ventana#BoardSupportPackagesBSPSoftware =============== I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visual lossless" intermediate format for archival and suited for editing? ----------------- Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file: ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11 (SUSE Linux) [...] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SD-MOV.mov': Metadata: creation_time : 2016-02-26T02:24:01.000000Z Duration: 00:00:29.84, start: 0.000000, bitrate: 79620 kb/s Stream #0:0(eng): Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, bt709/unknown/unknown, top coded first (swapped)), 720x576, 61154 kb/s, SAR 59:54 DAR 295:216, 25 fps, 25 tbr, 2500 tbn, 2500 tbc (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Video Media Handler vendor_id : appl encoder : Apple ProRes 422 (HQ) Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, hexadecagonal, s32 (24 bit), 18432 kb/s (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> dvvideo (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #0, dv, to 'SD-DV50.dv': Metadata: encoder : Lavf58.76.100 Stream #0:0(eng): Video: dvvideo, yuv422p(tv, bt709/unknown/unknown, top coded first (swapped)), 720x576 [SAR 59:54 DAR 295:216], q=2-31, 200 kb/s, 25 fps, 25 tbn (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Video Media Handler vendor_id : appl encoder : Lavc58.134.100 dvvideo Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] encoder : Lavc58.134.100 pcm_s16le frame= 746 fps=346 q=-0.0 Lsize= 209531kB time=00:00:29.84 bitrate=57522.8kbits/s speed=13.8x video:209812kB audio:5595kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown =================== du -sh *mov *dv 284M SD-MOV.mov (source digitized from Hi8) 205M SD-DV50.dv (ffmpeg re-encoded/remuxed) DV50 size is here 72% of MOV (though other ProRes 422 and ProRes 422 LT has even lower bitrates). ------------------- 284M SD-MOV.mov (source digitized from Hi8) AV-info: avprobe SD-MOV.mov avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SD-MOV.mov': Metadata: creation_time : 2016-02-26T02:24:01.000000Z Duration: 00:00:29.84, start: 0.000000, bitrate: 79620 kb/s Stream #0:0(eng): Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, bt709/unknown/unknown, top coded first (swapped)), 720x576, 61154 kb/s, SAR 59:54 DAR 295:216, 25 fps, 25 tbr, 2500 tbn, 2500 tbc (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Video Media Handler vendor_id : appl encoder : Apple ProRes 422 (HQ) Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] # avprobe output ---------------------- 205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info: avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output =================== As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo). My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?). Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg). ----------------- Terje J. H
On Friday, December 17, 2021, Terje J. Hanssen <[email protected]> wrote:
Den 16.12.2021 20:08, skrev Andrew Randrianasulu:
On Thursday, December 16, 2021, Terje J. Hanssen via Cin < [email protected]> wrote:
[......]
As I already pointed on in another thread, a solution to capture Hi8 to SD DV50 in 4:2:2 format was possible already 10 years ago https://lists.cinelerra-gg.org/pipermail/cin/2021-December/ 004308.html <https://lists.cinelerra-gg.org/pipermail/cin/2021-December/ 004308.html>
In a more recent thread here, Andrew mentioned a hdmi capture card (with v4l2) https://www.mail-archive.com/[email protected]/msg02865.html <https://www.mail-archive.com/[email protected]/msg 02865.html> ===================
Therefore I wonder if we, CinGG users and devs, are able to setup and test a recommended capture solution (w/card and guide) for SD and HD video in 4:2:2 colorspace, preferably using free drivers and tools like V4L/V4L2 and FFMpeg? https://en.wikipedia.org/wiki/Video4Linux <https://en.wikipedia.org/wiki/Video4Linux> https://www.linuxtv.org/wiki/index.php/V4L_capturing <https://www.linuxtv.org/wiki/index.php/V4L_capturing>
I think I personally will be away from my desktop machine for few more months..
Terje, you already subscribed to ffmpeg-users, may be forward your call for testing to this list too?
I was think about one specific Youtuber https://www.youtube.com/user/renerebe
he does have quite a bit of exotic/non-x86 hw, so may be he will be able to get capture card(s) we talked about and even compile Cin on some non-x86 devices and/or test our BD output on Playstation 3 :-)
Well, I posted a few topics at ffmpeg-users some years ago. Time will
tell - this "project" is nor hurry, as we have several other tasks to complete. I had preferably thought this as a possibly updated testcase for video capturing withing CinGG as here in the manual: https://cinelerra-gg.org/download/CinelerraGG_Manual/Transfe r_VHS_DVD_Media_or_V.html
Regardless, as mentioned would part of this be to evaluate more current capture cards with preV4L2 Linux support.
I just googled around and without knowing their actuality or price levels for con-/pro-sumers, one name Gateworks at least seems to promote V4L2 heavily in their product wikies, i.e http://trac.gateworks.com/wiki/Yocto/Video_In http://trac.gateworks.com/wiki/linux/v4l2 http://trac.gateworks.com/wiki/ventana#BoardSupportPackagesBSPSoftware
is there possibility they talk about single-board computers and their embedded video chips? (not something you can plug into desktop/laptop..)
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visual lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11 (SUSE Linux) [...] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SD-MOV.mov': Metadata: creation_time : 2016-02-26T02:24:01.000000Z Duration: 00:00:29.84, start: 0.000000, bitrate: 79620 kb/s Stream #0:0(eng): Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, bt709/unknown/unknown, top coded first (swapped)), 720x576, 61154 kb/s, SAR 59:54 DAR 295:216, 25 fps, 25 tbr, 2500 tbn, 2500 tbc (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Video Media Handler vendor_id : appl encoder : Apple ProRes 422 (HQ) Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, hexadecagonal, s32 (24 bit), 18432 kb/s (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> dvvideo (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #0, dv, to 'SD-DV50.dv': Metadata: encoder : Lavf58.76.100 Stream #0:0(eng): Video: dvvideo, yuv422p(tv, bt709/unknown/unknown, top coded first (swapped)), 720x576 [SAR 59:54 DAR 295:216], q=2-31, 200 kb/s, 25 fps, 25 tbn (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Video Media Handler vendor_id : appl encoder : Lavc58.134.100 dvvideo Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] encoder : Lavc58.134.100 pcm_s16le frame= 746 fps=346 q=-0.0 Lsize= 209531kB time=00:00:29.84 bitrate=57522.8kbits/s speed=13.8x video:209812kB audio:5595kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
===================
du -sh *mov *dv 284M SD-MOV.mov (source digitized from Hi8) 205M SD-DV50.dv (ffmpeg re-encoded/remuxed)
DV50 size is here 72% of MOV (though other ProRes 422 and ProRes 422 LT has even lower bitrates).
-------------------
284M SD-MOV.mov (source digitized from Hi8) AV-info:
avprobe SD-MOV.mov avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SD-MOV.mov': Metadata: creation_time : 2016-02-26T02:24:01.000000Z Duration: 00:00:29.84, start: 0.000000, bitrate: 79620 kb/s Stream #0:0(eng): Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, bt709/unknown/unknown, top coded first (swapped)), 720x576, 61154 kb/s, SAR 59:54 DAR 295:216, 25 fps, 25 tbr, 2500 tbn, 2500 tbc (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Video Media Handler vendor_id : appl encoder : Apple ProRes 422 (HQ) Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default) Metadata: creation_time : 2016-02-26T02:24:01.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] # avprobe output ----------------------
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
-----------------
Terje J. H
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
[..........]
Regardless, as mentioned would part of this be to evaluate more current capture cards with preV4L2 Linux support.
I just googled around and without knowing their actuality or price levels for con-/pro-sumers, one name Gateworks at least seems to promote V4L2 heavily in their product wikies, i.e http://trac.gateworks.com/wiki/Yocto/Video_In <http://trac.gateworks.com/wiki/Yocto/Video_In> http://trac.gateworks.com/wiki/linux/v4l2 <http://trac.gateworks.com/wiki/linux/v4l2> http://trac.gateworks.com/wiki/ventana#BoardSupportPackagesBSPSoftware <http://trac.gateworks.com/wiki/ventana#BoardSupportPackagesBSPSoftware>
is there possibility they talk about single-board computers and their embedded video chips? (not something you can plug into desktop/laptop..)
Very possible ;) I became unsure when I saw Arm mentioned, but so mini PCIe, and I didn't dwell more on it. Other v4l2 candidates with analog video included - or among other mentioned Osprey, AVerMedia or BMD? https://www.mail-archive.com/[email protected]/msg10886.html
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visual lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
=============== I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream. 1) MPG From MOV (ProRes 422HQ) ------------------------------ ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 -- ***This failed because PreRes Audio uses 16 channels:*** ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default) 2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s ***** The SD-MP2I-50.mpg file size is here 90% of DV50 ******** The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg ------------------------- Terje J. H
On Saturday, December 18, 2021, Terje J. Hanssen via Cin < [email protected]> wrote:
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..? -------------------------
Terje J. H
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Den 17.12.2021 22:49, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen via Cin <[email protected] <mailto:[email protected]>> wrote:
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in... ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v I dropped -pix_fmt yuv422p when I saw it was detected and automatic from the input file. So I added the second PCM Audio part (similar I did for SD-DV) according to 1. Answer at https://stackoverflow.com/questions/48265448/mpeg-2-program-stream-w-pcm-aud... FFmpeg only supports muxing 16 bit PCM in a MPEG2 PS. Use ffmpeg -i "input.mov" \ -c:v mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50M -maxrate 50M -minrate 50M \ -s 1920x1080 -aspect 16:9 \ -c:a pcm_s16be -f vob "output.mpg" The -f vob is needed to force a MPEG-2 PS, else ffmpeg will select MPEG-1 Systems muxer.
On Saturday, December 18, 2021, Terje J. Hanssen <[email protected]> wrote:
Den 17.12.2021 22:49, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen via Cin < [email protected] <mailto:[email protected]>> wrote:
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality
ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v
you missed -intra? ffmpeg changes cmd line and API quickly.. ( try "-g 1" and check keyframes with some linevlike those? https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval...
I dropped -pix_fmt yuv422p when I saw it was detected and automatic from the input file.
So I added the second PCM Audio part (similar I did for SD-DV) according to 1. Answer at https://stackoverflow.com/questions/48265448/mpeg-2-program- stream-w-pcm-audio
FFmpeg only supports muxing 16 bit PCM in a MPEG2 PS. Use
ffmpeg -i "input.mov" \ -c:v mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50M -maxrate 50M -minrate 50M \ -s 1920x1080 -aspect 16:9 \ -c:a pcm_s16be -f vob "output.mpg"
The -f vob is needed to force a MPEG-2 PS, else ffmpeg will select MPEG-1 Systems muxer.
Den 18.12.2021 04:35, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
Den 17.12.2021 22:49, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen via Cin <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote:
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in... <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in_Highest_Quality>
ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v
you missed
-intra?
Thanks for reviewing. "-intra" should definitely be there, and I know I used it before editing and troubleshooting the audiopart, removing -an. Cleaned up and added also some other parameters -q:v 1 -qmin 1 -intra 3) MP2I50 from DV50: --------------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I50.mpg [...] Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s [... a lot of vob buffer messages scrolling ....] [vob @ 0x564dbf6a0680] packet too large, ignoring buffer limits to mux it [vob @ 0x564dbf6a0680] buffer underflow st=1 bufi=7204 size=7680 frame= 745 fps=460 q=1.0 Lsize= 189584kB time=00:00:29.76 bitrate=52186.6kbits/s speed=18.4x video:181698kB audio:5588kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.227127% avprobe SD-MP2I50.mpg avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 7 (SUSE Linux) Input #0, mpeg, from 'SD-MP2I50.mpg': Duration: 00:00:29.80, start: 0.540000, bitrate: 52116 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s ================ (Re)tested also with 4) No intra (-intra) ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2-50.mpg 5) Without specified Video bitrate (-b:v) ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -c:a pcm_s16be -f vob SD-MP2I-.mpg 6) Video only - no Audio (-an): ffmpeg -i SD-DV50.dv -vcodec mpeg2video -q:v 1 -qmin 1 -intra -an SD-MP2I50-an.m2v ----------------- du -sh * 284M SD-MOV.mov 205M SD-DV50.dv 186M SD-MP2I50.mpg (3) 186M SD-MP2-50.mpg (4) 153M SD-MP2I-.mpg (5) 146M SD-MP2I50-an.m2v (6) As seen, no size difference between -intra (3) and without intra flag specified (4) above: 186/205 = 90% size of the input SD-DV50.dv I would expect this due to high bitrate and some more effectiv video compression for MPEG-2 over DV50. While the consumer DV25/4:2:0 pal uses 5:1 intra compression, the pro(sumer) DV50/4:2:2 uses lower 3.3:1. ------------- 7) Another, equivalent SD MPEG-2/ 422P@ML option to setup for Cin-GG/ FFMpeg preset could be: D10 aka Sony IMX50 Encoding - a standard definition professional video recording format. Uses intraframe compression, 4:2:2 color subsampling and user-selectable constant video data rate of 30, 40 or 50 Mbit/s. 422P@ML 720 × 576 25 FPS 4:2:2 Sampling 50 Mbits/s Sony IMX50 (I only), Broadcast Contribution (I&P only) The Howto contains both a short and a long script version. ----------------
ffmpeg changes cmd line and API quickly.. (
try "-g 1" and check keyframes with some linevlike those?
https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval... <https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval-(ffprobe)-BASH.html>
I tried to copy and paste some line from the manual url, but If you possibly can setup an exact FF syntax to run here, I can do it ;)
I dropped -pix_fmt yuv422p when I saw it was detected and automatic from the input file.
So I added the second PCM Audio part (similar I did for SD-DV) according to 1. Answer at https://stackoverflow.com/questions/48265448/mpeg-2-program-stream-w-pcm-aud... <https://stackoverflow.com/questions/48265448/mpeg-2-program-stream-w-pcm-audio>
FFmpeg only supports muxing 16 bit PCM in a MPEG2 PS. Use
ffmpeg -i "input.mov" \ -c:v mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50M -maxrate 50M -minrate 50M \ -s 1920x1080 -aspect 16:9 \ -c:a pcm_s16be -f vob "output.mpg"
The -f vob is needed to force a MPEG-2 PS, else ffmpeg will select MPEG-1 Systems muxer.
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected]> wrote:
Den 18.12.2021 04:35, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
Den 17.12.2021 22:49, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen via Cin <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote:
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality>
ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v
you missed
-intra?
Thanks for reviewing. "-intra" should definitely be there, and I know I used it before editing and troubleshooting the audiopart, removing -an. Cleaned up and added also some other parameters -q:v 1 -qmin 1 -intra
3) MP2I50 from DV50: --------------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I50.mpg [...] Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s [... a lot of vob buffer messages scrolling ....] [vob @ 0x564dbf6a0680] packet too large, ignoring buffer limits to mux it [vob @ 0x564dbf6a0680] buffer underflow st=1 bufi=7204 size=7680 frame= 745 fps=460 q=1.0 Lsize= 189584kB time=00:00:29.76 bitrate=52186.6kbits/s speed=18.4x video:181698kB audio:5588kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.227127%
avprobe SD-MP2I50.mpg avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 7 (SUSE Linux) Input #0, mpeg, from 'SD-MP2I50.mpg': Duration: 00:00:29.80, start: 0.540000, bitrate: 52116 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
================
(Re)tested also with
4) No intra (-intra) ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2-50.mpg
5) Without specified Video bitrate (-b:v) ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -c:a pcm_s16be -f vob SD-MP2I-.mpg
6) Video only - no Audio (-an): ffmpeg -i SD-DV50.dv -vcodec mpeg2video -q:v 1 -qmin 1 -intra -an SD-MP2I50-an.m2v
-----------------
du -sh * 284M SD-MOV.mov 205M SD-DV50.dv 186M SD-MP2I50.mpg (3) 186M SD-MP2-50.mpg (4) 153M SD-MP2I-.mpg (5) 146M SD-MP2I50-an.m2v (6)
As seen, no size difference between -intra (3) and without intra flag specified (4) above: 186/205 = 90% size of the input SD-DV50.dv
I would expect this due to high bitrate and some more effectiv video compression for MPEG-2 over DV50. While the consumer DV25/4:2:0 pal uses 5:1 intra compression, the pro(sumer) DV50/4:2:2 uses lower 3.3:1.
-------------
7) Another, equivalent SD MPEG-2/ 422P@ML option to setup for Cin-GG/ FFMpeg preset could be:
D10 aka Sony IMX50 Encoding - a standard definition professional video recording format. Uses intraframe compression, 4:2:2 color subsampling and user-selectable constant video data rate of 30, 40 or 50 Mbit/s.
422P@ML 720 × 576 25 FPS 4:2:2 Sampling 50 Mbits/s Sony IMX50 (I only), Broadcast Contribution (I&P only)
The Howto contains both a short and a long script version.
----------------
ffmpeg changes cmd line and API quickly.. (
try "-g 1" and check keyframes with some linevlike those?
https://snippets.bentasker.co.uk/page-1707191206-Get-Video-K eyframe-Interval-(ffprobe)-BASH.html <https://snippets.bentasker.co .uk/page-1707191206-Get-Video-Keyframe-Interval-(ffprobe)-BASH.html>
I tried to copy and paste some line from the manual url, but If you possibly can setup an exact FF syntax to run here, I can do it ;)
attached copy of script Phyllis send to me back in 2019
I dropped -pix_fmt yuv422p when I saw it was detected and automatic from the input file.
So I added the second PCM Audio part (similar I did for SD-DV) according to 1. Answer at https://stackoverflow.com/questions/48265448/mpeg-2-program- stream-w-pcm-audio <https://stackoverflow.com/questions/48265448/mpeg-2-program -stream-w-pcm-audio>
FFmpeg only supports muxing 16 bit PCM in a MPEG2 PS. Use
ffmpeg -i "input.mov" \ -c:v mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50M -maxrate 50M -minrate 50M \ -s 1920x1080 -aspect 16:9 \ -c:a pcm_s16be -f vob "output.mpg"
The -f vob is needed to force a MPEG-2 PS, else ffmpeg will select MPEG-1 Systems muxer.
Den 19.12.2021 01:00, skrev Andrew Randrianasulu:
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
Den 18.12.2021 04:35, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote:
Den 17.12.2021 22:49, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen via Cin <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote:
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in... <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in_Highest_Quality> <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in... <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in_Highest_Quality>>
ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v
you missed
-intra?
Thanks for reviewing. "-intra" should definitely be there, and I know I used it before editing and troubleshooting the audiopart, removing -an. Cleaned up and added also some other parameters -q:v 1 -qmin 1 -intra
3) MP2I50 from DV50: --------------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I50.mpg [...] Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s [... a lot of vob buffer messages scrolling ....] [vob @ 0x564dbf6a0680] packet too large, ignoring buffer limits to mux it [vob @ 0x564dbf6a0680] buffer underflow st=1 bufi=7204 size=7680 frame= 745 fps=460 q=1.0 Lsize= 189584kB time=00:00:29.76 bitrate=52186.6kbits/s speed=18.4x video:181698kB audio:5588kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.227127%
avprobe SD-MP2I50.mpg avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 7 (SUSE Linux) Input #0, mpeg, from 'SD-MP2I50.mpg': Duration: 00:00:29.80, start: 0.540000, bitrate: 52116 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
================
(Re)tested also with
4) No intra (-intra) ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2-50.mpg
5) Without specified Video bitrate (-b:v) ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -c:a pcm_s16be -f vob SD-MP2I-.mpg
6) Video only - no Audio (-an): ffmpeg -i SD-DV50.dv -vcodec mpeg2video -q:v 1 -qmin 1 -intra -an SD-MP2I50-an.m2v
-----------------
du -sh * 284M SD-MOV.mov 205M SD-DV50.dv 186M SD-MP2I50.mpg (3) 186M SD-MP2-50.mpg (4) 153M SD-MP2I-.mpg (5) 146M SD-MP2I50-an.m2v (6)
As seen, no size difference between -intra (3) and without intra flag specified (4) above: 186/205 = 90% size of the input SD-DV50.dv
I would expect this due to high bitrate and some more effectiv video compression for MPEG-2 over DV50. While the consumer DV25/4:2:0 pal uses 5:1 intra compression, the pro(sumer) DV50/4:2:2 uses lower 3.3:1.
-------------
7) Another, equivalent SD MPEG-2/ 422P@ML option to setup for Cin-GG/ FFMpeg preset could be:
D10 aka Sony IMX50 Encoding - a standard definition professional video recording format. Uses intraframe compression, 4:2:2 color subsampling and user-selectable constant video data rate of 30, 40 or 50 Mbit/s.
422P@ML 720 × 576 25 FPS 4:2:2 Sampling 50 Mbits/s Sony IMX50 (I only), Broadcast Contribution (I&P only)
The Howto contains both a short and a long script version.
----------------
ffmpeg changes cmd line and API quickly.. (
try "-g 1" and check keyframes with some linevlike those?
https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval... <https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval-(ffprobe)-BASH.html> <https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval... <https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval-(ffprobe)-BASH.html>>
I tried to copy and paste some line from the manual url, but If you possibly can setup an exact FF syntax to run here, I can do it ;)
attached copy of script Phyllis send to me back in 2019
Sorry I'm not skilled with sed scripts. "Somewhere" I would expect my encoded file name "SD-MP2I50.mpg" should be put in to be read and analyzed with ffprobe? And what about the first mentioned "-g 1" ? What are we really searching for or verify in this I-frame only encoded MPEG-2 video file ? And isn't keyframes another (previous?) name for Intra-frames?
I dropped -pix_fmt yuv422p when I saw it was detected and automatic from the input file.
So I added the second PCM Audio part (similar I did for SD-DV) according to 1. Answer at https://stackoverflow.com/questions/48265448/mpeg-2-program-stream-w-pcm-aud... <https://stackoverflow.com/questions/48265448/mpeg-2-program-stream-w-pcm-audio> <https://stackoverflow.com/questions/48265448/mpeg-2-program-stream-w-pcm-aud... <https://stackoverflow.com/questions/48265448/mpeg-2-program-stream-w-pcm-audio>>
FFmpeg only supports muxing 16 bit PCM in a MPEG2 PS. Use
ffmpeg -i "input.mov" \ -c:v mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50M -maxrate 50M -minrate 50M \ -s 1920x1080 -aspect 16:9 \ -c:a pcm_s16be -f vob "output.mpg"
The -f vob is needed to force a MPEG-2 PS, else ffmpeg will select MPEG-1 Systems muxer.
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected]> wrote:
Den 19.12.2021 01:00, skrev Andrew Randrianasulu:
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected]> wrote:
Den 18.12.2021 04:35, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen < [email protected] <mailto:[email protected]>> wrote:
Den 17.12.2021 22:49, skrev Andrew Randrianasulu:
On Saturday, December 18, 2021, Terje J. Hanssen via Cin <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote:
Den 17.12.2021 15:00, skrev Terje J. Hanssen:
Den 17.12.2021 04:58, skrev Andrew Randrianasulu:
On Friday, December 17, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]
<mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote:
[......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2 _I-frame_only_in_Highest_Quality <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality>
ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v
you missed
-intra?
Thanks for reviewing. "-intra" should definitely be there, and I know I used it before editing and troubleshooting the audiopart, removing -an. Cleaned up and added also some other parameters -q:v 1 -qmin 1 -intra
3) MP2I50 from DV50: --------------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I50.mpg [...] Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s [... a lot of vob buffer messages scrolling ....] [vob @ 0x564dbf6a0680] packet too large, ignoring buffer limits to mux it [vob @ 0x564dbf6a0680] buffer underflow st=1 bufi=7204 size=7680 frame= 745 fps=460 q=1.0 Lsize= 189584kB time=00:00:29.76 bitrate=52186.6kbits/s speed=18.4x video:181698kB audio:5588kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.227127%
avprobe SD-MP2I50.mpg avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 7 (SUSE Linux) Input #0, mpeg, from 'SD-MP2I50.mpg': Duration: 00:00:29.80, start: 0.540000, bitrate: 52116 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
================
(Re)tested also with
4) No intra (-intra) ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2-50.mpg
5) Without specified Video bitrate (-b:v) ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -c:a pcm_s16be -f vob SD-MP2I-.mpg
6) Video only - no Audio (-an): ffmpeg -i SD-DV50.dv -vcodec mpeg2video -q:v 1 -qmin 1 -intra -an SD-MP2I50-an.m2v
-----------------
du -sh * 284M SD-MOV.mov 205M SD-DV50.dv 186M SD-MP2I50.mpg (3) 186M SD-MP2-50.mpg (4) 153M SD-MP2I-.mpg (5) 146M SD-MP2I50-an.m2v (6)
As seen, no size difference between -intra (3) and without intra flag specified (4) above: 186/205 = 90% size of the input SD-DV50.dv
I would expect this due to high bitrate and some more effectiv video compression for MPEG-2 over DV50. While the consumer DV25/4:2:0 pal uses 5:1 intra compression, the pro(sumer) DV50/4:2:2 uses lower 3.3:1.
-------------
7) Another, equivalent SD MPEG-2/ 422P@ML option to setup for Cin-GG/ FFMpeg preset could be:
D10 aka Sony IMX50 Encoding - a standard definition professional video recording format. Uses intraframe compression, 4:2:2 color subsampling and user-selectable constant video data rate of 30, 40 or 50 Mbit/s.
422P@ML 720 × 576 25 FPS 4:2:2 Sampling 50 Mbits/s Sony IMX50 (I only), Broadcast Contribution (I&P only)
The Howto contains both a short and a long script version.
----------------
ffmpeg changes cmd line and API quickly.. (
try "-g 1" and check keyframes with some linevlike those?
https://snippets.bentasker.co.uk/page-1707191206-Get-Video-K eyframe-Interval-(ffprobe)-BASH.html <https://snippets.bentasker.co .uk/page-1707191206-Get-Video-Keyframe-Interval-(ffprobe)-BASH.html>
I tried to copy and paste some line from the manual url, but If you possibly can setup an exact FF syntax to run here, I can do it ;)
attached copy of script Phyllis send to me back in 2019
Sorry I'm not skilled with sed scripts. "Somewhere" I would expect my encoded file name "SD-MP2I50.mpg" should be put in to be read and analyzed with ffprobe? And what about the first mentioned "-g 1" ?
try to run script like this (after chmod +x on it) : $ ./kfrm.sh vid_20210526.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid_20210526.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Duration: 00:00:36.64, start: 0.000000, bitrate: 1314 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 640x480 [SAR 27:64 DAR 9:16], 1217 kb/s, 29.58 fps, 29.58 tbr, 11360 tbn, 59.17 tbc (default) Metadata: handler_name : VideoHandle vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 90 kb/s (default) Metadata: handler_name : SoundHandle vendor_id : [0][0][0][0] key_frame=1 key_frame=0 key_frame=0 for all I frames it should output key_frame=1 for all (many!) frames. you can add ' | grep 0' at the end of this line and see how many non-keyframes it will find. -g is ffmpeg parameter setting distance between keyframes.
What are we really searching for or verify in this I-frame only encoded MPEG-2 video file ?
yes we try to verify it really all-I frames file. (impact seekability among other things)
And isn't keyframes another (previous?) name for Intra-frames?
yes, as far as I know.
I dropped -pix_fmt yuv422p when I saw it was detected and automatic from the input file.
So I added the second PCM Audio part (similar I did for SD-DV) according to 1. Answer at https://stackoverflow.com/questions/48265448/mpeg-2-program- stream-w-pcm-audio <https://stackoverflow.com/questions/48265448/mpeg-2-program -stream-w-pcm-audio>
FFmpeg only supports muxing 16 bit PCM in a MPEG2 PS. Use
ffmpeg -i "input.mov" \ -c:v mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50M -maxrate 50M -minrate 50M \ -s 1920x1080 -aspect 16:9 \ -c:a pcm_s16be -f vob "output.mpg"
The -f vob is needed to force a MPEG-2 PS, else ffmpeg will select MPEG-1 Systems muxer.
Den 19.12.2021 03:38, skrev Andrew Randrianasulu:
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
Den 19.12.2021 01:00, skrev Andrew Randrianasulu:
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
[.......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in... <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in_Highest_Quality> <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in... <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG-2_I-frame_only_in_Highest_Quality>>
ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v
you missed
-intra?
Thanks for reviewing. "-intra" should definitely be there, and I know I used it before editing and troubleshooting the audiopart, removing -an. Cleaned up and added also some other parameters -q:v 1 -qmin 1 -intra
3) MP2I50 from DV50: --------------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I50.mpg [...] Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s [... a lot of vob buffer messages scrolling ....] [vob @ 0x564dbf6a0680] packet too large, ignoring buffer limits to mux it [vob @ 0x564dbf6a0680] buffer underflow st=1 bufi=7204 size=7680 frame= 745 fps=460 q=1.0 Lsize= 189584kB time=00:00:29.76 bitrate=52186.6kbits/s speed=18.4x video:181698kB audio:5588kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.227127%
avprobe SD-MP2I50.mpg avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 7 (SUSE Linux) Input #0, mpeg, from 'SD-MP2I50.mpg': Duration: 00:00:29.80, start: 0.540000, bitrate: 52116 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
================
(Re)tested also with
4) No intra (-intra) ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2-50.mpg
5) Without specified Video bitrate (-b:v) ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -c:a pcm_s16be -f vob SD-MP2I-.mpg
6) Video only - no Audio (-an): ffmpeg -i SD-DV50.dv -vcodec mpeg2video -q:v 1 -qmin 1 -intra -an SD-MP2I50-an.m2v
-----------------
du -sh * 284M SD-MOV.mov 205M SD-DV50.dv 186M SD-MP2I50.mpg (3) 186M SD-MP2-50.mpg (4) 153M SD-MP2I-.mpg (5) 146M SD-MP2I50-an.m2v (6)
As seen, no size difference between -intra (3) and without intra flag specified (4) above: 186/205 = 90% size of the input SD-DV50.dv
I would expect this due to high bitrate and some more effectiv video compression for MPEG-2 over DV50. While the consumer DV25/4:2:0 pal uses 5:1 intra compression, the pro(sumer) DV50/4:2:2 uses lower 3.3:1.
-------------
7) Another, equivalent SD MPEG-2/ 422P@ML option to setup for Cin-GG/ FFMpeg preset could be:
D10 aka Sony IMX50 Encoding - a standard definition professional video recording format. Uses intraframe compression, 4:2:2 color subsampling and user-selectable constant video data rate of 30, 40 or 50 Mbit/s.
422P@ML 720 × 576 25 FPS 4:2:2 Sampling 50 Mbits/s Sony IMX50 (I only), Broadcast Contribution (I&P only)
The Howto contains both a short and a long script version.
----------------
ffmpeg changes cmd line and API quickly.. (
try "-g 1" and check keyframes with some linevlike those?
https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval... <https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval-(ffprobe)-BASH.html> <https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval... <https://snippets.bentasker.co.uk/page-1707191206-Get-Video-Keyframe-Interval-(ffprobe)-BASH.html>>
I tried to copy and paste some line from the manual url, but If you possibly can setup an exact FF syntax to run here, I can do it ;)
attached copy of script Phyllis send to me back in 2019
Sorry I'm not skilled with sed scripts. "Somewhere" I would expect my encoded file name "SD-MP2I50.mpg" should be put in to be read and analyzed with ffprobe? And what about the first mentioned "-g 1" ?
try to run script like this (after chmod +x on it) :
$ ./kfrm.sh vid_20210526.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid_20210526.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Duration: 00:00:36.64, start: 0.000000, bitrate: 1314 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 640x480 [SAR 27:64 DAR 9:16], 1217 kb/s, 29.58 fps, 29.58 tbr, 11360 tbn, 59.17 tbc (default) Metadata: handler_name : VideoHandle vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 90 kb/s (default) Metadata: handler_name : SoundHandle vendor_id : [0][0][0][0] key_frame=1 key_frame=0 key_frame=0
for all I frames it should output key_frame=1 for all (many!) frames.
you can add ' | grep 0' at the end of this line and see how many non-keyframes it will find.
-g is ffmpeg parameter setting distance between keyframes.
What are we really searching for or verify in this I-frame only encoded MPEG-2 video file ?
yes we try to verify it really all-I frames file. (impact seekability among other things)
And isn't keyframes another (previous?) name for Intra-frames?
yes, as far as I know.
Thanks, script testrun executed with attached output here. Test-run_Intra-frame_key_word As seen below from the summary table, all files except the MPEG-2 generated "SD-MP2-50.mpg" without the ffmpeg -intra flag set, contains all Intra-frames only: ------------------------------------------------------- du -sh SD*.* # key_frame=1 # key_frame=0 (# I-frames) (# non-I-frames) 284M SD-MOV.mov 746 0 205M SD-DV50.dv 745 0 186M SD-MP2I50.mpg 745 0 153M SD-MP2I-.mpg 745 0 186M SD-MP2-50.mpg 63 682 146M SD-MP2I50-an.m2v 745 0 Counts matched # key_frame=1 (I-frames) ./kfrm.sh SD-MOV.mov | grep -c key_frame=1 Counts other (unmatched) than key_frame=1 ./kfrm.sh SD-MOV.mov | grep -v -c key_frame=1 --------------------------------------------------------
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected]> wrote:
Den 19.12.2021 03:38, skrev Andrew Randrianasulu:
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
Den 19.12.2021 01:00, skrev Andrew Randrianasulu:
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
[.......]
===============
I-frame-only 50 Megabit MPEG-2 or comparable DV50 in 4:2:2 as high-end, "visually lossless" intermediate format for archival and suited for editing?
-----------------
Regarding DV50, FFMpeg has a friendly "target dv50" support (similar as "target DVD"). So to get a first look on a DV50 test file, I simply transcoded 422/10bit Video and PCM audio from a MOV file (ProRes 422HQ) to a raw DV50 (422/8bit) file:
ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv
[......]
205M SD-DV50.dv (ffmpeg re-encoded/remuxed) AV-info:
avprobe SD-DV50.dv avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 11 (SUSE Linux) [dv @ 0x55cdddb96440] Estimating duration from bitrate, this may be inaccurate Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s # avprobe output
===================
As seen above, it looks like ffmpeg produced wrong meta data for the DV50 video bitrate (25 Mb/s=DV25), while the total bitrate 57.6 Mb/s is correct. (Also similar was seen with ffprobe and Mediainfo).
My VLC player or Gnome movieplayer did not playback the DV50 file, while ffplay did (as usual without audio?).
Cin-GG miss a DV50 preset among format setting. However DV50 else loades preliminary OK in Cin-GG (via ffmpeg).
I'll look at dv50 output preset..
Fine
===============
I tried also to transcode and remux 422 Video and PCM Audio to a 50 Mbps MPEG-2 I-frame only program stream.
1) MPG From MOV (ProRes 422HQ) ------------------------------
ffmpeg -i SD-MOV.mov -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg [....] Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16be (native)) Press [q] to stop, [?] for help [mpeg2video @ 0x560ffd164ec0] Automatically choosing VBV buffer size of 746 kbyte [vob @ 0x560ffd14d180] At most 8 channels allowed for LPCM streams. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 --
***This failed because PreRes Audio uses 16 channels:***
yeah... interesting limitation.. and interesting number of channels..
ffprobe SD-MOV.mov 2>&1 >/dev/null | grep Stream.*Audio Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
2) MPG from DV50 ---------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I-50.mpg
du -sh * 205M SD-DV50.dv 284M SD-MOV.mov 186M SD-MP2I-50.mpg
avprobe SD-MP2I-50.mpg Input #0, mpeg, from 'SD-MP2I-50.mpg': Duration: 00:00:29.77, start: 0.540000, bitrate: 52167 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
***** The SD-MP2I-50.mpg file size is here 90% of DV50 ********
The SD-MP2I-50.mpg playback ok with VLC, Gnome movieplayer, ffplay, and loads and playback in Cin-GG The audio volume seems low (weak), but can probably be adjusted higher with ffmpeg
well, but I missed keyframe parameter? bitrate is big but I think without special param ffmpeg still will not make all-I mpeg2 stream..?
The first Video part of my ffmpeg script was based on this standard FFmpeg Howto for "MPEG-2 I-frame only Highest Quality Encoding", which didn't include a keyframe parameter !? https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality>
<https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality <https://brunosan.eu/images/ffmpeg_howto.html#Encoding_MPEG- 2_I-frame_only_in_Highest_Quality>>
ffmpeg -i <input_file> -vcodec mpeg2video -pix_fmt yuv422p -qscale 1 -qmin 1 -intra -an output.m2v
you missed
-intra?
Thanks for reviewing. "-intra" should definitely be there, and I know I used it before editing and troubleshooting the audiopart, removing -an. Cleaned up and added also some other parameters -q:v 1 -qmin 1 -intra
3) MP2I50 from DV50: --------------------- ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2I50.mpg [...] Input #0, dv, from 'SD-DV50.dv': Metadata: timecode : 00:00:00:00 Duration: 00:00:29.80, start: 0.000000, bitrate: 57600 kb/s Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s [... a lot of vob buffer messages scrolling ....] [vob @ 0x564dbf6a0680] packet too large, ignoring buffer limits to mux it [vob @ 0x564dbf6a0680] buffer underflow st=1 bufi=7204 size=7680 frame= 745 fps=460 q=1.0 Lsize= 189584kB time=00:00:29.76 bitrate=52186.6kbits/s speed=18.4x video:181698kB audio:5588kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.227127%
avprobe SD-MP2I50.mpg avprobe version 12.3, Copyright (c) 2007-2018 the Libav developers built on Mar 26 2018 12:39 with gcc 7 (SUSE Linux) Input #0, mpeg, from 'SD-MP2I50.mpg': Duration: 00:00:29.80, start: 0.540000, bitrate: 52116 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, 2 channels, s16, 1536 kb/s
================
(Re)tested also with
4) No intra (-intra) ffmpeg -i SD-DV50.dv -c:v mpeg2video -bf 2 -b:v 50M -maxrate 50M -minrate 50M -c:a pcm_s16be -f vob SD-MP2-50.mpg
5) Without specified Video bitrate (-b:v) ffmpeg -i SD-DV50.dv -c:v mpeg2video -q:v 1 -qmin 1 -intra -bf 2 -c:a pcm_s16be -f vob SD-MP2I-.mpg
6) Video only - no Audio (-an): ffmpeg -i SD-DV50.dv -vcodec mpeg2video -q:v 1 -qmin 1 -intra -an SD-MP2I50-an.m2v
-----------------
du -sh * 284M SD-MOV.mov 205M SD-DV50.dv 186M SD-MP2I50.mpg (3) 186M SD-MP2-50.mpg (4) 153M SD-MP2I-.mpg (5) 146M SD-MP2I50-an.m2v (6)
As seen, no size difference between -intra (3) and without intra flag specified (4) above: 186/205 = 90% size of the input SD-DV50.dv
I would expect this due to high bitrate and some more effectiv video compression for MPEG-2 over DV50. While the consumer DV25/4:2:0 pal uses 5:1 intra compression, the pro(sumer) DV50/4:2:2 uses lower 3.3:1.
-------------
7) Another, equivalent SD MPEG-2/ 422P@ML option to setup for Cin-GG/ FFMpeg preset could be:
D10 aka Sony IMX50 Encoding - a standard definition professional video recording format. Uses intraframe compression, 4:2:2 color subsampling and user-selectable constant video data rate of 30, 40 or 50 Mbit/s.
422P@ML 720 × 576 25 FPS 4:2:2 Sampling 50 Mbits/s Sony IMX50 (I only), Broadcast Contribution (I&P only)
The Howto contains both a short and a long script version.
----------------
ffmpeg changes cmd line and API quickly.. (
try "-g 1" and check keyframes with some linevlike those?
https://snippets.bentasker.co.uk/page-1707191206-Get-Video-K eyframe-Interval-(ffprobe)-BASH.html <https://snippets.bentasker.co.uk/page-1707191206-Get-Video- Keyframe-Interval-(ffprobe)-BASH.html> <https://snippets.bentasker.co.uk/page-1707191206-Get-Video- Keyframe-Interval-(ffprobe)-BASH.html <https://snippets.bentasker.co.uk/page-1707191206-Get-Video- Keyframe-Interval-(ffprobe)-BASH.html>>
I tried to copy and paste some line from the manual url, but If you possibly can setup an exact FF syntax to run here, I can do it ;)
attached copy of script Phyllis send to me back in 2019
Sorry I'm not skilled with sed scripts. "Somewhere" I would expect my encoded file name "SD-MP2I50.mpg" should be put in to be read and analyzed with ffprobe? And what about the first mentioned "-g 1" ?
try to run script like this (after chmod +x on it) :
$ ./kfrm.sh vid_20210526.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid_20210526.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.76.100 Duration: 00:00:36.64, start: 0.000000, bitrate: 1314 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 640x480 [SAR 27:64 DAR 9:16], 1217 kb/s, 29.58 fps, 29.58 tbr, 11360 tbn, 59.17 tbc (default) Metadata: handler_name : VideoHandle vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 90 kb/s (default) Metadata: handler_name : SoundHandle vendor_id : [0][0][0][0] key_frame=1 key_frame=0 key_frame=0
for all I frames it should output key_frame=1 for all (many!) frames.
you can add ' | grep 0' at the end of this line and see how many non-keyframes it will find.
-g is ffmpeg parameter setting distance between keyframes.
What are we really searching for or verify in this I-frame only encoded MPEG-2 video file ?
yes we try to verify it really all-I frames file. (impact seekability among other things)
And isn't keyframes another (previous?) name for Intra-frames?
yes, as far as I know.
Thanks, script testrun executed with attached output here. Test-run_Intra-frame_key_word
As seen below from the summary table, all files except the MPEG-2 generated "SD-MP2-50.mpg" without the ffmpeg -intra flag set, contains all Intra-frames only:
------------------------------------------------------- du -sh SD*.* # key_frame=1 # key_frame=0 (# I-frames) (# non-I-frames) 284M SD-MOV.mov 746 0 205M SD-DV50.dv 745 0 186M SD-MP2I50.mpg 745 0 153M SD-MP2I-.mpg 745 0 186M SD-MP2-50.mpg 63 682 146M SD-MP2I50-an.m2v 745 0
good! but a bit concerned 746 vs 745 frame count. Are we losing one frame somewhere?
Counts matched # key_frame=1 (I-frames) ./kfrm.sh SD-MOV.mov | grep -c key_frame=1
Counts other (unmatched) than key_frame=1 ./kfrm.sh SD-MOV.mov | grep -v -c key_frame=1
--------------------------------------------------------
Den 19.12.2021 16:40, skrev Andrew Randrianasulu:
On Sunday, December 19, 2021, Terje J. Hanssen <[email protected] <mailto:[email protected]>> wrote:
Thanks, script testrun executed with attached output here. Test-run_Intra-frame_key_word
As seen below from the summary table, all files except the MPEG-2 generated "SD-MP2-50.mpg" without the ffmpeg -intra flag set, contains all Intra-frames only:
------------------------------------------------------- du -sh SD*.* # key_frame=1 # key_frame=0 (# I-frames) (# non-I-frames) 284M SD-MOV.mov 746 0 205M SD-DV50.dv 745 0 186M SD-MP2I50.mpg 745 0 153M SD-MP2I-.mpg 745 0 186M SD-MP2-50.mpg 63 682 146M SD-MP2I50-an.m2v 745 0
good!
but a bit concerned 746 vs 745 frame count. Are we losing one frame somewhere?
To repeat: 1. SD-MOV.mov (ProRes) was the initial record source 2. SD-DV50.dv was encoded from ProRes using a simple ffmpeg target (preset) ffmpeg -i SD-MOV.mov -target pal-dv50 SD-DV50.dv 3. The SD-MP2* were encoded from SD-DV50.dv using ffmpeg All ffmpeg generated files has the same frame counts My take: The single frame difference seems to occure from step 1 - 2, or the script doesn't count 1 indentical as the ffmpeg generated 2 and 3.
Counts matched # key_frame=1 (I-frames) ./kfrm.sh SD-MOV.mov | grep -c key_frame=1
Counts other (unmatched) than key_frame=1 ./kfrm.sh SD-MOV.mov | grep -v -c key_frame=1
--------------------------------------------------------
participants (2)
-
Andrew Randrianasulu -
Terje J. Hanssen