This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Re-order an existing XMLTV file so programmes are sorted by start time. | |
| Uses a two-pass approach to avoid loading the full DOM into memory: | |
| 1. First pass: collect (start_time, byte_offset, length) for each programme | |
| 2. Sort by start_time | |
| 3. Second pass: seek to each offset and write in sorted order | |
| Usage: | |
| python reorder_xmltv_by_time.py input.xml output.xml | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| LOG_PREFIX="[ffmpeg-smart]" | |
| # Parse args | |
| AGENT="" | |
| URL="" | |
| # Auto-detect default accel based on available hardware | |
| detect_accel() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| LOG_PREFIX="[ffmpeg-smart]" | |
| # Parse args | |
| AGENT="" | |
| URL="" | |
| while [[ $# -gt 0 ]]; do | |
| if [[ "$1" == "-user_agent" ]]; then |