
Recherche avancée
Autres articles (13)
-
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" ; -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (3756)
-
Pack ffmpeg executable insde myProject's executable to run
8 décembre 2023, par zurTLDR ;


I would like to pack the
ffmpeg
executable inside my own executable. Currently I am getting

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Skipping ./testFile202312061352.mp4 due to FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'



Details :


I am creating executable file using following command :


pyinstaller cli.py \
 --onefile \
 --add-binary /Users/<machineuser>/anaconda3/envs/my_env/bin/ffmpeg:bin
</machineuser>


The code that uses
ffmpeg
is not authored by me. And I would like to keep that part the same. I hope that when I run from command line whileconda
environment is active I can successfully run it aspython
(or perhapsanaconda
) knows where the binaries are. May be there is some environment variable that is pointing to/Users/<machineuser>/anaconda3/envs/my_env/bin/</machineuser>
I have a pretty emptycli.py
. That seems to be the entry point and I hope if it is possible I can set thebin
directory's path there ...

I am able to successfully run the application like following :


(my_env) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4



I would like to run like following :


(base) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4



I would like to keep the world out side my executable's tmp folder the same. I would not want to change something that will be "left behind" after the exec is terminated.


Question :


Can some one please mention how to modify the
pyinstaller
command or what to change incli.py
to achieve it successfully ?

-
Live streaming multiple bitrates with FFmpeg and node.js
14 juillet 2014, par user2757842I am looking for an efficient way of transcoding a live stream and breaking it up into different bit rates, I have it working as of now but I have to state each time which video I would like to address as well as each different bit rate, example below :
var spawn = require('child_process').spawn;
/*
var ffmpeg = spawn('C:\\Users\\Jay\\Documents\\FFMPEG\\bin\\ffmpeg.exe', [
'-i',
'rtmp://192.168.201.8/livepkgr/livestream2 live=1',
'-movflags',
'isml+frag_keyframe',
'-f',
'ismv',
'http://192.168.201.237/LiveSmoothStreaming.isml/Streams(video2)'
]);
*/
var ffmpeg = spawn('C:\\Users\\Jay\\Documents\\FFMPEG\\bin\\ffmpeg.exe', [
'-i',
'rtmp://192.168.201.8/livepkgr/livestream live=1',
'-ac',
'2',
'-b:a',
'64k',
'-c:v',
'libx264',
'-b:v:0',
'150k' /* first bit rate i want */ ,
'-movflags',
'isml+frag_keyframe',
'-f',
'ismv',
'http://192.168.201.237/LiveSmoothStreaming2.isml/Streams(video1)',
'-c:v',
'libx264',
'-b:v:0',
'500k' /* second bit rate i want */ ,
'-movflags',
'isml+frag_keyframe',
'-f',
'ismv',
'http://192.168.201.237/LiveSmoothStreaming2.isml/Streams(video3)'
]);As you can see, this is not a very efficient way of doing it as this is only for 2 bit rates, I have to give a video name (video1, video 3 etc) each time I want a new bit rate and then I have to give it it’s bit rate (150k, 500k etc). If I wanted anymore bitrates, the code lines would go on and on and it would quickly become messy.
Has anyone worked within the world of Node.js and FFmpeg that could maybe point me in the direction of managing this more efficiently ? Or even link me to a page which would help me out ?
Cheers
-
FFMPEG FDKAAC and Python
3 avril 2024, par Eric BarkerBeen banging my head against the wall for days on this. I'm writing a python program to take a 48kHz WAV file, convert it to 44.1kHz and encode it to HE-AAC via FDKAAC. FDK cannot convert to sample rates, so I'm using FFMPEG as the wrapper and piping it through FDKAAC. In a perfect world, I'd make a custom build of FFMPEG with FKD, but I've run into loads of issues on our Windows Server 2019 machine trying to build out FFMPEG, so I'm using vanilla FFMPEG with FDK piped in.


I can get the command to work perfectly from a command prompt :


ffmpeg -progress pipe:2 -i -f wav -ar 44100 - | fdkaac -p 5 -b 64000 -o 



But when I try to split it in Python for a Popen, it tries to evaluate the arguments and fails because ffmpeg doesn't have a "-p" argument :


cmd = ['ffmpeg', '-progress', 'pipe:2', '-i', inFile, \
 '-f', 'wav', '-ar', '44100', '-', '|', \
 'fdkaac', '-p', '5', '-b', '64000', '-o', outFile]
fdkProcess = subprocess.Popen(cmd,
 stdout=subprocess.PIPE,
 universal_newlines=True)
for line in fdkProcess.stdout:
 print(line)



RESULT :


Unrecognized option 'p'.
Error splitting the argument list: Option not found



I'll admit, I don't fully understand the pipeline process, and how to split commands via the "|" flag, and have them properly feed into stdout for the subprocess function to work correctly. I'm fairly new to python, and very new to programmatically capturing the output of a process like ffmpeg.