Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (94)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (6056)

  • Stage-Whisper is not working because of missing files

    24 novembre 2023, par Tingtong

    I tried to install this here : https://github.com/Stage-Whisper/Stage-Whisper

    


    Once i put the audio file in it, it is still loading and loading but not transcribing it.

    


    So after that i checked the requirements and packages, if there is something missing and there is. I installed those here :

    


    Node (required for Electron)
Yarn (required for Electron)
Python 3.x (required for backend)
Rust (required for backend)
ffmpeg (required for backend)
Poetry (required for backend)


    


    I installed them with homebrew. There are some errors showing up, once i launch the electron programm with "yarn dev" : ERROR : "could not locate binding files"

    


    I also tried "poetry run python stagewhisper —input /path/to/audio/file.mp3", but got following message. Poetry could not find a pyproject.toml file in /Users/Administrator/Desktop/Stage-Whisper or its parents.

    


    Where do i have to put the file pyproject.toml and what do i have to write in it ?

    


    So i checked with brew info all tools which i need for Stage-Whisper. Screenshots :enter image description here
[enter image description here](https://i.stack.imgur.com/sirb3.png)

    


    What i tried was to update those packages/requirements which where missing, with "sudo port install requirementPackageName ". But after checking with brew info again, those parts are still missing. So does that actually work or do i have to install those missing stuff with homebrew ? I have Mac Mojave 10.14.6 and Homebrew 4.1.18 Version.

    


    I also got an error, while i installed those tools with homebrew :

    


    ERROR : You are using macOS 10.14.
We (and Apple) do not provide support for this old version. It is expected behaviour that some formulae will fail to build in this old version... etc

    


    Thank you for your help guys.

    


    Edit :

    


    


    yarn install v1.22.19 warning ../../../package.json : No license field
[1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4]
🔗 Linking dependencies... warning "@emotion/react >
@emotion/babel-plugin@11.10.2" has unmet peer dependency
"@babel/core@^7.0.0". warning "@emotion/react > @emotion/babel-plugin

    


    


    @babel/plugin-syntax-jsx@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0". warning " > autoprefixer@10.4.4" has unmet
peer dependency "postcss@^8.1.0". warning " >
eslint-config-airbnb@19.0.4" has unmet peer dependency
"eslint-plugin-react-hooks@^4.3.0".
[----------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/890^[4/4] 🔨 Building fresh packages... [1/7] ⠁ better-sqlite3
[-/7] ⠁ waiting... [3/7] ⠁ sqlite3 [4/7] ⠁ esbuild error
/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/better-sqlite3 :
Command failed. Exit code : 1 Command : prebuild-install || npm run
build-release Arguments : Directory :
/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/better-sqlite3
Output : prebuild-install warn install No prebuilt binaries found
(target=20.9.0 runtime=node arch=x64 libc= platform=darwin)

    


    


    


    better-sqlite3@7.6.2 build-release
node-gyp rebuild —release

    


    


    gyp info it worked if it ends with ok gyp info using node-gyp@9.3.0
gyp info using node@20.9.0 | darwin | x64 gyp info find Python using
Python version 3.9.14 found at "/usr/local/bin/python3" gyp info spawn
/usr/local/bin/python3 gyp info spawn args [ gyp info spawn args
    
'/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/electron-rebuild/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp
info spawn args 'make', gyp info spawn args '-I', gyp info spawn
args
    
'/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args '-I', gyp info spawn args
    
'/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/electron-rebuild/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I', gyp info spawn args
    
'/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args
'-Dvisibility=default', gyp info spawn args
    
'-Dnode_root_dir=/Users/administrator/Library/Caches/node-gyp/20.9.0',
gyp info spawn args
    
'-Dnode_gyp_dir=/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/electron-rebuild/node_modules/node-gyp',
gyp info spawn args
    &#xA;'-Dnode_lib_file=/Users/administrator/Library/Caches/node-gyp/20.9.0/<(target_arch)/node.lib',&#xA;gyp info spawn args
    &#xA;'-Dmodule_root_dir=/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/better-sqlite3',&#xA;gyp info spawn args '-Dnode_engine=v8', gyp info spawn args
    &#xA;'—depth=.', gyp info spawn args '—no-parallel', gyp info spawn&#xA;args '—generator-output', gyp info spawn args 'build', gyp info&#xA;spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn&#xA;make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    &#xA;TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate ACTION&#xA;deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3&#xA;ba23eeee118cd63e16015df367567cb043fed872.intermediate TOUCH&#xA;Release/obj.target/deps/locate_sqlite3.stamp CC(target)&#xA;Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o LIBTOOL-STATIC&#xA;Release/sqlite3.a CXX(target)&#xA;Release/obj.target/better_sqlite3/src/better_sqlite3.o In file&#xA;included from ../src/better_sqlite3.cpp:4 : In file included from&#xA;./src/better_sqlite3.lzz:11 : In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/node.h:73 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:12 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-local-handle.h:12 :&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS)&#xA;^ /Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;PER_ISOLATE_EXTERNAL_POINTER_TAGS(CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS)&#xA;^ /Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:693:61 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;static_assert(kJSObjectType + 1 == kFirstJSApiObjectType) ;&#xA;^&#xA;, "" /Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:694:55 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;static_assert(kJSObjectType < kLastJSApiObjectType) ;&#xA;^&#xA;, "" /Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:695:63 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;static_assert(kFirstJSApiObjectType < kLastJSApiObjectType) ;&#xA;^&#xA;, "" In file included from ../src/better_sqlite3.cpp:4 : In file included from&#xA;./src/better_sqlite3.lzz:11 : In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/node.h:73 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:13 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:9 :&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:106:45 :&#xA;error : no template named 'is_lvalue_reference_v' in namespace 'std' ;&#xA;did you mean 'is_lvalue_reference' ? template >&#xA; ^ &#xA;is_lvalue_reference /Library/Developer/CommandLineTools/usr/include/c++/v1/type_traits:780:50 :&#xA;note : 'is_lvalue_reference' declared here template struct&#xA;_LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {} ;&#xA;^ In file included from ../src/better_sqlite3.cpp:4 : In file included from&#xA;./src/better_sqlite3.lzz:11 : In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/node.h:73 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:13 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:9 :&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:106:69 :&#xA;error : expected '(' for function-style cast or type construction
    &#xA;template
    >&#xA; ^ /Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:123:43 :&#xA;error : no template named 'is_lvalue_reference_v' in namespace 'std' ;&#xA;did you mean 'is_lvalue_reference' ? template * = nullptr>&#xA; ^ &#xA;is_lvalue_reference /Library/Developer/CommandLineTools/usr/include/c++/v1/type_traits:780:50 :&#xA;note : 'is_lvalue_reference' declared here template struct&#xA;_LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {} ;&#xA;^ In file included from ../src/better_sqlite3.cpp:4 : In file included from&#xA;./src/better_sqlite3.lzz:11 : In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/node.h:73 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:13 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:9 :&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:123:67 :&#xA;error : expected '(' for function-style cast or type construction&#xA;template * =&#xA;nullptr>&#xA; ^ In file included from ../src/better_sqlite3.cpp:4 : In file included from&#xA;./src/better_sqlite3.lzz:11 : In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/node.h:73 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8.h:33 :&#xA;In file included from&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-function.h:11 :&#xA;/Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-function-callback.h:151:66 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;kReturnValueDefaultValueIndex - kReturnValueIndex) ;&#xA;^&#xA;, "" /Users/administrator/Library/Caches/node-gyp/20.9.0/include/node/v8-function-callback.h:153:50 :&#xA;warning : static_assert with no message is a C++17 extension&#xA;[-Wc++17-extensions]&#xA;kIsolateIndex - kReturnValueIndex) ;&#xA;^&#xA;, "" ./src/util/macros.lzz:157:21 : error : no member named&#xA;'AccessorSignature' in namespace 'v8'&#xA;v8::AccessorSignature::New(isolate, recv)&#xA; ^ ./src/util/binder.lzz:37:51 : error : no member named 'CreationContext' in 'v8::Object'&#xA;v8::Local ctx = obj->CreationContext() ;&#xA; ^ 22 warnings and 6 errors generated. make : ***&#xA;[Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1 rm&#xA;ba23eeee118cd63e16015df367567cb043fed872.intermediate gyp ERR ! build&#xA;error gyp ERR ! stack Error : make failed with exit code : 2 gyp ERR !&#xA;stack at ChildProcess.onExit&#xA;(/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/electron-rebuild/node_modules/node-gyp/lib/build.js:203:23)&#xA;gyp ERR ! stack at ChildProcess.emit (node:events:514:28) gyp ERR !&#xA;stack at ChildProcess._handle.onexit&#xA;(node:internal/child_process:294:12) gyp ERR ! System Darwin 18.7.0 gyp&#xA;ERR ! command "/usr/local/bin/node"&#xA;"/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/.bin/node-gyp"&#xA;"rebuild" "—release" gyp ERR ! cwd&#xA;/Users/administrator/Desktop/Stage-Whisper/electron/node_modules/better-sqlite3

    &#xA;

    &#xA;

    Same goes for the the "poetry install" command in the backend folder :

    &#xA;

    8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/build/onig_sys-3a9a2f947b5ad744/outwarning: variable does not need to be mutable --> tokenizers-lib/src/models/unigram/model.rs:265:21 | 265 |                 let mut target_node = &amp;mut best_path_ends_at[key_pos]; |                     ----^^^^^^^^^^^ |                     | |                     help: remove thismut| = note:#[warn(unused_mut)]` on by default

    &#xA;

    warning : variable does not need to be mutable&#xA;—> tokenizers-lib/src/models/unigram/model.rs:282:21&#xA;|&#xA;282 | let mut target_node = &mut best_path_ends_at[starts_at + mblen] ;&#xA;| ----^^^^^^^^^^^&#xA;| |&#xA;| help : remove this mut

    &#xA;

    warning : variable does not need to be mutable&#xA;—> tokenizers-lib/src/pre_tokenizers/byte_level.rs:200:59&#xA;|&#xA;200 | encoding.process_tokens_with_offsets_mut(|(i, (token, mut offsets))| &#xA;| ----^^^^^^^&#xA;| |&#xA;| help : remove this mut

    &#xA;

    error : casting &amp;T to &amp;mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell&#xA;—> tokenizers-lib/src/models/bpe/trainer.rs:526:47&#xA;|&#xA;522 | let w = &words[*i] as *const _ as *mut _ ;&#xA;| -------------------------------- casting happend here&#xA;...&#xA;526 | let word : &mut Word = &mut (*w) ;&#xA;| ^^^^^^^^^&#xA;|&#xA;= note : #[deny(invalid_reference_casting)] on by default

    &#xA;

    warning : tokenizers (lib) generated 3 warnings&#xA;error : could not compile tokenizers (lib) due to previous error ; 3 warnings emitted

    &#xA;

    Caused by :&#xA;process didn't exit successfully : /Users/administrator/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc --crate-name tokenizers --edition=2018 tokenizers-lib/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg &#x27;feature="cached-path"&#x27; --cfg &#x27;feature="clap"&#x27; --cfg &#x27;feature="cli"&#x27; --cfg &#x27;feature="default"&#x27; --cfg &#x27;feature="http"&#x27; --cfg &#x27;feature="indicatif"&#x27; --cfg &#x27;feature="progressbar"&#x27; --cfg &#x27;feature="reqwest"&#x27; -C metadata=cb36f9861d265e60 -C extra-filename=-cb36f9861d265e60 --out-dir /private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps -L dependency=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps --extern aho_corasick=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libaho_corasick-021885281f13d108.rmeta --extern cached_path=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libcached_path-767095c4d4a77107.rmeta --extern clap=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libclap-c92d2593d8a75e62.rmeta --extern derive_builder=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libderive_builder-833217c2af636976.dylib --extern dirs=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libdirs-f12e99ecd3a76eae.rmeta --extern esaxx_rs=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libesaxx_rs-b694f04df571686b.rmeta --extern indicatif=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libindicatif-39491a3282a24810.rmeta --extern itertools=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libitertools-b322e49e83853c17.rmeta --extern lazy_static=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/liblazy_static-28a96417d88df3c9.rmeta --extern log=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/liblog-937f94f366843d8a.rmeta --extern macro_rules_attribute=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libmacro_rules_attribute-d4d77bee9330e675.rmeta --extern onig=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libonig-7f9dab4334743bdf.rmeta --extern paste=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libpaste-a36a4a0dbc2ac63f.dylib --extern rand=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/librand-4b1adc86e35ea892.rmeta --extern rayon=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/librayon-d134e48f83d52e6e.rmeta --extern rayon_cond=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/librayon_cond-5715a923c66c54a9.rmeta --extern regex=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libregex-a5c54f2d0034ab98.rmeta --extern regex_syntax=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libregex_syntax-58c405f62323b6ed.rmeta --extern reqwest=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libreqwest-1551c89d20e17f58.rmeta --extern serde=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libserde-f4748cc953dd1338.rmeta --extern serde_json=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libserde_json-5fba404e8440399e.rmeta --extern spm_precompiled=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libspm_precompiled-6bd24072bd3c9d31.rmeta --extern thiserror=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libthiserror-bcbb2769006ee534.rmeta --extern unicode_normalization_alignments=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libunicode_normalization_alignments-658520cf6a5461dc.rmeta --extern unicode_segmentation=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libunicode_segmentation-fffd829ab6256bb0.rmeta --extern unicode_categories=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/deps/libunicode_categories-e3815c3d18c1086b.rmeta -L native=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/build/bzip2-sys-d2cb72d65b178690/out/lib -L native=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/build/zstd-sys-ddff0154a55a136c/out -L native=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/build/esaxx-rs-69d9e34a40d41449/out -L native=/private/var/folders/zc/c2qvlcjd5cgcg5l84484t8vh0000gt/T/tmp2yohvwu_/tokenizers-0.12.1/target/release/build/onig_sys-3a9a2f947b5ad744/out (exit status : 1)&#xA;error : cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib -- -C &#x27;link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/tokenizers.cpython-311-darwin.so&#x27; failed with code 101

    &#xA;

    at /usr/local/lib/python3.11/site-packages/poetry/installation/chef.py:166 in _prepare&#xA;162│&#xA;163│ error = ChefBuildError("\n\n".join(message_parts))&#xA;164│&#xA;165│ if error is not None :&#xA;→ 166│ raise error from None&#xA;167│&#xA;168│ return path&#xA;169│&#xA;170│ def _prepare_sdist(self, archive : Path, destination : Path | None = None) -> Path :

    &#xA;

    Note : This error originates from the build backend, and is likely not a problem with poetry but with tokenizers (0.12.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel —no-cache-dir —use-pep517 "tokenizers (==0.12.1)"'.

    &#xA;

    UPDATE (SOLVED) :

    &#xA;

      &#xA;
    • i found a solution and this worked for me :
    • &#xA;

    &#xA;

    "I had the same problem and nothing mentioned here worked for me. Here is what worked for me :

    &#xA;

    **("Didnt do this Part")"Require all dependencies you need in the main.js file that is run by electron."**    &#xA;

    &#xA;

    What i did was :&#xA;Run npm i -D electron-rebuild to add the electron-rebuild package&#xA;Remove the node-modules folder, as well as the packages-lock.json file.&#xA;Run npm i to install all modules.&#xA;Run ./node_modules/.bin/electron-rebuild (.\node_modules.bin\electron-rebuild.cmd for Windows) to rebuild everything

    &#xA;

    It is very important to run ./node_modules/.bin/electron-rebuild directly after npm i otherwise it did not work on my mac."

    &#xA;

    But now i get following Error, when i upload and transcribe the file :

    &#xA;

    > [ELECTRON] NewEntry: Creating new entry with UUID: XY...&#xA;[ELECTRON] NewEntry: Copying audio file to store...&#xA;[ELECTRON] NewEntry: Audio file copied to store.&#xA;[ELECTRON] NewEntry: Entry added to database!&#xA;[ELECTRON] RunWhisper: Running model with args [&#xA;[ELECTRON]   &#x27;--verbose&#x27;,&#xA;[ELECTRON]   &#x27;true&#x27;,&#xA;[ELECTRON]   &#x27;--output_dir&#x27;,&#xA;[ELECTRON]   &#x27;/Users/administrator/Library/Application Support/stagewhisper/store/whisper/2a07203b-ad88-438c-babf-b600cb76aa1d&#x27;,&#xA;[ELECTRON]   &#x27;--task&#x27;,&#xA;[ELECTRON]   &#x27;translate&#x27;,&#xA;[ELECTRON]   &#x27;--model&#x27;,&#xA;[ELECTRON]   &#x27;base&#x27;,&#xA;[ELECTRON]   &#x27;--device&#x27;,&#xA;[ELECTRON]   &#x27;cpu&#x27;,&#xA;[ELECTRON]   &#x27;--input&#x27;,&#xA;[ELECTRON]   &#x27;/Users/administrator/Library/Application Support/stagewhisper/store/audio/harvard.mp3&#x27;&#xA;[ELECTRON] ]&#xA;[ELECTRON] RunWhisper: Child process closed with code 1&#xA;[ELECTRON] RunWhisper: Error running whisper script!&#xA;[ELECTRON] Error occurred in handler for &#x27;run-whisper&#x27;: Error: Error running whisper script!&#xA;[ELECTRON]     at ChildProcess.<anonymous> (/Users/administrator/Desktop/Stage-Whisper/electron/main/handlers/runWhisper/runWhisper.js:234:31)&#xA;[ELECTRON]     at ChildProcess.emit (node:events:390:28)&#xA;[ELECTRON]     at maybeClose (node:internal/child_process:1064:16)&#xA;[ELECTRON]     at Socket.<anonymous> (node:internal/child_process:450:11)&#xA;[ELECTRON]     at Socket.emit (node:events:390:28)&#xA;[ELECTRON]     at Pipe.<anonymous> (node:net:687:12)&#xA;&#xA; &#xA;</anonymous></anonymous></anonymous>

    &#xA;

  • Save video using opencv with H264 codec

    31 octobre 2023, par ldiaz997

    This is beyond me and I don't know what I'm doing wrong. I have read that in order to have my video in h265 codec, I need to build opencv from source. Well, I did that, and I also did it for ffmpeg Docker ffmpeg Compiler. But I'm trying to run my application using docker, and I still can't get over the error :

    &#xA;

    [ERROR:0@93.327] global cap_ffmpeg_impl.hpp:3018 open Could not find encoder for codec_id=27, error: Encoder not found&#xA;[ERROR:0@93.327] global cap_ffmpeg_impl.hpp:3093 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter&#xA;

    &#xA;

    Dockerfile :

    &#xA;

    FROM python:3.10.12-slim-buster&#xA;&#xA;RUN apt-get update&#xA;&#xA;# Set the working directory in the container&#xA;WORKDIR /app&#xA;&#xA;# Copy the application code into the container&#xA;COPY . .&#xA;&#xA;# Set ffmpeg and ffprobe binary files&#xA;RUN mv ffmpeg /usr/local/bin&#xA;RUN mv ffprobe /usr/local/bin&#xA;&#xA;# Build opencv from source, to be able to use h264 codec.&#xA;RUN apt-get install -y cmake \&#xA;    gcc \&#xA;    g&#x2B;&#x2B; \&#xA;    python3-numpy \&#xA;    libavcodec-dev \&#xA;    libavformat-dev \&#xA;    libswscale-dev \&#xA;    libgstreamer-plugins-base1.0-dev \&#xA;    libgstreamer1.0-dev \&#xA;    libpng-dev \&#xA;    libjpeg-dev \&#xA;    libopenexr-dev \&#xA;    libtiff-dev \&#xA;    libwebp-dev \&#xA;    git&#xA;&#xA;RUN git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv.git &amp;&amp; \&#xA;    git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv_contrib.git &amp;&amp; \&#xA;    cd opencv &amp;&amp; \&#xA;    mkdir build &amp;&amp; \&#xA;    cd build &amp;&amp; \&#xA;    cmake -D OPENCV_EXTRA_MODULES_PATH=/app/opencv_contrib/modules ../ &amp;&amp; \&#xA;    make -j"$(nproc)" &amp;&amp; \&#xA;    make install&#xA;&#xA;# Remove opencv github project&#xA;RUN rm -r opencv&#xA;&#xA;# Remove opencv_contrib github project&#xA;RUN rm -r opencv_contrib&#xA;&#xA;# Prevents Python from writing pyc files to disc&#xA;ENV PYTHONDONTWRITEBYTECODE 1&#xA;&#xA;# Prevents Python from buffering stdout and stderr&#xA;ENV PYTHONUNBUFFERED 1&#xA;&#xA;# Install python dependencies&#xA;RUN pip install --upgrade pip&#xA;RUN pip install --no-cache-dir -r requirements.txt&#xA;&#xA;# Install netcat to know when rabbitmq is running&#xA;RUN apt-get install -y netcat&#xA;&#xA;# Set execute permissions&#xA;RUN chmod &#x2B;x entrypoint.sh&#xA;RUN chmod &#x2B;x web_start.sh&#xA;&#xA;ENTRYPOINT ["./entrypoint.sh"]&#xA;

    &#xA;

    I ran the command ./ffmpeg -i 57b3e3a7-ad22-469d-a7ff-cf76ba780664 -vcodec libx264 -acodec aac output.mp4 to test ffmpeg and this was the result.

    &#xA;

    ffmpeg version N-112515-gba6a5e7a3d Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609&#xA;  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-libs=-static --extra-cflags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs=&#x27;-lpthread -lm&#x27; --bindir=/root/bin --enable-gpl --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree&#xA;  libavutil      58. 27.100 / 58. 27.100&#xA;  libavcodec     60. 30.102 / 60. 30.102&#xA;  libavformat    60. 15.101 / 60. 15.101&#xA;  libavdevice    60.  2.101 / 60.  2.101&#xA;  libavfilter     9. 11.100 /  9. 11.100&#xA;  libswscale      7.  4.100 /  7.  4.100&#xA;  libswresample   4. 11.100 /  4. 11.100&#xA;  libpostproc    57.  2.100 / 57.  2.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;57b3e3a7-ad22-469d-a7ff-cf76ba780664&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    creation_time   : 2023-10-30T15:34:32.000000Z&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    com.apple.quicktime.creationdate: 2023-10-30T11:34:32-0400&#xA;  Duration: 00:00:03.60, start: 0.000000, bitrate: 16264 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 16120 kb/s, 29.99 fps, 29.97 tbr, 600 tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Video&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : H.264&#xA;    Side data:&#xA;      displaymatrix: rotation of -90.00 degrees&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 89 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:2[0x3](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:3[0x4](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:4[0x5](und): Data: none (mebx / 0x7862656D), 34 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x5ae4c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2&#xA;[libx264 @ 0x5ae4c00] profile High, level 4.0&#xA;[libx264 @ 0x5ae4c00] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=30 lookahead_threads=5 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, mp4, to &#x27;output.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    com.apple.quicktime.creationdate: 2023-10-30T11:34:32-0400&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    encoder         : Lavf60.15.101&#xA;  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1080x1920, q=2-31, 29.97 fps, 30k tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Video&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc60.30.102 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;      displaymatrix: rotation of -0.00 degrees&#xA;  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-30T15:34:32.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc60.30.102 aac&#xA;[out#0/mp4 @ 0x5ae3440] video:2773kB audio:31kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.157082%&#xA;frame=  108 fps= 74 q=-1.0 Lsize=    2809kB time=00:00:03.59 bitrate=6393.3kbits/s speed=2.47x    &#xA;[libx264 @ 0x5ae4c00] frame I:4     Avg QP:22.27  size: 48408&#xA;[libx264 @ 0x5ae4c00] frame P:104   Avg QP:24.58  size: 25440&#xA;[libx264 @ 0x5ae4c00] mb I  I16..4: 10.3% 82.9%  6.8%&#xA;[libx264 @ 0x5ae4c00] mb P  I16..4:  4.6% 18.1%  0.8%  P16..4: 40.3%  6.9%  4.1%  0.0%  0.0%    skip:25.3%&#xA;[libx264 @ 0x5ae4c00] 8x8 transform intra:78.0% inter:85.0%&#xA;[libx264 @ 0x5ae4c00] coded y,uvDC,uvAC intra: 44.9% 29.1% 0.1% inter: 22.5% 23.3% 0.0%&#xA;[libx264 @ 0x5ae4c00] i16 v,h,dc,p: 17% 49% 14% 19%&#xA;[libx264 @ 0x5ae4c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 25% 37%  3%  3%  5%  3%  2%  4%&#xA;[libx264 @ 0x5ae4c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 30% 17%  3%  4%  8%  3%  2%  3%&#xA;[libx264 @ 0x5ae4c00] i8c dc,h,v,p: 67% 20% 12%  0%&#xA;[libx264 @ 0x5ae4c00] Weighted P-Frames: Y:1.9% UV:0.0%&#xA;[libx264 @ 0x5ae4c00] ref P L0: 61.8% 10.4% 18.3%  9.4%  0.2%&#xA;[libx264 @ 0x5ae4c00] kb/s:6303.40&#xA;[aac @ 0x68c9880] Qavg: 119.986&#xA;

    &#xA;

    The resulting video had an h264 codec. In my opinion, the problem is in opencv. Basically this is what I do in my python code :

    &#xA;

    cap = cv2.VideoCapture(video)&#xA;shoot_frames = []&#xA;while True:&#xA;    ret, img = cap.read()&#xA;    if not ret:&#xA;       break&#xA;    if some_condition:&#xA;       shoot_frames.append(img)&#xA;    if len(shoot_frames) > 41:&#xA;       out1 = cv2.VideoWriter(upload_path(name , dir), cv2.VideoWriter_fourcc(*&#x27;avc1&#x27;), int(fps), (int(width), int(height)), True)&#xA;       for shoot_frame in shoot_frames:&#xA;           out1.write(shoot_frame)&#xA;       out1.release()&#xA;       shoot_frames = []&#xA;

    &#xA;

    Output from print(cv2.getBuildInformation()) :

    &#xA;

    General configuration for OpenCV 4.8.1 =====================================&#xA;  Version control:               4.8.1-dirty&#xA;&#xA;  Platform:&#xA;    Timestamp:                   2023-09-27T14:20:56Z&#xA;    Host:                        Linux 5.15.0-1046-azure x86_64&#xA;    CMake:                       3.27.5&#xA;    CMake generator:             Unix Makefiles&#xA;    CMake build tool:            /bin/gmake&#xA;    Configuration:               Release&#xA;&#xA;  CPU/HW features:&#xA;    Baseline:                    SSE SSE2 SSE3&#xA;      requested:                 SSE3&#xA;    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX&#xA;      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX&#xA;      SSE4_1 (16 files):         &#x2B; SSSE3 SSE4_1&#xA;      SSE4_2 (1 files):          &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2&#xA;      FP16 (0 files):            &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX&#xA;      AVX (7 files):             &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 AVX&#xA;      AVX2 (35 files):           &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2&#xA;      AVX512_SKX (5 files):      &#x2B; SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX&#xA;&#xA;  C/C&#x2B;&#x2B;:&#xA;    Built as dynamic libs?:      NO&#xA;    C&#x2B;&#x2B; standard:                11&#xA;    C&#x2B;&#x2B; Compiler:                /opt/rh/devtoolset-10/root/usr/bin/c&#x2B;&#x2B;  (ver 10.2.1)&#xA;    C&#x2B;&#x2B; flags (Release):         -Wl,-strip-all   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG&#xA;    C&#x2B;&#x2B; flags (Debug):           -Wl,-strip-all   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG&#xA;    C Compiler:                  /opt/rh/devtoolset-10/root/usr/bin/cc&#xA;    C flags (Release):           -Wl,-strip-all   -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG&#xA;    C flags (Debug):             -Wl,-strip-all   -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG&#xA;    Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -L/ffmpeg_build/lib  -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  &#xA;    Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -L/ffmpeg_build/lib  -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  &#xA;    ccache:                      YES&#xA;    Precompiled headers:         NO&#xA;    Extra dependencies:          /lib64/libopenblas.so Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent /usr/local/lib/libpng.so /lib64/libz.so dl m pthread rt&#xA;    3rdparty dependencies:       libprotobuf ade ittnotify libjpeg-turbo libwebp libtiff libopenjp2 IlmImf quirc ippiw ippicv&#xA;&#xA;  OpenCV modules:&#xA;    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio&#xA;    Disabled:                    world&#xA;    Disabled by dependency:      -&#xA;    Unavailable:                 java python2 ts&#xA;    Applications:                -&#xA;    Documentation:               NO&#xA;    Non-free algorithms:         NO&#xA;&#xA;  GUI:                           QT5&#xA;    QT:                          YES (ver 5.15.0 )&#xA;      QT OpenGL support:         NO&#xA;    GTK&#x2B;:                        NO&#xA;    VTK support:                 NO&#xA;&#xA;  Media I/O: &#xA;    ZLib:                        /lib64/libz.so (ver 1.2.7)&#xA;    JPEG:                        libjpeg-turbo (ver 2.1.3-62)&#xA;    WEBP:                        build (ver encoder: 0x020f)&#xA;    PNG:                         /usr/local/lib/libpng.so (ver 1.6.40)&#xA;    TIFF:                        build (ver 42 - 4.2.0)&#xA;    JPEG 2000:                   build (ver 2.5.0)&#xA;    OpenEXR:                     build (ver 2.3.0)&#xA;    HDR:                         YES&#xA;    SUNRASTER:                   YES&#xA;    PXM:                         YES&#xA;    PFM:                         YES&#xA;&#xA;  Video I/O:&#xA;    DC1394:                      NO&#xA;    FFMPEG:                      YES&#xA;      avcodec:                   YES (59.37.100)&#xA;      avformat:                  YES (59.27.100)&#xA;      avutil:                    YES (57.28.100)&#xA;      swscale:                   YES (6.7.100)&#xA;      avresample:                NO&#xA;    GStreamer:                   NO&#xA;    v4l/v4l2:                    YES (linux/videodev2.h)&#xA;&#xA;  Parallel framework:            pthreads&#xA;&#xA;  Trace:                         YES (with Intel ITT)&#xA;&#xA;  Other third-party libraries:&#xA;    Intel IPP:                   2021.8 [2021.8.0]&#xA;           at:                   /io/_skbuild/linux-x86_64-3.7/cmake-build/3rdparty/ippicv/ippicv_lnx/icv&#xA;    Intel IPP IW:                sources (2021.8.0)&#xA;              at:                /io/_skbuild/linux-x86_64-3.7/cmake-build/3rdparty/ippicv/ippicv_lnx/iw&#xA;    VA:                          NO&#xA;    Lapack:                      YES (/lib64/libopenblas.so)&#xA;    Eigen:                       NO&#xA;    Custom HAL:                  NO&#xA;    Protobuf:                    build (3.19.1)&#xA;    Flatbuffers:                 builtin/3rdparty (23.5.9)&#xA;&#xA;  OpenCL:                        YES (no extra features)&#xA;    Include path:                /io/opencv/3rdparty/include/opencl/1.2&#xA;    Link libraries:              Dynamic load&#xA;&#xA;  Python 3:&#xA;    Interpreter:                 /opt/python/cp37-cp37m/bin/python3.7 (ver 3.7.17)&#xA;    Libraries:                   libpython3.7m.a (ver 3.7.17)&#xA;    numpy:                       /home/ci/.local/lib/python3.7/site-packages/numpy/core/include (ver 1.17.0)&#xA;    install path:                python/cv2/python-3&#xA;&#xA;  Python (for build):            /opt/python/cp37-cp37m/bin/python3.7&#xA;&#xA;  Java:                          &#xA;    ant:                         NO&#xA;    Java:                        NO&#xA;    JNI:                         NO&#xA;    Java wrappers:               NO&#xA;    Java tests:                  NO&#xA;&#xA;  Install to:                    /io/_skbuild/linux-x86_64-3.7/cmake-install&#xA;-----------------------------------------------------------------&#xA;&#xA;&#xA;

    &#xA;

    Update

    &#xA;

    I made my docker image more simpler, and therefore my question. Install ffmpeg from the repository :

    &#xA;

    FROM python:3.10.12-slim-buster&#xA;&#xA;RUN apt-get update&#xA;&#xA;# Set the working directory in the container&#xA;WORKDIR /app&#xA;&#xA;# Install ffmpeg for opencv&#xA;RUN apt-get install -y ffmpeg&#xA;&#xA;# Copy the application code into the container&#xA;COPY . .&#xA;&#xA;# Build opencv from source, to be able to use h264 codec.&#xA;RUN apt-get install -y cmake \&#xA;    gcc \&#xA;    g&#x2B;&#x2B; \&#xA;    python3-numpy \&#xA;    libavcodec-dev \&#xA;    libavformat-dev \&#xA;    libswscale-dev \&#xA;    libgstreamer-plugins-base1.0-dev \&#xA;    libgstreamer1.0-dev \&#xA;    libpng-dev \&#xA;    libjpeg-dev \&#xA;    libopenexr-dev \&#xA;    libtiff-dev \&#xA;    libwebp-dev \&#xA;    git&#xA;&#xA;RUN git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv.git &amp;&amp; \&#xA;    git clone --depth 1 --branch 4.8.0 https://github.com/opencv/opencv_contrib.git &amp;&amp; \&#xA;    cd opencv &amp;&amp; \&#xA;    mkdir build &amp;&amp; \&#xA;    cd build &amp;&amp; \&#xA;    cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=/app/opencv_contrib/modules -D OPENCV_ENABLE_NONFREE=ON ../ &amp;&amp; \&#xA;    make -j"$(nproc)" &amp;&amp; \&#xA;    make install&#xA;&#xA;# Remove opencv github project&#xA;RUN rm -r opencv&#xA;&#xA;# Remove opencv_contrib github project&#xA;RUN rm -r opencv_contrib&#xA;&#xA;# Prevents Python from writing pyc files to disc&#xA;ENV PYTHONDONTWRITEBYTECODE 1&#xA;&#xA;# Prevents Python from buffering stdout and stderr&#xA;ENV PYTHONUNBUFFERED 1&#xA;&#xA;# Install python dependencies&#xA;RUN pip install --upgrade pip&#xA;RUN pip install --no-cache-dir -r requirements.txt&#xA;&#xA;# Install netcat to know when rabbitmq is running&#xA;RUN apt-get install -y netcat&#xA;&#xA;# Set execute permissions&#xA;RUN chmod &#x2B;x entrypoint.sh&#xA;RUN chmod &#x2B;x web_start.sh&#xA;&#xA;ENTRYPOINT ["./entrypoint.sh"]&#xA;

    &#xA;

    Run the following commands inside the docker container :

    &#xA;

    $ ffmpeg -version&#xA;&#xA;ffmpeg version 4.1.11-0&#x2B;deb10u1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --prefix=/usr --extra-version=0&#x2B;deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;libavutil      56. 22.100 / 56. 22.100&#xA;libavcodec     58. 35.100 / 58. 35.100&#xA;libavformat    58. 20.100 / 58. 20.100&#xA;libavdevice    58.  5.100 / 58.  5.100&#xA;libavfilter     7. 40.101 /  7. 40.101&#xA;libavresample   4.  0.  0 /  4.  0.  0&#xA;libswscale      5.  3.100 /  5.  3.100&#xA;libswresample   3.  3.100 /  3.  3.100&#xA;libpostproc    55.  3.100 / 55.  3.100&#xA;

    &#xA;

    $ ffmpeg -i cf91f302-c357-49ba-b59c-bcfb8b7f4866 -vcodec libx264 -f mp4 output.mp4&#xA;&#xA;ffmpeg version 4.1.11-0&#x2B;deb10u1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --prefix=/usr --extra-version=0&#x2B;deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 22.100 / 56. 22.100&#xA;  libavcodec     58. 35.100 / 58. 35.100&#xA;  libavformat    58. 20.100 / 58. 20.100&#xA;  libavdevice    58.  5.100 / 58.  5.100&#xA;  libavfilter     7. 40.101 /  7. 40.101&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  3.100 /  5.  3.100&#xA;  libswresample   3.  3.100 /  3.  3.100&#xA;  libpostproc    55.  3.100 / 55.  3.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;cf91f302-c357-49ba-b59c-bcfb8b7f4866&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    creation_time   : 2023-10-31T10:38:42.000000Z&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    com.apple.quicktime.creationdate: 2023-10-31T06:38:42-0400&#xA;  Duration: 00:00:04.23, start: 0.000000, bitrate: 15915 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 15767 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)&#xA;    Metadata:&#xA;      rotate          : 90&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Video&#xA;      encoder         : H.264&#xA;    Side data:&#xA;      displaymatrix: rotation of -90.00 degrees&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 89 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Audio&#xA;    Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;    Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;    Stream #0:4(und): Data: none (mebx / 0x7862656D), 34 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x55db965ee980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x55db965ee980] profile High, level 4.0&#xA;[libx264 @ 0x55db965ee980] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, mp4, to &#x27;output.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 0&#xA;    compatible_brands: qt  &#xA;    com.apple.quicktime.creationdate: 2023-10-31T06:38:42-0400&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 13 Pro Max&#xA;    com.apple.quicktime.software: 16.6&#xA;    encoder         : Lavf58.20.100&#xA;    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1080x1920, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.35.100 libx264&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Video&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;      displaymatrix: rotation of -0.00 degrees&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-10-31T10:38:42.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      encoder         : Lavc58.35.100 aac&#xA;frame=  127 fps= 27 q=-1.0 Lsize=    2005kB time=00:00:04.24 bitrate=3866.2kbits/s speed=0.909x    &#xA;video:1964kB audio:36kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.282549%&#xA;[libx264 @ 0x55db965ee980] frame I:1     Avg QP:21.43  size: 36791&#xA;[libx264 @ 0x55db965ee980] frame P:59    Avg QP:23.61  size: 22380&#xA;[libx264 @ 0x55db965ee980] frame B:67    Avg QP:24.20  size:  9743&#xA;[libx264 @ 0x55db965ee980] consecutive B-frames: 20.5% 22.0% 16.5% 40.9%&#xA;[libx264 @ 0x55db965ee980] mb I  I16..4: 29.4% 58.6% 11.9%&#xA;[libx264 @ 0x55db965ee980] mb P  I16..4: 15.0% 21.8%  1.3%  P16..4: 26.1%  7.5%  3.1%  0.0%  0.0%    skip:25.2%&#xA;[libx264 @ 0x55db965ee980] mb B  I16..4:  1.9%  1.7%  0.1%  B16..8: 36.3%  3.6%  0.5%  direct: 3.9%  skip:52.1%  L0:42.9% L1:52.1% BI: 5.0%&#xA;[libx264 @ 0x55db965ee980] 8x8 transform intra:56.2% inter:86.6%&#xA;[libx264 @ 0x55db965ee980] coded y,uvDC,uvAC intra: 19.5% 27.3% 2.1% inter: 11.7% 18.9% 0.1%&#xA;[libx264 @ 0x55db965ee980] i16 v,h,dc,p: 25% 54%  8% 12%&#xA;[libx264 @ 0x55db965ee980] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 25% 44%  1%  2%  2%  2%  1%  1%&#xA;[libx264 @ 0x55db965ee980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 45% 13%  2%  7%  6%  6%  3%  3%&#xA;[libx264 @ 0x55db965ee980] i8c dc,h,v,p: 62% 27% 10%  1%&#xA;[libx264 @ 0x55db965ee980] Weighted P-Frames: Y:3.4% UV:0.0%&#xA;[libx264 @ 0x55db965ee980] ref P L0: 65.2% 18.0% 12.2%  4.6%  0.1%&#xA;[libx264 @ 0x55db965ee980] ref B L0: 89.1%  9.3%  1.6%&#xA;[libx264 @ 0x55db965ee980] ref B L1: 97.2%  2.8%&#xA;[libx264 @ 0x55db965ee980] kb/s:3798.37&#xA;[aac @ 0x55db965edf00] Qavg: 125.454&#xA;

    &#xA;

    The errors persist.

    &#xA;

    >>> import cv2&#xA;>>> out = cv2.VideoWriter("./out.mp4", cv2.VideoWriter_fourcc(*&#x27;avc1&#x27;), 30, (800, 600), True)&#xA;[ERROR:0@91.872] global cap_ffmpeg_impl.hpp:3018 open Could not find encoder for codec_id=27, error: Encoder not found&#xA;[ERROR:0@91.872] global cap_ffmpeg_impl.hpp:3093 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter&#xA;

    &#xA;

    Could someone please tell me what I'm doing wrong ?

    &#xA;

  • Different PTS values in ffmpeg and MP4 CTS values obtained using ctts and stts

    26 septembre 2023, par userDtrm

    I have been studying PTS values in .mp4 media files. PTS for video stream can be extracted from ffmpeg CLI using

    &#xA;

    &#xA;&#xA;    ffmpeg -hide_banner -i  -vf "showinfo" -f null -&#xA;&#xA;

    &#xA;

    For a sample .mp4 I have downloaded from the internet shows the following output.

    &#xA;

    &#xA;&#xA;    Press [q] to stop, [?] for help&#xA;    [Parsed_showinfo_0 @ 0x3741c00] config in time_base : 1/30, frame_rate : 30/1&#xA;    [Parsed_showinfo_0 @ 0x3741c00] config out time_base : 0/0, frame_rate : 0/0&#xA;    [Parsed_showinfo_0 @ 0x3741c00] n :   0 pts :      0 pts_time:0       pos :    58852 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:1 type:I checksum:49058BA3 plane_checksum :[E852D7DE 07E2B7D4 EA12FBD3] mean :[75 123 124] stdev :[52.7 4.8 11.7]&#xA;    [Parsed_showinfo_0 @ 0x3741c00]   side data - User Data Unregistered :&#xA;    [Parsed_showinfo_0 @ 0x3741c00] UUID=dc45e9bd-e6d9-48b7-962c-d820d923eeef&#xA;    [Parsed_showinfo_0 @ 0x3741c00] User Data=78323634202d20636f726520313535207231302062303062636166202d20482e3236342f4d5045472d342041564320636f646563202d20436f70796c65667420323030332d32303137202d20687474703a2f2f7777772e766964656f6c616e2e6f72672f783236342e68746d6c202d206f7074696f6e733a2063616261633d31207265663d34206465626c6f636b3d313a303a3020616e616c7973653d3078333a3078313133206d653d686578207375626d653d38207073793d31207073795f72643d312e30303a302e3030206d697865645f7265663d31206d655f72616e67653d3136206368726f6d615f6d653d31207472656c6c69733d32203878386463743d312063716d3d3020646561647a6f6e653d32312c313120666173745f70736b69703d31206368726f6d615f71705f6f66667365743d2d3220746872656164733d3334206c6f6f6b61686561645f746872656164733d3520736c696365645f746872656164733d30206e723d3020646563696d6174653d3120696e7465726c616365643d3020626c757261795f636f6d7061743d302073746974636861626c653d3120636f6e73747261696e65645f696e7472613d3020626672616d65733d3320625f707972616d69643d3220625f61646170743d3220625f626961733d30206469726563743d3320776569676874623d31206f70656e5f676f703d3020776569676874703d32206b6579696e743d696e66696e697465206b6579696e745f6d696e3d3330207363656e656375743d343020696e7472615f726566726573683d302072635f6c6f6f6b61686561643d35302072633d3270617373206d62747265653d3120626974726174653d353030302072617465746f6c3d312e302071636f6d703d302e36302071706d696e3d352071706d61783d3639207170737465703d342063706c78626c75723d32302e302071626c75723d302e35207662765f6d6178726174653d35353030207662765f62756673697a653d3135303030206e616c5f6872643d6e6f6e652066696c6c65723d302069705f726174696f3d312e34302061713d313a312e303000&#xA;    [Parsed_showinfo_0 @ 0x3741c00] &#xA;    [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709&#xA;    Output #0, null, to 'pipe :' :&#xA;      Metadata :&#xA;        major_brand : mp42&#xA;        minor_version : 0&#xA;        compatible_brands : mp42mp41isomavc1&#xA;        encoder : Lavf59.27.100&#xA;      Stream #0:0(und) : Video : wrapped_avframe, yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn (default)&#xA;        Metadata :&#xA;          creation_time : 2018-01-23T22:02:00.000000Z&#xA;          handler_name : L-SMASH Video Handler&#xA;          vendor_id : [0][0][0][0]&#xA;          encoder : Lavc59.37.100 wrapped_avframe&#xA;      Stream #0:1(und) : Audio : pcm_s16le, 48000 Hz, mono, s16, 768 kb/s (default)&#xA;        Metadata :&#xA;          creation_time : 2018-01-23T22:02:00.000000Z&#xA;          handler_name : L-SMASH Audio Handler&#xA;          vendor_id : [0][0][0][0]&#xA;          encoder : Lavc59.37.100 pcm_s16le&#xA;    [Parsed_showinfo_0 @ 0x3741c00] n :   1 pts :      1 pts_time:0.0333333 pos :   149037 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:2005D769 plane_checksum :[92BD4F7B 3501F48D 0CAA9352] mean :[75 124 124] stdev :[52.5 4.7 11.7]&#xA;    [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709&#xA;    [Parsed_showinfo_0 @ 0x3741c00] n :   2 pts :      2 pts_time:0.0666667 pos :   139805 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:09AFB702 plane_checksum :[3E62184D 9D0A0753 8BF09762] mean :[75 124 124] stdev :[52.4 4.6 11.5]&#xA;    [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709&#xA;    [Parsed_showinfo_0 @ 0x3741c00] n :   3 pts :      3 pts_time:0.1     pos :   157017 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:99F05FA9 plane_checksum :[FFA84276 7A3D6D59 0290AFCB] mean :[75 124 124] stdev :[52.2 4.5 11.3]&#xA;    [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709&#xA;    [Parsed_showinfo_0 @ 0x3741c00] n :   4 pts :      4 pts_time:0.133333 pos :   117259 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00935CD8 plane_checksum :[F81E097E 5F17005D B01452FD] mean :[74 124 124] stdev :[52.2 4.5 11.3]&#xA;    [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709&#xA;    [Parsed_showinfo_0 @ 0x3741c00] n :   5 pts :      5 pts_time:0.166667 pos :   197428 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:30E77B4C plane_checksum :[393DAA75 DFA88599 E2164B2F] mean :[74 124 125] stdev :[52.3 4.4 11.0]&#xA;    [Parsed_showinfo_0 @ 0x3741c00] color_range:tv color_space:bt709 color_primaries:bt709 color_trc:bt709&#xA;    [Parsed_showinfo_0 @ 0x3741c00] n :   6 pts :      6 pts_time:0.2     pos :   187073 fmt:yuv420p sar:1/1 s:1920x1080 i:P iskey:0 type:B checksum:BD5C25BC plane_checksum :[CC66DD70 F4ACA5DB 955DA253] mean :[75 124 125] stdev :[52.2 4.4 10.8]&#xA;&#xA;

    &#xA;

    As seen above, the output shows a starting PTS of 0 for 1st frame. However, I was looking at ctts, and stts entries in the MP4 headers with the help of ParseTimingInfoInMp4.py. This shows a different PTS (e.g., 0.0667s) for the 1st frame as seen below.

    &#xA;

    &#xA;&#xA;    ftyp    size              32&#xA;    mvhd    size             108&#xA;    iods    size              42&#xA;    tkhd    size              92&#xA;    edts    size              36&#xA;    mdhd    size              32&#xA;    Trak type :  b'vide'&#xA;    Video Trak Number 0 found&#xA;    video track timescale is 30&#xA;    mdhd    size              32&#xA;    hdlr    size              54&#xA;    vmhd    size              20&#xA;    dinf    size              36&#xA;    stsd    size             195&#xA;    stts size  2944  ctts size  2944&#xA;    0    dts = 0.0000 s,    pts = 0.0667 s,    diff in ms    66.67&#xA;    1    dts = 0.0333 s,    pts = 0.2000 s,    diff in ms    166.67&#xA;    2    dts = 0.0667 s,    pts = 0.1333 s,    diff in ms    66.67&#xA;    3    dts = 0.1000 s,    pts = 0.1000 s,    diff in ms    0.00&#xA;    4    dts = 0.1333 s,    pts = 0.1667 s,    diff in ms    33.33&#xA;    5    dts = 0.1667 s,    pts = 0.3333 s,    diff in ms    166.67&#xA;    6    dts = 0.2000 s,    pts = 0.2667 s,    diff in ms    66.67&#xA;    7    dts = 0.2333 s,    pts = 0.2333 s,    diff in ms    0.00&#xA;    8    dts = 0.2667 s,    pts = 0.3000 s,    diff in ms    33.33&#xA;    9    dts = 0.3000 s,    pts = 0.4333 s,    diff in ms    133.33&#xA;    10    dts = 0.3333 s,    pts = 0.3667 s,    diff in ms    33.33&#xA;&#xA;

    &#xA;

    MP4Analyser shows the following entries for stss, ctts, and edts-> for video track.&#xA;stss entries for video track&#xA;ctts entries for video track&#xA;edts - width='300' height='136' /> elst entry for video track

    &#xA;

    The sample file I have been using can be found in Sample mp4.

    &#xA;

    Can someone please help me to understand

    &#xA;

      &#xA;
    1. why the PTS values shown in ffmpeg are different from PTS derived from stss and ctts ?
    2. &#xA;

    3. What is the correct process in deriving PTS from stts, ctts and edts entries in MP4 header ?
    4. &#xA;

    &#xA;