diff --git a/extract-audio-from-video@chmodmasx/CHANGELOG.md b/extract-audio-from-video@chmodmasx/CHANGELOG.md new file mode 100644 index 00000000..0e4af4b4 --- /dev/null +++ b/extract-audio-from-video@chmodmasx/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +## [1.1] - 2025-07-04 + +### Added +- Complete internationalization support with Spanish translations (es.po, es_AR.po) +- All dialog texts and format descriptions are now fully translatable +- Improved user experience with silent exit when canceling format selection + +### Fixed +- Clean exit behavior for better user experience + +## [1.0] - 2025-07-04 + +### Added +- Initial release of Extract Audio from Video action +- Support for multiple video formats (MP4, AVI, MKV, MOV, WMV, FLV, WebM, M4V, 3GP, and more) +- Multiple audio output formats (Original, MP3, FLAC, OGG, WAV, AAC, M4A, OPUS) +- FLAC quality selection with compression levels 0-8 +- Original format extraction (lossless, no re-encoding) +- Real-time progress tracking with percentage and time estimates +- Bilingual interface (English/Spanish) +- Individual process cancellation support +- Smart file handling with overwrite protection +- Automatic dependency detection with apturl integration +- Error handling and user feedback +- Optimized audio quality settings for each format diff --git a/extract-audio-from-video@chmodmasx/README.md b/extract-audio-from-video@chmodmasx/README.md new file mode 100644 index 00000000..7f73f02f --- /dev/null +++ b/extract-audio-from-video@chmodmasx/README.md @@ -0,0 +1,76 @@ +# Extract Audio from Video + +A powerful Cinnamon/Nemo Action to extract and convert audio from video files with professional features. + +## Key Features + +🎵 **Multiple Output Formats**: Original, MP3, FLAC, OGG, WAV, AAC, M4A, OPUS +📹 **Universal Video Support**: MP4, AVI, MKV, MOV, WMV, FLV, WebM, and many more +⚡ **Smart Extraction**: Choose original format (no conversion) or convert to any format +🔧 **FLAC Quality Control**: Select compression levels 0-8 for perfect quality/size balance +📊 **Real-time Progress**: Precise progress tracking with time estimates +🌍 **Bilingual Interface**: Full English and Spanish support +🛡️ **Safe Operations**: Individual process cancellation and overwrite protection +🚀 **Easy Installation**: Automatic dependency detection with software center integration + +## How It Works + +1. **Right-click** any video file in Nemo file manager +2. **Select** "Extract Audio from Video" from context menu +3. **Choose** your preferred audio format +4. **Watch** real-time progress with cancellation option +5. **Get** your audio file in the same directory + +## Audio Format Options + +### 🎯 **Original Format** (Recommended) +- Extracts audio without re-encoding +- Preserves original quality and codec +- Fastest option - no conversion time +- Perfect for when you want the exact audio track + +### 🔄 **Conversion Formats** +- **MP3** (192kbps) - Universal compatibility +- **FLAC** - Lossless with quality levels 0-8 +- **OGG** (192kbps) - Open source, excellent quality +- **WAV** - Uncompressed, maximum quality +- **AAC** (192kbps) - High efficiency, great quality +- **M4A** (192kbps) - Apple ecosystem compatible +- **OPUS** (128kbps) - Modern codec, best compression + +## Installation + +### Quick Install via Cinnamon Spices +1. Open **System Settings** → **Extensions** → **Actions** +2. Search for **"Extract Audio from Video"** +3. Click **Install** + +### Manual Installation +```bash +# Download and extract to: +~/.local/share/nemo/actions/ +# Then restart Nemo +``` + +### Dependencies +- **ffmpeg** - Handles all audio/video processing +- **zenity** - GUI dialogs (pre-installed on most systems) + +*If ffmpeg is missing, the action automatically opens the software center for easy installation.* + +## Supported Video Formats +MP4 • AVI • MKV • MOV • WMV • FLV • WebM • M4V • 3GP • MPG • MPEG • TS • VOB • ASF • DivX • F4V • M2V • MTS • OGV • RM • RMVB + +## Why Choose This Action? + +✅ **No Command Line Needed** - Everything through simple dialogs +✅ **Professional Quality** - Uses industry-standard ffmpeg +✅ **Time Saving** - Batch processing and smart defaults +✅ **Beginner Friendly** - Clear interface with helpful descriptions +✅ **Power User Ready** - Advanced options like FLAC quality control +✅ **Reliable** - Robust error handling and process management + +--- + +**Author:** chmodmasx +**License:** Same as Cinnamon Spices diff --git a/extract-audio-from-video@chmodmasx/extract-audio-from-video@chmodmasx.nemo_action.in b/extract-audio-from-video@chmodmasx/extract-audio-from-video@chmodmasx.nemo_action.in new file mode 100644 index 00000000..d72ab23f --- /dev/null +++ b/extract-audio-from-video@chmodmasx/extract-audio-from-video@chmodmasx.nemo_action.in @@ -0,0 +1,7 @@ +[Nemo Action] +_Name=Extract Audio from Video +_Comment=Extract audio track from video files in various formats +Exec= +Icon-Name=audio-x-generic +Selection=s +Extensions=mp4;avi;mkv;mov;wmv;flv;webm;m4v;3gp;asf;divx;f4v;m2v;mpg;mpeg;mts;ogv;rm;rmvb;ts;vob; \ No newline at end of file diff --git a/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/extract-audio.sh b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/extract-audio.sh new file mode 100755 index 00000000..3b95555b --- /dev/null +++ b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/extract-audio.sh @@ -0,0 +1,400 @@ +#!/bin/bash + +# Extract Audio from Video - Cinnamon Action +# Author: chmodmasx +# Description: Extract original audio track from video files without conversion + +# Get the input file +INPUT_FILE="$1" + +# Check if input file exists +if [[ ! -f "$INPUT_FILE" ]]; then + zenity --error --title="Error" --text="File not found: $INPUT_FILE" + exit 1 +fi + +# Internationalization support +if [[ "$LANG" == es* ]]; then + TITLE="Extraer Audio del Video" + PROMPT="Selecciona el formato de audio a extraer:" + COLUMN_1="Seleccionar" + COLUMN_2="Formato" + COLUMN_3="Descripción" + ERROR_TITLE="Error" + ERROR_EXTRACTION="Error durante la extracción" + SUCCESS_TITLE="Éxito" + SUCCESS_MESSAGE="Audio extraído exitosamente" + PROGRESS_TITLE="Extrayendo audio..." + PROGRESS_TEXT="Procesando archivo:" + CONFIRM_TITLE="Confirmar" + CONFIRM_MESSAGE="ya existe. ¿Desea sobrescribirlo?" + DETECTING_MESSAGE="Detectando formato de audio..." + FLAC_TITLE="Calidad FLAC" + FLAC_PROMPT="Selecciona el nivel de compresión FLAC:" + CANCELLED_TITLE="Cancelado" + CANCELLED_MESSAGE="Operación cancelada por el usuario" +else + TITLE="Extract Audio from Video" + PROMPT="Select the audio format to extract:" + COLUMN_1="Select" + COLUMN_2="Format" + COLUMN_3="Description" + ERROR_TITLE="Error" + ERROR_EXTRACTION="Error during extraction" + SUCCESS_TITLE="Success" + SUCCESS_MESSAGE="Audio extracted successfully" + PROGRESS_TITLE="Extracting audio..." + PROGRESS_TEXT="Processing file:" + CONFIRM_TITLE="Confirm" + CONFIRM_MESSAGE="already exists. Do you want to overwrite it?" + DETECTING_MESSAGE="Detecting audio format..." + FLAC_TITLE="FLAC Quality" + FLAC_PROMPT="Select FLAC compression level:" + CANCELLED_TITLE="Cancelled" + CANCELLED_MESSAGE="Operation cancelled by user" +fi + +# Check if ffmpeg is installed +if ! command -v ffmpeg &> /dev/null; then + # Try to open software center with apturl (like color-picker@fmete does) + if command -v apturl &> /dev/null; then + apturl apt://ffmpeg + fi + exit 1 +fi + +# Get file information +INPUT_DIR=$(dirname "$INPUT_FILE") +INPUT_BASENAME=$(basename "$INPUT_FILE") +INPUT_NAME="${INPUT_BASENAME%.*}" + +# Function to get audio codec from video file +get_audio_codec() { + ffprobe -v quiet -select_streams a:0 -show_entries stream=codec_name -of csv=p=0 "$INPUT_FILE" 2>/dev/null +} + +# Function to get appropriate file extension for audio codec +get_audio_extension() { + local codec="$1" + case "$codec" in + "aac") echo "aac" ;; + "mp3") echo "mp3" ;; + "flac") echo "flac" ;; + "vorbis") echo "ogg" ;; + "opus") echo "opus" ;; + "pcm_s16le"|"pcm_s24le"|"pcm_s32le") echo "wav" ;; + "ac3") echo "ac3" ;; + "eac3") echo "eac3" ;; + "dts") echo "dts" ;; + "truehd") echo "thd" ;; + "wmav1"|"wmav2") echo "wma" ;; + "alac") echo "m4a" ;; + *) echo "aac" ;; # Default fallback + esac +} + +# Show format selection dialog +FORMAT=$(zenity --list --radiolist \ + --title="$TITLE" \ + --text="$PROMPT" \ + --height=400 \ + --width=500 \ + --column="$COLUMN_1" --column="$COLUMN_2" --column="$COLUMN_3" \ + TRUE "original" "Original format (no conversion)" \ + FALSE "mp3" "MP3 - Most compatible, good compression" \ + FALSE "flac" "FLAC - Lossless compression, larger files" \ + FALSE "ogg" "OGG - Open source, good compression" \ + FALSE "wav" "WAV - Uncompressed, largest files" \ + FALSE "aac" "AAC - High quality, good compression" \ + FALSE "m4a" "M4A - Apple format, good quality" \ + FALSE "opus" "OPUS - Modern codec, excellent compression") + +# Check if user selected a format +if [[ -z "$FORMAT" ]]; then + exit 0 +fi + +# Handle original format extraction +if [[ "$FORMAT" == "original" ]]; then + # Detect audio codec for original format + AUDIO_CODEC=$(get_audio_codec) + if [[ -z "$AUDIO_CODEC" ]]; then + zenity --error --title="$ERROR_TITLE" --text="No audio track found in the video file" + exit 1 + fi + + # Get appropriate extension for original codec + FORMAT=$(get_audio_extension "$AUDIO_CODEC") + USE_COPY_CODEC=true +else + USE_COPY_CODEC=false +fi + +# Handle FLAC quality selection +if [[ "$FORMAT" == "flac" ]]; then + FLAC_QUALITY=$(zenity --list --radiolist \ + --title="$FLAC_TITLE" \ + --text="$FLAC_PROMPT" \ + --height=400 \ + --width=600 \ + --column="$COLUMN_1" --column="$COLUMN_2" --column="$COLUMN_3" \ + FALSE "0" "Fastest compression, largest files" \ + FALSE "1" "Fast compression" \ + FALSE "2" "Good speed/size balance" \ + FALSE "3" "Balanced compression" \ + FALSE "4" "Good compression" \ + TRUE "5" "Default - Good compression/speed balance" \ + FALSE "6" "Better compression" \ + FALSE "7" "High compression" \ + FALSE "8" "Best compression, smallest files (slowest)") + + # Check if user selected a quality level + if [[ -z "$FLAC_QUALITY" ]]; then + exit 0 + fi + + USE_FLAC_QUALITY=true +else + USE_FLAC_QUALITY=false +fi + +# Set output filename +OUTPUT_FILE="$INPUT_DIR/${INPUT_NAME}.$FORMAT" + +# Check if output file already exists +if [[ -f "$OUTPUT_FILE" ]]; then + if ! zenity --question --title="$CONFIRM_TITLE" --text="${INPUT_NAME}.$FORMAT $CONFIRM_MESSAGE"; then + exit 0 + fi +fi + +# Set ffmpeg parameters based on format +if [[ "$USE_COPY_CODEC" == "true" ]]; then + FFMPEG_PARAMS="-vn -acodec copy" +else + case "$FORMAT" in + "mp3") + FFMPEG_PARAMS="-vn -acodec libmp3lame -ab 192k" + ;; + "flac") + if [[ "$USE_FLAC_QUALITY" == "true" ]]; then + FFMPEG_PARAMS="-vn -acodec flac -compression_level $FLAC_QUALITY" + else + FFMPEG_PARAMS="-vn -acodec flac" + fi + ;; + "ogg") + FFMPEG_PARAMS="-vn -acodec libvorbis -ab 192k" + ;; + "wav") + FFMPEG_PARAMS="-vn -acodec pcm_s16le" + ;; + "aac") + FFMPEG_PARAMS="-vn -acodec aac -ab 192k" + ;; + "m4a") + FFMPEG_PARAMS="-vn -acodec aac -ab 192k" + ;; + "opus") + FFMPEG_PARAMS="-vn -acodec libopus -ab 128k" + ;; + *) + zenity --error --title="$ERROR_TITLE" --text="Unsupported format: $FORMAT" + exit 1 + ;; + esac +fi + +# Function to extract audio +extract_audio() { + # Get total duration of the video + TOTAL_DURATION=$(ffprobe -v quiet -show_entries format=duration -of csv=p=0 "$INPUT_FILE" 2>/dev/null) + + # Create unique temporary files for this process + PROCESS_ID="$$_$(date +%s)_$(shuf -i 1000-9999 -n 1)" + PID_FILE="/tmp/extract_audio_${PROCESS_ID}.pid" + CANCEL_FILE="/tmp/extract_audio_cancel_${PROCESS_ID}.flag" + + # Function to cleanup on exit + cleanup() { + # Signal that we're cleaning up + touch "$CANCEL_FILE" + + # Kill ffmpeg if it's still running + if [[ -f "$PID_FILE" ]]; then + FFMPEG_PID=$(cat "$PID_FILE" 2>/dev/null) + if [[ -n "$FFMPEG_PID" ]] && kill -0 "$FFMPEG_PID" 2>/dev/null; then + # Send SIGTERM first + kill -TERM "$FFMPEG_PID" 2>/dev/null + # Give it 2 seconds to terminate gracefully + sleep 2 + # Force kill if still running + if kill -0 "$FFMPEG_PID" 2>/dev/null; then + kill -KILL "$FFMPEG_PID" 2>/dev/null + fi + fi + rm -f "$PID_FILE" + fi + + # Clean up partial output file if it exists and is likely incomplete + if [[ -f "$OUTPUT_FILE" ]]; then + FILE_SIZE=$(stat -f%z "$OUTPUT_FILE" 2>/dev/null || stat -c%s "$OUTPUT_FILE" 2>/dev/null) + # Remove file if it's very small (likely incomplete) + if [[ "$FILE_SIZE" -lt 1024 ]]; then + rm -f "$OUTPUT_FILE" + fi + fi + + # Clean up temporary files + rm -f "$CANCEL_FILE" + } + + # Set trap to cleanup on script termination + trap cleanup EXIT INT TERM + + # Progress indicator + ( + echo "5" + echo "# $DETECTING_MESSAGE" + + echo "10" + echo "# Starting extraction..." + + # Start ffmpeg in background and capture its PID + ffmpeg -i "$INPUT_FILE" $FFMPEG_PARAMS -y "$OUTPUT_FILE" -progress pipe:1 2>/dev/null & + FFMPEG_PID=$! + echo "$FFMPEG_PID" > "$PID_FILE" + + # Monitor ffmpeg process for cancellation + ( + while kill -0 "$FFMPEG_PID" 2>/dev/null; do + if [[ -f "$CANCEL_FILE" ]]; then + kill -TERM "$FFMPEG_PID" 2>/dev/null + sleep 1 + if kill -0 "$FFMPEG_PID" 2>/dev/null; then + kill -KILL "$FFMPEG_PID" 2>/dev/null + fi + break + fi + sleep 0.2 + done + ) & + MONITOR_PID=$! + + # Monitor ffmpeg output for progress + while kill -0 "$FFMPEG_PID" 2>/dev/null && [[ ! -f "$CANCEL_FILE" ]]; do + if read -t 1 line; then + if [[ $line =~ ^out_time_ms=([0-9]+)$ ]]; then + # Convert microseconds to seconds + CURRENT_TIME_MS=${BASH_REMATCH[1]} + CURRENT_TIME=$((CURRENT_TIME_MS / 1000000)) + + # Calculate percentage if we have total duration + if [[ -n "$TOTAL_DURATION" ]] && [[ "$TOTAL_DURATION" != "N/A" ]] && (( $(echo "$TOTAL_DURATION > 0" | awk '{print ($1 > 0)}') )); then + # Use awk for floating point arithmetic instead of bc + PERCENTAGE=$(echo "$CURRENT_TIME $TOTAL_DURATION" | awk '{printf "%.0f", ($1 * 85 / $2) + 10}') + # Ensure percentage is within bounds + if (( PERCENTAGE > 95 )); then + PERCENTAGE=95 + fi + if (( PERCENTAGE < 10 )); then + PERCENTAGE=10 + fi + echo "$PERCENTAGE" + if [[ "$USE_COPY_CODEC" == "true" ]]; then + echo "# Extracting audio... $(printf "%.1f" $CURRENT_TIME)s / $(printf "%.1f" $TOTAL_DURATION)s" + else + echo "# Converting audio... $(printf "%.1f" $CURRENT_TIME)s / $(printf "%.1f" $TOTAL_DURATION)s" + fi + else + # Fallback to pulsating progress if duration is unknown + PULSE_PROGRESS=$((35 + (RANDOM % 30))) + echo "$PULSE_PROGRESS" + if [[ "$USE_COPY_CODEC" == "true" ]]; then + echo "# Extracting audio..." + else + echo "# Converting audio..." + fi + fi + fi + fi + done < <(ffmpeg -i "$INPUT_FILE" $FFMPEG_PARAMS -y "$OUTPUT_FILE" -progress pipe:1 2>/dev/null) + + # Kill monitor process + kill "$MONITOR_PID" 2>/dev/null + + # Wait for ffmpeg to complete if not cancelled + if [[ ! -f "$CANCEL_FILE" ]]; then + wait "$FFMPEG_PID" + FFMPEG_EXIT_CODE=$? + + # Check if process completed successfully + if [[ $FFMPEG_EXIT_CODE -eq 0 ]]; then + echo "98" + echo "# Finishing..." + sleep 0.5 + echo "100" + echo "# Done!" + else + # ffmpeg failed + exit 1 + fi + else + # Process was cancelled + exit 1 + fi + + # Clean up PID file + rm -f "$PID_FILE" + + ) | zenity --progress \ + --title="$PROGRESS_TITLE" \ + --text="$PROGRESS_TEXT $INPUT_BASENAME" \ + --percentage=0 \ + --auto-close + + # Store the exit code of the zenity progress dialog + ZENITY_EXIT_CODE=$? + + # If zenity was cancelled (exit code 1), trigger cleanup + if [[ $ZENITY_EXIT_CODE -eq 1 ]]; then + cleanup + return 1 + fi + + return 0 +} + +# Extract audio +if extract_audio; then + # Check if output file was created successfully + if [[ -f "$OUTPUT_FILE" ]]; then + # Get file size to verify it's a complete file + FILE_SIZE=$(stat -f%z "$OUTPUT_FILE" 2>/dev/null || stat -c%s "$OUTPUT_FILE" 2>/dev/null) + if [[ "$FILE_SIZE" -gt 1024 ]]; then + if [[ "$USE_COPY_CODEC" == "true" ]]; then + zenity --info --title="$SUCCESS_TITLE" --text="$SUCCESS_MESSAGE\n\nOutput file: ${INPUT_NAME}.$FORMAT\nOriginal codec: $AUDIO_CODEC" + elif [[ "$FORMAT" == "flac" && "$USE_FLAC_QUALITY" == "true" ]]; then + zenity --info --title="$SUCCESS_TITLE" --text="$SUCCESS_MESSAGE\n\nOutput file: ${INPUT_NAME}.$FORMAT\nConverted to: FLAC (Quality Level $FLAC_QUALITY)" + else + zenity --info --title="$SUCCESS_TITLE" --text="$SUCCESS_MESSAGE\n\nOutput file: ${INPUT_NAME}.$FORMAT\nConverted to: $FORMAT" + fi + else + zenity --error --title="$ERROR_TITLE" --text="$ERROR_EXTRACTION - Output file is incomplete" + exit 1 + fi + else + zenity --error --title="$ERROR_TITLE" --text="$ERROR_EXTRACTION - Output file not created" + exit 1 + fi +else + # Check if operation was cancelled + if [[ -f "$OUTPUT_FILE" ]]; then + FILE_SIZE=$(stat -f%z "$OUTPUT_FILE" 2>/dev/null || stat -c%s "$OUTPUT_FILE" 2>/dev/null) + if [[ "$FILE_SIZE" -lt 1024 ]]; then + rm -f "$OUTPUT_FILE" + fi + fi + zenity --info --title="$CANCELLED_TITLE" --text="$CANCELLED_MESSAGE" + exit 0 +fi diff --git a/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/icon.png b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/icon.png new file mode 100644 index 00000000..4ca80ae8 Binary files /dev/null and b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/icon.png differ diff --git a/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/metadata.json b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/metadata.json new file mode 100644 index 00000000..e7a0adc1 --- /dev/null +++ b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/metadata.json @@ -0,0 +1,8 @@ +{ + "description": "Extract audio track from video files in various formats with enhanced process control", + "max-size": 1, + "name": "Extract Audio from Video", + "uuid": "extract-audio-from-video@chmodmasx", + "author": "chmodmasx", + "version": "1.1" +} diff --git a/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/es.po b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/es.po new file mode 100644 index 00000000..06c312b6 --- /dev/null +++ b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/es.po @@ -0,0 +1,224 @@ +# EXTRACT AUDIO FROM VIDEO +# This file is put in the public domain. +# chmodmasx, 2023 +# +msgid "" +msgstr "" +"Project-Id-Version: extract-audio-from-video@chmodmasx 1.1\n" +"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/" +"issues\n" +"POT-Creation-Date: 2025-07-04 11:28-0300\n" +"PO-Revision-Date: 2025-07-04 11:53-0300\n" +"Last-Translator: chmodmasx\n" +"Language-Team: Spanish\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +#. metadata.json->description +msgid "" +"Extract audio track from video files in various formats with enhanced " +"process control" +msgstr "" +"Extraiga pistas de audio de archivos de vídeo en varios formatos con un " +"control de proceso mejorado" + +#. metadata.json->name +#. extract-audio-from-video@chmodmasx.nemo_action.in->Name +msgid "Extract Audio from Video" +msgstr "Extraer Audio del Video" + +#. extract-audio-from-video@chmodmasx.nemo_action.in->Comment +msgid "Extract audio track from video files in various formats" +msgstr "Extrae pistas de audio de archivos de vídeo en varios formatos" + +# Audio format descriptions +#. extract-audio.sh - Format selection dialog +msgid "Original format (no conversion)" +msgstr "Formato original (sin conversión)" + +#. extract-audio.sh - Format selection dialog +msgid "MP3 - Most compatible, good compression" +msgstr "MP3 - Más compatible, buena compresión" + +#. extract-audio.sh - Format selection dialog +msgid "FLAC - Lossless compression, larger files" +msgstr "FLAC - Compresión sin pérdida, archivos grandes" + +#. extract-audio.sh - Format selection dialog +msgid "OGG - Open source, good compression" +msgstr "OGG - Código abierto, buena compresión" + +#. extract-audio.sh - Format selection dialog +msgid "WAV - Uncompressed, largest files" +msgstr "WAV - Sin comprimir, archivos más grandes" + +#. extract-audio.sh - Format selection dialog +msgid "AAC - High quality, good compression" +msgstr "AAC - Alta calidad, buena compresión" + +#. extract-audio.sh - Format selection dialog +msgid "M4A - Apple format, good quality" +msgstr "M4A - Formato Apple, buena calidad" + +#. extract-audio.sh - Format selection dialog +msgid "OPUS - Modern codec, excellent compression" +msgstr "OPUS - Códec moderno, excelente compresión" + +# FLAC quality descriptions +#. extract-audio.sh - FLAC quality selection dialog +msgid "Fastest compression, largest files" +msgstr "Compresión más rápida, archivos más grandes" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Fast compression" +msgstr "Compresión rápida" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Good speed/size balance" +msgstr "Buen balance velocidad/tamaño" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Balanced compression" +msgstr "Compresión balanceada" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Good compression" +msgstr "Buena compresión" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Default - Good compression/speed balance" +msgstr "Por defecto - Buen balance compresión/velocidad" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Better compression" +msgstr "Mejor compresión" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "High compression" +msgstr "Alta compresión" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Best compression, smallest files (slowest)" +msgstr "Mejor compresión, archivos más pequeños (más lento)" + +# Dialog titles and labels +#. extract-audio.sh - Main dialog prompt +msgid "Select the audio format to extract:" +msgstr "Selecciona el formato de audio a extraer:" + +#. extract-audio.sh - Dialog column header +msgid "Select" +msgstr "Seleccionar" + +#. extract-audio.sh - Dialog column header +msgid "Format" +msgstr "Formato" + +#. extract-audio.sh - Dialog column header +msgid "Description" +msgstr "Descripción" + +#. extract-audio.sh - FLAC quality dialog title +msgid "FLAC Quality" +msgstr "Calidad FLAC" + +#. extract-audio.sh - FLAC quality dialog prompt +msgid "Select FLAC compression level:" +msgstr "Selecciona el nivel de compresión FLAC:" + +# Error messages +#. extract-audio.sh - Error dialog title +msgid "Error" +msgstr "Error" + +#. extract-audio.sh - Error message +msgid "Error during extraction" +msgstr "Error durante la extracción" + +#. extract-audio.sh - Error message +msgid "No audio track found in the video file" +msgstr "No se encontró pista de audio en el archivo de vídeo" + +#. extract-audio.sh - Error message +msgid "Output file is incomplete" +msgstr "El archivo de salida está incompleto" + +#. extract-audio.sh - Error message +msgid "Output file not created" +msgstr "No se creó el archivo de salida" + +# Success messages +#. extract-audio.sh - Success dialog title +msgid "Success" +msgstr "Éxito" + +#. extract-audio.sh - Success message +msgid "Audio extracted successfully" +msgstr "Audio extraído exitosamente" + +# Progress messages +#. extract-audio.sh - Progress dialog title +msgid "Extracting audio..." +msgstr "Extrayendo audio..." + +#. extract-audio.sh - Progress dialog text +msgid "Processing file:" +msgstr "Procesando archivo:" + +#. extract-audio.sh - Progress status +msgid "Detecting audio format..." +msgstr "Detectando formato de audio..." + +#. extract-audio.sh - Progress status +msgid "Starting extraction..." +msgstr "Iniciando extracción..." + +#. extract-audio.sh - Progress status +msgid "Converting audio..." +msgstr "Convirtiendo audio..." + +#. extract-audio.sh - Progress status +msgid "Finishing..." +msgstr "Finalizando..." + +#. extract-audio.sh - Progress status +msgid "Done!" +msgstr "¡Terminado!" + +# Confirmation messages +#. extract-audio.sh - Confirmation dialog title +msgid "Confirm" +msgstr "Confirmar" + +#. extract-audio.sh - Confirmation message +msgid "already exists. Do you want to overwrite it?" +msgstr "ya existe. ¿Desea sobrescribirlo?" + +# Cancellation messages +#. extract-audio.sh - Cancellation dialog title +msgid "Cancelled" +msgstr "Cancelado" + +#. extract-audio.sh - Cancellation message +msgid "Operation cancelled by user" +msgstr "Operación cancelada por el usuario" + +# Additional status messages +#. extract-audio.sh - Output file info +msgid "Output file:" +msgstr "Archivo de salida:" + +#. extract-audio.sh - Original codec info +msgid "Original codec:" +msgstr "Códec original:" + +#. extract-audio.sh - Converted format info +msgid "Converted to:" +msgstr "Convertido a:" + +#. extract-audio.sh - FLAC quality info +msgid "Quality Level" +msgstr "Nivel de Calidad" diff --git a/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/es_AR.po b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/es_AR.po new file mode 100644 index 00000000..c2d98857 --- /dev/null +++ b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/es_AR.po @@ -0,0 +1,222 @@ +# EXTRACT AUDIO FROM VIDEO +# This file is put in the public domain. +# chmodmasx, 2023 +# +msgid "" +msgstr "" +"Project-Id-Version: extract-audio-from-video@chmodmasx 1.1\n" +"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/" +"issues\n" +"POT-Creation-Date: 2025-07-04 11:27-0300\n" +"PO-Revision-Date: 2025-07-04 11:52-0300\n" +"Last-Translator: chmodmasx\n" +"Language-Team: Spanish (Argentina)\n" +"Language: es_AR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +#. metadata.json->description +msgid "" +"Extract audio track from video files in various formats with enhanced " +"process control" +msgstr "Extraé pistas de audio de archivos de video en varios formatos" + +#. metadata.json->name +#. extract-audio-from-video@chmodmasx.nemo_action.in->Name +msgid "Extract Audio from Video" +msgstr "Extraer Audio del Video" + +#. extract-audio-from-video@chmodmasx.nemo_action.in->Comment +msgid "Extract audio track from video files in various formats" +msgstr "Extraé pistas de audio de archivos de video en varios formatos" + +# Audio format descriptions +#. extract-audio.sh - Format selection dialog +msgid "Original format (no conversion)" +msgstr "Formato original (sin conversión)" + +#. extract-audio.sh - Format selection dialog +msgid "MP3 - Most compatible, good compression" +msgstr "MP3 - Más compatible, buena compresión" + +#. extract-audio.sh - Format selection dialog +msgid "FLAC - Lossless compression, larger files" +msgstr "FLAC - Compresión sin pérdida, archivos grandes" + +#. extract-audio.sh - Format selection dialog +msgid "OGG - Open source, good compression" +msgstr "OGG - Código abierto, buena compresión" + +#. extract-audio.sh - Format selection dialog +msgid "WAV - Uncompressed, largest files" +msgstr "WAV - Sin comprimir, archivos más grandes" + +#. extract-audio.sh - Format selection dialog +msgid "AAC - High quality, good compression" +msgstr "AAC - Alta calidad, buena compresión" + +#. extract-audio.sh - Format selection dialog +msgid "M4A - Apple format, good quality" +msgstr "M4A - Formato Apple, buena calidad" + +#. extract-audio.sh - Format selection dialog +msgid "OPUS - Modern codec, excellent compression" +msgstr "OPUS - Códec moderno, excelente compresión" + +# FLAC quality descriptions +#. extract-audio.sh - FLAC quality selection dialog +msgid "Fastest compression, largest files" +msgstr "Compresión más rápida, archivos más grandes" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Fast compression" +msgstr "Compresión rápida" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Good speed/size balance" +msgstr "Buen balance velocidad/tamaño" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Balanced compression" +msgstr "Compresión balanceada" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Good compression" +msgstr "Buena compresión" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Default - Good compression/speed balance" +msgstr "Por defecto - Buen balance compresión/velocidad" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Better compression" +msgstr "Mejor compresión" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "High compression" +msgstr "Alta compresión" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Best compression, smallest files (slowest)" +msgstr "Mejor compresión, archivos más chicos (más lento)" + +# Dialog titles and labels +#. extract-audio.sh - Main dialog prompt +msgid "Select the audio format to extract:" +msgstr "Seleccioná el formato de audio a extraer:" + +#. extract-audio.sh - Dialog column header +msgid "Select" +msgstr "Seleccionar" + +#. extract-audio.sh - Dialog column header +msgid "Format" +msgstr "Formato" + +#. extract-audio.sh - Dialog column header +msgid "Description" +msgstr "Descripción" + +#. extract-audio.sh - FLAC quality dialog title +msgid "FLAC Quality" +msgstr "Calidad FLAC" + +#. extract-audio.sh - FLAC quality dialog prompt +msgid "Select FLAC compression level:" +msgstr "Seleccioná el nivel de compresión FLAC:" + +# Error messages +#. extract-audio.sh - Error dialog title +msgid "Error" +msgstr "Error" + +#. extract-audio.sh - Error message +msgid "Error during extraction" +msgstr "Error durante la extracción" + +#. extract-audio.sh - Error message +msgid "No audio track found in the video file" +msgstr "No se encontró pista de audio en el archivo de video" + +#. extract-audio.sh - Error message +msgid "Output file is incomplete" +msgstr "El archivo de salida está incompleto" + +#. extract-audio.sh - Error message +msgid "Output file not created" +msgstr "No se creó el archivo de salida" + +# Success messages +#. extract-audio.sh - Success dialog title +msgid "Success" +msgstr "Éxito" + +#. extract-audio.sh - Success message +msgid "Audio extracted successfully" +msgstr "Audio extraído exitosamente" + +# Progress messages +#. extract-audio.sh - Progress dialog title +msgid "Extracting audio..." +msgstr "Extrayendo audio..." + +#. extract-audio.sh - Progress dialog text +msgid "Processing file:" +msgstr "Procesando archivo:" + +#. extract-audio.sh - Progress status +msgid "Detecting audio format..." +msgstr "Detectando formato de audio..." + +#. extract-audio.sh - Progress status +msgid "Starting extraction..." +msgstr "Iniciando extracción..." + +#. extract-audio.sh - Progress status +msgid "Converting audio..." +msgstr "Convirtiendo audio..." + +#. extract-audio.sh - Progress status +msgid "Finishing..." +msgstr "Finalizando..." + +#. extract-audio.sh - Progress status +msgid "Done!" +msgstr "¡Listo!" + +# Confirmation messages +#. extract-audio.sh - Confirmation dialog title +msgid "Confirm" +msgstr "Confirmar" + +#. extract-audio.sh - Confirmation message +msgid "already exists. Do you want to overwrite it?" +msgstr "ya existe. ¿Querés sobrescribirlo?" + +# Cancellation messages +#. extract-audio.sh - Cancellation dialog title +msgid "Cancelled" +msgstr "Cancelado" + +#. extract-audio.sh - Cancellation message +msgid "Operation cancelled by user" +msgstr "Operación cancelada por el usuario" + +# Additional status messages +#. extract-audio.sh - Output file info +msgid "Output file:" +msgstr "Archivo de salida:" + +#. extract-audio.sh - Original codec info +msgid "Original codec:" +msgstr "Códec original:" + +#. extract-audio.sh - Converted format info +msgid "Converted to:" +msgstr "Convertido a:" + +#. extract-audio.sh - FLAC quality info +msgid "Quality Level" +msgstr "Nivel de Calidad" diff --git a/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/extract-audio-from-video@chmodmasx.pot b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/extract-audio-from-video@chmodmasx.pot new file mode 100644 index 00000000..1742ef9a --- /dev/null +++ b/extract-audio-from-video@chmodmasx/files/extract-audio-from-video@chmodmasx/po/extract-audio-from-video@chmodmasx.pot @@ -0,0 +1,229 @@ +# EXTRACT AUDIO FROM VIDEO +# This file is put in the public domain. +# chmodmasx, 2023 +# +msgid "" +msgstr "" +"Project-Id-Version: extract-audio-from-video@chmodmasx 1.1\n" +"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/" +"issues\n" +"POT-Creation-Date: 2025-07-04 11:27-0300\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. metadata.json->description +msgid "" +"Extract audio track from video files in various formats with enhanced " +"process control" +msgstr "" + +#. metadata.json->name +#. extract-audio-from-video@chmodmasx.nemo_action.in->Name +msgid "Extract Audio from Video" +msgstr "" + +#. extract-audio-from-video@chmodmasx.nemo_action.in->Comment +msgid "Extract audio track from video files in various formats" +msgstr "" + +# Audio format descriptions +#. extract-audio.sh - Format selection dialog +msgid "Original format (no conversion)" +msgstr "" + +#. extract-audio.sh - Format selection dialog +msgid "MP3 - Most compatible, good compression" +msgstr "" + +#. extract-audio.sh - Format selection dialog +msgid "FLAC - Lossless compression, larger files" +msgstr "" + +#. extract-audio.sh - Format selection dialog +msgid "OGG - Open source, good compression" +msgstr "" + +#. extract-audio.sh - Format selection dialog +msgid "WAV - Uncompressed, largest files" +msgstr "" + +#. extract-audio.sh - Format selection dialog +msgid "AAC - High quality, good compression" +msgstr "" + +#. extract-audio.sh - Format selection dialog +msgid "M4A - Apple format, good quality" +msgstr "" + +#. extract-audio.sh - Format selection dialog +msgid "OPUS - Modern codec, excellent compression" +msgstr "" + +# FLAC quality descriptions +#. extract-audio.sh - FLAC quality selection dialog +msgid "Fastest compression, largest files" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Fast compression" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Good speed/size balance" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Balanced compression" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Good compression" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Default - Good compression/speed balance" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Better compression" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "High compression" +msgstr "" + +#. extract-audio.sh - FLAC quality selection dialog +msgid "Best compression, smallest files (slowest)" +msgstr "" + +# Dialog titles and labels +#. extract-audio.sh - Main dialog title +msgid "Extract Audio from Video" +msgstr "" + +#. extract-audio.sh - Main dialog prompt +msgid "Select the audio format to extract:" +msgstr "" + +#. extract-audio.sh - Dialog column header +msgid "Select" +msgstr "" + +#. extract-audio.sh - Dialog column header +msgid "Format" +msgstr "" + +#. extract-audio.sh - Dialog column header +msgid "Description" +msgstr "" + +#. extract-audio.sh - FLAC quality dialog title +msgid "FLAC Quality" +msgstr "" + +#. extract-audio.sh - FLAC quality dialog prompt +msgid "Select FLAC compression level:" +msgstr "" + +# Error messages +#. extract-audio.sh - Error dialog title +msgid "Error" +msgstr "" + +#. extract-audio.sh - Error message +msgid "Error during extraction" +msgstr "" + +#. extract-audio.sh - Error message +msgid "No audio track found in the video file" +msgstr "" + +#. extract-audio.sh - Error message +msgid "Output file is incomplete" +msgstr "" + +#. extract-audio.sh - Error message +msgid "Output file not created" +msgstr "" + +# Success messages +#. extract-audio.sh - Success dialog title +msgid "Success" +msgstr "" + +#. extract-audio.sh - Success message +msgid "Audio extracted successfully" +msgstr "" + +# Progress messages +#. extract-audio.sh - Progress dialog title +msgid "Extracting audio..." +msgstr "" + +#. extract-audio.sh - Progress dialog text +msgid "Processing file:" +msgstr "" + +#. extract-audio.sh - Progress status +msgid "Detecting audio format..." +msgstr "" + +#. extract-audio.sh - Progress status +msgid "Starting extraction..." +msgstr "" + +#. extract-audio.sh - Progress status +msgid "Extracting audio..." +msgstr "" + +#. extract-audio.sh - Progress status +msgid "Converting audio..." +msgstr "" + +#. extract-audio.sh - Progress status +msgid "Finishing..." +msgstr "" + +#. extract-audio.sh - Progress status +msgid "Done!" +msgstr "" + +# Confirmation messages +#. extract-audio.sh - Confirmation dialog title +msgid "Confirm" +msgstr "" + +#. extract-audio.sh - Confirmation message +msgid "already exists. Do you want to overwrite it?" +msgstr "" + +# Cancellation messages +#. extract-audio.sh - Cancellation dialog title +msgid "Cancelled" +msgstr "" + +#. extract-audio.sh - Cancellation message +msgid "Operation cancelled by user" +msgstr "" + +# Additional status messages +#. extract-audio.sh - Output file info +msgid "Output file:" +msgstr "" + +#. extract-audio.sh - Original codec info +msgid "Original codec:" +msgstr "" + +#. extract-audio.sh - Converted format info +msgid "Converted to:" +msgstr "" + +#. extract-audio.sh - FLAC quality info +msgid "Quality Level" +msgstr "" diff --git a/extract-audio-from-video@chmodmasx/info.json b/extract-audio-from-video@chmodmasx/info.json new file mode 100644 index 00000000..605280a1 --- /dev/null +++ b/extract-audio-from-video@chmodmasx/info.json @@ -0,0 +1,5 @@ +{ + "author": "chmodmasx", + "name": "Extract Audio from Video", + "description": "Extract audio track from video files in various formats (original or converted). Uses ffmpeg with enhanced process control, progress bar and zenity for format selection." +} diff --git a/test_dependencies.sh b/test_dependencies.sh new file mode 100755 index 00000000..0d6ab6e6 --- /dev/null +++ b/test_dependencies.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# Test script to verify dependency management behavior + +echo "=== Testing dependency management behavior ===" + +# Create a temporary test script that simulates missing dependencies +cat > /tmp/test_extract_audio.sh << 'EOF' +#!/bin/bash + +# Simulated version of the extract-audio script with missing dependencies + +# Mock the missing command +missing_command() { + return 1 +} + +# Internationalization support +if [[ "$LANG" == es* ]]; then + INSTALL_TITLE="Dependencias Faltantes" + INSTALL_FFMPEG_MESSAGE="ffmpeg no está instalado. Es necesario para extraer audio de videos. + +¿Desea instalarlo ahora?" + INSTALL_BUTTON_YES="Instalar Automáticamente" + INSTALL_BUTTON_MANUAL="Instalar Manualmente" + INSTALL_ADVANCED_OPTION="Opción avanzada: Instalación automática con sudo" + INSTALL_MANUAL_MESSAGE="Por favor, instale el paquete" + INSTALL_MANUAL_COMMAND="Comando" + ERROR_TITLE="Error" +else + INSTALL_TITLE="Missing Dependencies" + INSTALL_FFMPEG_MESSAGE="ffmpeg is not installed. It's required to extract audio from videos. + +Do you want to install it now?" + INSTALL_BUTTON_YES="Install Automatically" + INSTALL_BUTTON_MANUAL="Install Manually" + INSTALL_ADVANCED_OPTION="Advanced option: Automatic installation with sudo" + INSTALL_MANUAL_MESSAGE="Please install the package" + INSTALL_MANUAL_COMMAND="Command" + ERROR_TITLE="Error" +fi + +# Function to notify about missing dependencies +notify_missing_dependency() { + local package="$1" + local message="$2" + + echo "Dependency check: $package is missing" + echo "Message: $message" + echo "Would show dialog with options:" + echo " - $INSTALL_BUTTON_YES (with sudo)" + echo " - $INSTALL_BUTTON_MANUAL" + echo "If manual selected, would show:" + echo " $INSTALL_MANUAL_MESSAGE '$package'" + echo " $INSTALL_MANUAL_COMMAND: sudo apt install $package" +} + +# Simulate missing ffmpeg +if ! command -v ffmpeg_missing &> /dev/null; then + notify_missing_dependency "ffmpeg" "$INSTALL_FFMPEG_MESSAGE" +fi + +echo "Test completed successfully!" +EOF + +chmod +x /tmp/test_extract_audio.sh +/tmp/test_extract_audio.sh + +echo "" +echo "=== Test completed ===" +echo "The new dependency management system provides:" +echo "1. Automatic installation option (advanced)" +echo "2. Manual installation instructions (traditional)" +echo "3. Clear commands for manual installation" +echo "4. Consistent with Cinnamon Spices conventions" + +rm /tmp/test_extract_audio.sh