
Recherche avancée
Autres articles (30)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (5096)
-
af_biquads : memset(0) cache
25 février 2013, par Michael Niedermayeraf_biquads : memset(0) cache
-
cache : add todo list
16 octobre 2011, par Michael Niedermayercache : add todo list
-
ffmpeg error : Could not write header for output file #0 (incorrect codec parameters ?) : No such file or directory
6 mars 2021, par Syed UddinI have the following files in the Convert_video_to_HLS folder on my Desktop :


- 

- input
- output
- script.sh
- video.key
- video.key.info












The command I'm running is :


bash ./Desktop/Convert_video_to_HLS/script.sh ./Desktop/Convert_video_to_HLS/input ./Desktop/Convert_video_to_HLS/video.key.info ./Desktop/Convert_video_to_HLS/video.key ./Desktop/Convert_video_to_HLS/output



The contents of script.sh


#!/bin/sh
DIR=$1
DIR_KEY_INFO=$2
DIR_KEY=$3
OUTPUT=$4
echo $DIR
# List all mp4 files on folder
MP4_DIRS=$(find $DIR -type f | grep -E "\.mp4$")
mkdir -p $OUTPUT
for addr in $MP4_DIRS
do
FILE=$(basename $addr .mp4)
mkdir -p $OUTPUT/$FILE
cp $DIR_KEY $OUTPUT/$FILE/
ffmpeg -i $addr -codec: copy -start_number 0 -hls_time 20 -hls_list_size 0 -hls_key_info_file $DIR_KEY_INFO -f hls $OUTPUT/$FILE/$FILE.m3u8
done



The error message i get is :


[hls @ 0x7fd654012400] Opening './Desktop/Convert_video_to_HLS/video.key.info' for reading
[hls muxer @ 0x7fd65401c600] error opening key info file ./Desktop/Convert_video_to_HLS/video.key.info
Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
Stream mapping:
 Stream #0:1 -> #0:0 (copy)
 Stream #0:0 -> #0:1 (copy)
 Last message repeated 1 times



Help appreciated. FYI I'm new to bash script and following a tutorial so a breakdown would be appreciated.


Update :
I have placed the files in my root directory and run the following command, and it seems to work.


bash ./script.sh ./input ./video.key.info ./video.key ./output



Therefore, for some reason, the folder directory is not being referenced correctly.