
Recherche avancée
Autres articles (41)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (3796)
-
poll always return 0 on ff_poll_interrupt on avformat_open_input, while playing a rtsp authentication url [closed]
12 mars 2024, par CodeEaterI tried to play a rtsp authentication url on my personal player. The rtsp url format is rtsp ://user:pass@x.x.x.x/VideoString. VLC player can play this url but mine is not ok.


Specifically, on function bellow, ret always return 0 and the whole thread stuck at the loop.


static int ff_poll_interrupt(struct pollfd *p, nfds_t nfds, int timeout, AVIOInterruptCB *cb)
{
 int runs = timeout / POLLING_TIME;
 int ret = 0;

 do {
 if (ff_check_interrupt(cb))
 return AVERROR_EXIT;
 ret = poll(p, nfds, POLLING_TIME);
 if (ret != 0) {
 if (ret < 0) {
 ff_log_net_error(NULL, AV_LOG_ERROR, "ff_poll_interrupt");
 ret = ff_neterrno();
 }
 if (ret == AVERROR(EINTR))
 continue;
 break;
 }
 } while (timeout <= 0 || runs-- > 0);

 if (!ret) {
 av_log(NULL, AV_LOG_ERROR, "Error in ff_pool_interrupt, timeout = %d.\n", timeout);
 return AVERROR(ETIMEDOUT);
 }
 return ret;
}



Codes bellow are what I modified try to fix it . And now it will return "timeout" because "runs" works on ff_poll_interrupt.


...
av_dict_set(&mInputOpts, "buffer_size", "1024000", 0);
av_dict_set(&mInputOpts, "rtsp_transport", "tcp", 0);
av_dict_set(&mInputOpts,"stimeout","20*1000*1000",0);


int ret = avformat_open_input(&mCtx, filename, in_fmt, mInputOpts ? &mInputOpts : nullptr);
...



wireshack shows that only 3 messages occur during the whole process(filtered by specific ip), which occurs on "start_connect_attempt" called by ff_connect_parallel.




order is :


- 

- C to S
- S to C
- C to S








expected : 4.C to S(with options or describe)


if poll return normal, then 4.C to S(with options or describe) will execute on ff_rtsp_connect.


So my question is Why poll always return 0 on ff_poll_interrupt on avformat_open_input, while playing a rtsp authentication url ?


-
Where to (long time) host Spring Boot Application with Data Base Backup and Linux Root Access [closed]
22 mai 2024, par Lord HelmchenI developed a small application for my father. It uses Spring Boot, MySQL and FFMPEG, which I currently installed on Linux.


I want to host it, deploy it automatically, have a back up and root access for FFMPEG installation.


It runs smoothly locally on Windows / Linux, now I want to host it somewhere.


What I would like to have :


- 

- Ease of deployment : I got experience in adminstration of linux root servers, but I look for something easy to integrate and maybe automatically deploy it from Github or Gitlab
- Backup : I want to backup the database ideally to another service provider in case something goes wrong.
- Linux : One Part of it, amongs others is to convert different audio formats using ffmpeg.
So, (I think) I need linux root access as well.
- Time Horzion : I would like to make sure it still runs in ten+ years, so it should be a reliable provider where I only update the application from time to time if needed.
- Money : As it is only for personal use at this moment, I don't want to invest a fortune.












What provider and deployment pipeline would you recommend to me ?


-
mpv player with SFTP does not work in bash script [closed]
19 mars 2024, par Pickles888I am making a bash script to make it easier to stream from my media server at home.


In the bash script, it asks whether you want to list or search, and then uses mpv to stream the file. For some reason it says the file does not exist. When I try this in the terminal it works, but running the script gives this error :


[ffmpeg] libssh: Error opening sftp file: SFTP server: No such file
Failed to open sftp://[username:password]@[ip.of.server]/[directory/to/file]



My script :


#!/bin/bash

pass="[password]"

if [ $(nmcli | grep -c [home-network]) -gt 0 ]; then
 ip="[private.ip]"
else
 ip="[public.ip]"
fi

mfolder="[/directory/of/file]"

function select_option {

 # little helpers for terminal print control and key input
 ESC=$( printf "\033")
 cursor_blink_on() { printf "$ESC[?25h"; }
 cursor_blink_off() { printf "$ESC[?25l"; }
 cursor_to() { printf "$ESC[$1;${2:-1}H"; }
 print_option() { printf " $1 "; }
 print_selected() { printf " $ESC[7m $1 $ESC[27m"; }
 get_cursor_row() { IFS=';' read -sdR -p $'\E[6n' ROW COL; echo ${ROW#*[}; }
 key_input() { read -s -n3 key 2>/dev/null >&2
 if [[ $key = $ESC[A ]]; then echo up; fi
 if [[ $key = $ESC[B ]]; then echo down; fi
 if [[ $key = "" ]]; then echo enter; fi; }

 # initially print empty new lines (scroll down if at bottom of screen)
 for opt; do printf "\n"; done

 # determine current screen position for overwriting the options
 local lastrow=`get_cursor_row`
 local startrow=$(($lastrow - $#))

 # ensure cursor and input echoing back on upon a ctrl+c during read -s
 trap "cursor_blink_on; stty echo; printf '\n'; exit" 2
 cursor_blink_off

 local selected=0
 while true; do
 # print options by overwriting the last lines
 local idx=0
 for opt; do
 cursor_to $(($startrow + $idx))
 if [ $idx -eq $selected ]; then
 print_selected "$opt"
 else
 print_option "$opt"
 fi
 ((idx++))
 done

 # user key control
 case `key_input` in
 enter) break;;
 up) ((selected--));
 if [ $selected -lt 0 ]; then selected=$(($# - 1)); fi;;
 down) ((selected++));
 if [ $selected -ge $# ]; then selected=0; fi;;
 esac
 done

 # cursor position back to normal
 cursor_to $lastrow
 printf "\n"
 cursor_blink_on

 return $selected
}

stream() {
 mpv --fs "sftp://[username]:$pass@$ip$mfolder${options[choice]}"
}

search() {
 read -p "Search
> " search
 chars=$(echo -n "$search" | wc -c)
 printf '\n'
 clear
 printf "Search Results For $search:"
 printf '\n'
 readarray options < <(sshpass -p "$pass" ssh "[username]@$ip" ls "$mfolder" | agrep -i -$(($chars/3)) "$search")
 select_option "${options[@]}"
 choice=$?
 stream
}

list() {
 clear
 sshpass -p "$pass" ssh [username]@$ip ls "$mfolder"
 search
}

cmd() {
 read -p "List or Search 
(S/l)> " cmd
 printf '\n'
 
 if [[ "$cmd" == "S" || "$cmd" == "s" ]]; then
 search
 elif [[ "$cmd" == "L" || "$cmd" == "l" ]]; then
 list
 else
 search
 fi
}

main() {
 cmd
}

main



Anything put in brackets is to not share my personal info (except for arrays, if statements etc)


Also this seems to have only changed while I was making the script. In the beginning, it was working great, but at one point it randomly stopped working.


I have a feeling its some kind of quote mess up or something stupid like that. I have tried to edit it and fix it to the best of my abilities but nothing I did fixed it.


I also think it could have to do with it being run in the bash environment as I normally use zsh. However I tested it in my shell by running /bin/bash and executing the command and it worked.


Also the option chooser was not made by me.