Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ffmpeg #1246

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open

Upgrade ffmpeg #1246

wants to merge 57 commits into from

Conversation

FBrosset
Copy link
Collaborator

@FBrosset FBrosset commented Jan 9, 2025

Remplacement de vsync par -fps_mode passthrough dans les fichiers main/configuration.json
et modifs demandées dans le backlog sur le fichier /pod/video_encode_transcript/encoding_studio.py

Badatos and others added 30 commits October 24, 2024 12:10
* Upgrade securtity dependances
* Remove deprecated django-tagging
* Add new django-tagulous
* Elasticsearch default version is Now 8 (remove compatibility with ES 6)
* Replace deprecated ugettext_lazy by gettext_lazy
* Add some temporary deprecations Hacks for cas-client & Chunked-upload
* Replace deprecated url() by re_path()
* Disable all Pods apps by default
* Correct error handling for ElasticSearch
# Conflicts:
#	pod/settings.py
* Replace some re_path() by path()
* Replace remaining ugettext by gettext
* Replace admin.site.register() call by @admin.register decorator
* Replace HTTP_X_REQUESTED_WITH by `headers={"x-requested-with"`
* Replace request.META by headers
* Replace `assertQuerysetEqual` by `assertQuerySetEqual`
* Replace force_text by force_str
* Remove default_app_config in __init__.py
…select2 CSS calls)

* Correct Enrichment form validation process
* Replace Django 3.2 by 4.2 in all links
# Conflicts:
#	pod/settings.py
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Disable Shib Middleware tests as it seems deprecated
+ remove some ES deprecations
Badatos and others added 25 commits December 3, 2024 09:30
+ Store tag list in CACHE
+ add a reindex_videos script to recreate ES video index
@@ -4230,7 +4230,7 @@
"pod_version_init": "3.1.0"
},
"FFMPEG_MP4_ENCODE": {
"default_value": "-map 0:v:0 %(map_audio)s -c:v %(libx)s -vf \"scale=-2:%(height)s\" -preset %(preset)s -profile:v %(profile)s -pix_fmt yuv420p -level %(level)s -crf %(crf)s -maxrate %(maxrate)s -bufsize %(bufsize)s -sc_threshold 0 -force_key_frames \"expr:gte(t,n_forced*1)\" -max_muxing_queue_size 4000 -c:a aac -ar 48000 -b:a %(ba)s -movflags faststart -y -vsync 0 \"%(output)s\"",
"default_value": "-map 0:v:0 %(map_audio)s -c:v %(libx)s -vf \"scale=-2:%(height)s\" -preset %(preset)s -profile:v %(profile)s -pix_fmt yuv420p -level %(level)s -crf %(crf)s -maxrate %(maxrate)s -bufsize %(bufsize)s -sc_threshold 0 -force_key_frames \"expr:gte(t,n_forced*1)\" -max_muxing_queue_size 4000 -c:a aac -ar 48000 -b:a %(ba)s -movflags faststart -y -fps_mode passthrough \"%(output)s\"",
"description": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Juste pour comprendre, ca signifie que vsync 0 et vsync vfr étaient équivalents ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non voilà l'explication de notre ami ChatGPT

-vsync 0 : Pour préserver exactement les horodatages d'entrée dans la sortie, utile dans les scénarios de remuxage ou d'encodage spécifique.
-vsync vfr : Lors de l'encodage pour des fréquences d'images variables ou si la chronologie des images d'entrée doit être respectée, mais la sortie ne nécessite pas des intervalles d'images fixes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

du coup, est-ce judicieux de remplacer "vsync 0" et "vsync vfr" par "fps_mode passthrough", ou y aurait-t-il un autre fps_mode plus adapté ?

+ '"[0:v]scale=-2:%(height)s[pres];[1:v]scale=-2:%(sh)s[pip];'
+ '"[0:v]bwdif=mode=send_field:parity=auto:deint=all[presdeint];'
+ '[1:v]bwdif=mode=send_field:parity=auto:deint=all[pipdeint];'
+ '[presdeint]scale=-2:%(height)s[pres];[pipdeint]scale=-2:%(sh)s[pip];'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ca fait beaucoup de lignes en plus ^^. Tu saurais expliquer à un néophite le changement ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai seulement suivi les propositions issues du Backlog. Je ne suis pas un spécialiste sur ffmpeg mais je peux creuser.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si tu peux creuser ce serait pas mal merci. Je suis pas fan de pousser des modifs si personne ne sait ce qu'elle font ^^.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tu sais qui est à l'origine de ces modifs ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est Ulysseus, mais il me semble qu'il me disait avoir juste fait du "bidouillage" sur FFMPEG, c'est pourquoi j'ai préféré le confier à une personne s'y connaissant un minimum en encodage ^^.

Copy link
Collaborator

@Badatos Badatos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci pour cette PR 🙏
Quelques remarques :

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je pense qu'il faudrait aussi remplacer les "vsync" qu'on trouve dans "FFMPEG_CREATE_THUMBNAIL", "FFMPEG_CREATE_OVERVIEW" et "FFMPEG_DRESSING_OUTPUT" dans ce fichier

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok je vais regarder.

@@ -94,9 +94,11 @@ def get_sub_cmd(height_presentation_video, height_presenter_video, presenter):
# -vsync 0 outputVideo.mp4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il reste encore un subcmd = " -vsync 0 " (ligne 75)
et ptet en profiter pour virer les commentaires lignes 91-94 et 108-111 ?

@Badatos Badatos changed the base branch from pod_V4 to main February 7, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants