
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (68)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (10985)
-
avutil/tests/color_utils : reduce accuracy threshold to pass to 1e-7
7 décembre 2024, par Hendrik Leppkesavutil/tests/color_utils : reduce accuracy threshold to pass to 1e-7
Fixes FATE on a variety of configurations due to accuracy problems in
floating point math. Most constants tested against here are not even
specified with 7 decimal digits.Reviewed-by : Niklas Haas <git@haasn.dev>
-
DVR + FFMPEG + IOS Authentication and Live Streaming Fails
6 août 2013, par user1744691How to grab video from a DVR using ffmpeg and DVR is password protected. Is there a way to grab live stream from IP-Cam connected to DVR.
I was able to stream a channel (may be recorded video) but whenever i tried to connect to a DVR could not get it done.
this
http://www.wowza.com/_h264/BigBuckBunny_175k.mov and this rtsp ://live.sabah.com.tr:443/atv/atv3/
link works great for getting me stream
but when i try my DVR's (http://admril:56789@mysite.com) (mysite.com = 213.115.94.108) link it fails to establish a connection using FFMEG.I have used a variety of variation of DVR's url but all in vein.
Please let me know where i am wrong and how i can get live stream.
-
Button "Clean FFMeta" does nothing after compiling with PyInstaller
6 mai, par Leonie HoldermannI’m working on my first Python project and I’ve compiled it into an executable using PyInstaller with the following command :


pyinstaller --onefile --noconsole app.py



However, when I run the executable, the button "Clean FFMeta" which triggers the clean_ffmeta() function does nothing. Additionally, changing the language or the chapter settings under the "Options -> Chapter settings" menu doesn’t seem to affect anything either. It all works perfectly in the Python script before compilation, but once compiled into an .exe, none of these functions respond.


I've reviewed the code, and the button is correctly linked to the function, but I suspect something might be going wrong during the compilation process.


What I have tried :


- 

- Checked that all dependencies are included.
- Verified that the configuration and language changes are being correctly applied before compilation.
- Tried running the executable from a console to check for error messages, but there are none visible (since I used —noconsole).








What I expect :


- 

- The "Clean FFMeta" button should clean the FFMeta file based on the
user settings.
- Language and chapter settings should be updated and reflected in the GUI immediately.






Code :
Below is a simplified version of my code, especially the sections related to the "Clean FFMeta" functionality and language/chapter settings.


def clean_ffmeta():
if not config.get("cd_in_path"):
 show_error(texts[current_language]["error"] + " No CD_IN path configured.")
 return

chapter_path = os.path.join(config["cd_in_path"], "chapters.ffmeta")
cleaned_chapter_path = os.path.join(config["cd_in_path"], "chapters_cleaned.ffmeta")

if not os.path.exists(chapter_path):
 show_error(texts[current_language]["no_chapters_file"])
 return

write_to_console("Starting to clean FFMeta...")
thread = threading.Thread(target=clean_ffmeta_thread, args=(chapter_path, cleaned_chapter_path))
thread.start()

def clean_ffmeta_thread(chapter_path, cleaned_chapter_path):
 try:
 chapter_action = config.get("chapter_action", "clean")
 keep_empty = config.get("chapter_keep_empty", False)

 write_to_console(f"Chapter action: {chapter_action}, Keep empty: {keep_empty}")

 with open(chapter_path, "r", encoding="utf-8") as f:
 lines = f.readlines()

 new_lines = []
 chapter_counter = 0

 for line in lines:
 stripped_line = line.strip()
 if stripped_line.startswith("title="):
 title_content = stripped_line[6:]
 
 if chapter_action == "clean":
 if title_content == "":
 if keep_empty:
 new_lines.append(line)
 else:
 write_to_console("Empty title skipped.")
 continue
 else:
 new_lines.append(line)
 
 elif chapter_action == "number":
 chapter_counter += 1
 chapter_title = f"{texts[current_language]['chapter']} {chapter_counter}"
 new_lines.append(f"title={chapter_title}\n")
 write_to_console(f"Renamed to: {chapter_title}")
 else:
 new_lines.append(line)

 with open(cleaned_chapter_path, "w", encoding="utf-8") as f:
 f.writelines(new_lines)

 write_to_console(f"FFMeta cleaned and saved as '{cleaned_chapter_path}'.")

 except Exception as e:
 write_to_console(f"Error cleaning FFMeta: {str(e)}")

def open_chapter_settings():
 global chapter_settings_window, chapter_action_var
 global chapter_keep_empty_checkbox, chapter_save_button

 chapter_settings_window = tk.Toplevel(root)
 chapter_settings_window.title(texts[current_language]["chapter_setting_title"])
 chapter_settings_window.geometry("300x250")
 chapter_settings_window.resizable(False, False)
 
 chapter_action_var = tk.StringVar(value=config.get("chapter_action", "clean"))
 chapter_keep_empty_var = tk.BooleanVar(value=config.get("chapter_keep_empty", False))
 
 tk.Label(
 chapter_settings_window,
 text=texts[current_language]["chapter_setting_choose_option"]
 ).pack(pady=(10, 5))
 
 tk.Radiobutton(
 chapter_settings_window,
 text=texts[current_language]["chapter_setting_clean"],
 variable=chapter_action_var,
 value="clean"
 ).pack(pady=5)

 tk.Radiobutton(
 chapter_settings_window,
 text=texts[current_language]["chapter_setting_number"],
 variable=chapter_action_var,
 value="number"
 ).pack(pady=5)

 chapter_keep_empty_checkbox = tk.Checkbutton(
 chapter_settings_window,
 text=texts[current_language]["chapter_setting_keep_empty"],
 variable=chapter_keep_empty_var
 )
 chapter_keep_empty_checkbox.pack(pady=5)

 chapter_save_button = tk.Button(
 chapter_settings_window,
 text=texts[current_language]["chapter_setting_save"],
 command=lambda: save_chapter_settings(chapter_keep_empty_var, chapter_settings_window)
 )
 chapter_save_button.pack(pady=10)

def save_chapter_settings(keep_empty_var, window):
 config["chapter_action"] = chapter_action_var.get()
 config["chapter_keep_empty"] = keep_empty_var.get()
 save_config()
 write_to_console(f"Chapter settings saved: Action={config['chapter_action']}, Keep empty={config['chapter_keep_empty']}")
 window.destroy()

options_menu = tk.Menu(menu, tearoff=0)
options_menu.add_command(label="Check pip-ffmpeg", command=check_pip_ffmpeg)
options_menu.add_command(label=texts[current_language]["menu_chapter_settings"], command=open_chapter_settings)
menu.add_cascade(label="Options", menu=options_menu)

btn3 = tk.Button(btn_frame, text="3. Clean FFMeta", command=clean_ffmeta)
btn3.grid(row=0, column=2, padx=5)



Here you find the entire project code of the entire project : https://www.pythonmorsels.com/p/32hkh/


Why is the clean_chapters function not working ?