ffmpeg…
Cool !
Avant d'aller plus loin je teste ffmpeg…
Le film commence à 7'31" -> 451 secondes et dure 6094 secondes.
ludovic@LibraZiK2:~/Vidéos +++/FreeBox$ ffmpeg -i "Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748).m2ts" -map 0:x -map 0:y -c:a copy -c:v copy -ss 451 -t 6094 ma_vidéo_finale.ts
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[h264 @ 0x55ae0d3af280] SPS unavailable in decode_picture_timing
[h264 @ 0x55ae0d3af280] non-existing PPS 0 referenced
[h264 @ 0x55ae0d3af280] SPS unavailable in decode_picture_timing
[h264 @ 0x55ae0d3af280] non-existing PPS 0 referenced
[h264 @ 0x55ae0d3af280] decode_slice_header error
[h264 @ 0x55ae0d3af280] no frame!
[aac @ 0x55ae0d3cc980] Multiple frames in a packet.
[aac @ 0x55ae0d3cc980] element type mismatch 1 != 0
[aac @ 0x55ae0d3b0440] element type mismatch 1 != 0
[aac @ 0x55ae0d3b1600] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x55ae0d3b1600] decode_pce: Input buffer exhausted before END element found
[mpegts @ 0x55ae0d3a9680] PES packet size mismatch
Last message repeated 2 times
Input #0, mpegts, from 'Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748).m2ts':
Duration: 02:11:00.22, start: 71796.101911, bitrate: 4844 kb/s
Program 43969
Stream #0:0[0x31](fra,fra): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:1[0x44]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1440x1080 [SAR 4:3 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x45](fra): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 70 kb/s
Stream #0:3[0x47](qaa): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 73 kb/s
Stream #0:4[0x48](qad): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 72 kb/s
[mpegts @ 0x55ae0d3a9680] Invalid stream specifier: x.
Last message repeated 9 times
Stream map '0:x' matches no streams.
To ignore this, add a trailing '?' to the map.
Bon alors je tente de virer tout simplemenent
-map 0:x -map 0:y
ludovic@LibraZiK2:~/Vidéos +++/FreeBox$ ffmpeg -i "Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748).m2ts" -c:a copy -c:v copy -ss 451 -t 6094 ma_vidéo_finale.ts
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[h264 @ 0x55b789765200] SPS unavailable in decode_picture_timing
[h264 @ 0x55b789765200] non-existing PPS 0 referenced
[h264 @ 0x55b789765200] SPS unavailable in decode_picture_timing
[h264 @ 0x55b789765200] non-existing PPS 0 referenced
[h264 @ 0x55b789765200] decode_slice_header error
[h264 @ 0x55b789765200] no frame!
[aac @ 0x55b789782900] Multiple frames in a packet.
[aac @ 0x55b789782900] element type mismatch 1 != 0
[aac @ 0x55b7897663c0] element type mismatch 1 != 0
[aac @ 0x55b789767580] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x55b789767580] decode_pce: Input buffer exhausted before END element found
[mpegts @ 0x55b78975f600] PES packet size mismatch
Last message repeated 2 times
Input #0, mpegts, from 'Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748).m2ts':
Duration: 02:11:00.22, start: 71796.101911, bitrate: 4844 kb/s
Program 43969
Stream #0:0[0x31](fra,fra): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:1[0x44]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1440x1080 [SAR 4:3 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x45](fra): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 70 kb/s
Stream #0:3[0x47](qaa): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 73 kb/s
Stream #0:4[0x48](qad): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 72 kb/s
Output #0, mpegts, to 'ma_vidéo_finale.ts':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream #0:1(fra): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 70 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x55b7897cd980] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 1510562, current: 1510562; changing to 1510563. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 249717850, current: 249717850; changing to 249717851. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 249811471, current: 249811471; changing to 249811472. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 249955519, current: 249955519; changing to 249955520. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 250139182, current: 250139182; changing to 250139183. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 251406844, current: 251406844; changing to 251406845. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 251579706, current: 251579706; changing to 251579707. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 260132871, current: 260132871; changing to 260132872. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 261101651, current: 261101643; changing to 261101652. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 261130458, current: 261130458; changing to 261130459. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 407101849, current: 407101849; changing to 407101850. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 418289812, current: 418289812; changing to 418289813. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 421589101, current: 421589101; changing to 421589102. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 421675542, current: 421675542; changing to 421675543. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 421689953, current: 421689953; changing to 421689954. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 421707963, current: 421707963; changing to 421707964. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 421751184, current: 421751184; changing to 421751185. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 421877245, current: 421877245; changing to 421877246. This may result in incorrect timestamps in the output file.
[mpegts @ 0x55b7897cd980] Non-monotonous DTS in output stream 0:0; previous: 427978547, current: 427978547; changing to 427978548. This may result in incorrect timestamps in the output file.
frame=152272 fps=4311 q=-1.0 Lsize= 3612099kB time=01:41:33.99 bitrate=4855.7kbits/s speed= 173x
video:3279011kB audio:54837kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.346220%
ludovic@LibraZiK2:~/Vidéos +++/FreeBox$ ls
Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748) (copie).m2ts Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748).m2ts ma_vidéo_finale.ts
ludovic@LibraZiK2:~/Vidéos +++/FreeBox$
Alors je vais refaire l'opération en chronométrant :
ludovic@LibraZiK2:~/Vidéos +++/FreeBox$ time ffmpeg -i "Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748).m2ts" -c:a copy -c:v copy -ss 451 -t 6094 ma_vidéo_finale2.ts
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[h264 @ 0x559c1f49f200] SPS unavailable in decode_picture_timing
[h264 @ 0x559c1f49f200] non-existing PPS 0 referenced
[h264 @ 0x559c1f49f200] SPS unavailable in decode_picture_timing
[h264 @ 0x559c1f49f200] non-existing PPS 0 referenced
[h264 @ 0x559c1f49f200] decode_slice_header error
[h264 @ 0x559c1f49f200] no frame!
[aac @ 0x559c1f4bc900] Multiple frames in a packet.
[aac @ 0x559c1f4bc900] element type mismatch 1 != 0
[aac @ 0x559c1f4a03c0] element type mismatch 1 != 0
[aac @ 0x559c1f4a1580] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x559c1f4a1580] decode_pce: Input buffer exhausted before END element found
[mpegts @ 0x559c1f499600] PES packet size mismatch
Last message repeated 2 times
Input #0, mpegts, from 'Chérie 25 - Mme Irma - 27-01-2020 21h00 02h11 (2748).m2ts':
Duration: 02:11:00.22, start: 71796.101911, bitrate: 4844 kb/s
Program 43969
Stream #0:0[0x31](fra,fra): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:1[0x44]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1440x1080 [SAR 4:3 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x45](fra): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 70 kb/s
Stream #0:3[0x47](qaa): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 73 kb/s
Stream #0:4[0x48](qad): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 72 kb/s
Output #0, mpegts, to 'ma_vidéo_finale2.ts':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream #0:1(fra): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 70 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x559c1f507980] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 1510562, current: 1510562; changing to 1510563. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 249717850, current: 249717850; changing to 249717851. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 249811471, current: 249811471; changing to 249811472. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 249955519, current: 249955519; changing to 249955520. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 250139182, current: 250139182; changing to 250139183. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 251406844, current: 251406844; changing to 251406845. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 251579706, current: 251579706; changing to 251579707. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 260132871, current: 260132871; changing to 260132872. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 261101651, current: 261101643; changing to 261101652. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 261130458, current: 261130458; changing to 261130459. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 407101849, current: 407101849; changing to 407101850. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 418289812, current: 418289812; changing to 418289813. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 421589101, current: 421589101; changing to 421589102. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 421675542, current: 421675542; changing to 421675543. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 421689953, current: 421689953; changing to 421689954. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 421707963, current: 421707963; changing to 421707964. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 421751184, current: 421751184; changing to 421751185. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 421877245, current: 421877245; changing to 421877246. This may result in incorrect timestamps in the output file.
[mpegts @ 0x559c1f507980] Non-monotonous DTS in output stream 0:0; previous: 427978547, current: 427978547; changing to 427978548. This may result in incorrect timestamps in the output file.
frame=152272 fps=3143 q=-1.0 Lsize= 3612099kB time=01:41:33.99 bitrate=4855.7kbits/s speed= 126x
video:3279011kB audio:54837kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.346220%
real 0m48,616s
user 0m11,480s
sys 0m11,068s
ludovic@LibraZiK2:~/Vidéos +++/FreeBox$
48 secondes pour éditer ?
Je ne comprends pas la cuisine de ffmpeg mais je ne pense pas que mon ordinateur réencode la vidéo en 48 secondes.
Donc ça devrait presque me convenir. Je n'ai plus qu'à faire une interface graphique simpliste pour mon (futur) script à base de Zenity pour ne pas calculer manuellement les durées en secondes.
J'ai ma vidéo !
(pour l'instant je garde les publicités à l'intérieur de la vidéo mais peut-être qu'au moment de faire le script je ne garderai que la vidéo principale).
J'ai bien envie d'écrire quand-même à l'équipe de Shotcut pour leur demander la possibilité d'édition linéaire (sans réencodage) - (Mais il faut écrire en anglais).