forked from fcode/delarte
c0feaa820a
* video resolution selection * use video/audio URLs directly in FFMPEG command (no temporary m3u8 file anymore) * embed subtitle in final video file * moved to MKV container to enable auto-on subtitle
2.3 KiB
2.3 KiB
delarte
🚧 Du code a mettre au propre, dans le seul but de faire du python
💡 Mais c’est quoi?
Récupérer un flux vidéo dans un fichier local avec sous titres.
🚀 Chauffe Marcel!
(pour distribution de famille Debian, adapter les commandes sinon)
git clone https://git.afpy.org/fcode/delarte.git && cd delarte
sudo apt install ffmpeg
mkdir ~/.venvs && python3 -m venv ~/.venvs/delarte
source ~/.venvs/delarte/bin/activate
pip install -r requirements.txt
export PATH_FFMPEG=$(which ffmpeg)
./delarte.py https://www.arte.tv/fr/videos/093644-001-A/l-incroyable-periple-de-magellan-1-4/
Available versions:
VF - Français
VO-STF - Version originale - ST français
VF-STMF - Français (sourds et malentendants)
VFAUD - Français (audiodescription)
VA-STA - Allemand
VA-STMA - Allemand (sourds et malentendants)
VAAUD - Allemand (audiodescription)
./delarte.py https://www.arte.tv/fr/videos/093644-001-A/l-incroyable-periple-de-magellan-1-4/ VO-STF
Available resolutions:
1080
720
432
360
216
$ ./delarte.py https://www.arte.tv/fr/videos/093644-001-A/l-incroyable-periple-de-magellan-1-4/ VO-STF 720
ffmpeg version 4.3.5-0+deb11u1 Copyright (c) 2000-2022 the FFmpeg developers
frame=78910 fps=1204 q=-1.0 Lsize= 738210kB time=00:52:36.45 bitrate=1915.9kbits/s speed=48.2x
video:685949kB audio:50702kB subtitle:9kB other streams:0kB global headers:0kB muxing overhead: 0.210475%
🔧 Tripoter sous le capot
🚀 Chauffe Marcel!
Python 3.10
à été utilisé- Code formaté avec
black
&pydocstyle
- Installation des outils de développement:
pip install -r requirements-dev.txt
- Un
Makefile
équipé: executermake help
pour le détail - Un git hook de
pre-commit
make init-pre_commit
📌 Dépendances
Voir requirements.txt
& requirements-dev.txt
🤝 Filer un coup de main
- Question, suggestion ➡️ ticket du projet
- Balance ton code ➡️ demande de fusion