
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (41)
-
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 (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 (4493)
-
FFmpeg cannot find the file which is in the same directory as the python script [duplicate]
8 octobre 2023, par N_ViofileBoth of the input and output are in the folder, but python does not know where they are ?


import subprocess
import pathlib

def convert_video_to_mp4(input_file, output_file):
print(pathlib.Path(__file__).parent.resolve())
ffmpeg_cmd = [
"ffmpeg"
"-i", input_file,
output_file
]

 try:
 subprocess.run(ffmpeg_cmd, check=True)
 print("Successfully converted")
 except subprocess.CalledProcessError as e:
 print("Conversion failed!")

convert_video_to_mp4("Media.ts", "video.mp4")



First I was trying to convert a file on a website to mp4, that did not work, So I tried downloading the file to see if it would work and it still did not work.


Full Error


C:\Users\viofi\PycharmProjects\FFMPEGSERVER\venv\Scripts\python.exe C:\Users\viofi\PycharmProjects\FFMPEGSERVER\ffmpeg.py 
C:\Users\viofi\PycharmProjects\FFMPEGSERVER
Traceback (most recent call last):
 File "C:\Users\viofi\PycharmProjects\FFMPEGSERVER\ffmpeg.py", line 21, in <module>
 convert_video_to_mp4("Media.ts", "video.mp4")
 File "C:\Users\viofi\PycharmProjects\FFMPEGSERVER\ffmpeg.py", line 15, in convert_video_to_mp4
 subprocess.run(ffmpeg_cmd, check=True)
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 548, in run
 with Popen(*popenargs, **kwargs) as process:
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1026, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1538, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

Process finished with exit code 1
</module>


-
Extract audio from a MPEG(.ts) file in memory in python, Without writing MPEG to a file
19 octobre 2020, par azuseI am working on a project that need to extarct audio from a stream which is transmitted by .ts(MPEG-2 Transport Stream) file.



Currently I need to First save the file to file system, Then open it using moivepy to convert to WAV format audio.



The streaming requires realtime transmit, and there are multiple .ts file need to be process every second, Moivepy is too slow to open them all and convert each in realtime.



So I wonder if I can finish the whole process of extracting audio from MPEG in memory, avioding file system IO may speed up the process. How can I do it ?


-
Playing local (m3u8) file in ijkplayer can't play videos faster, using protocol_whitelist with 'tcp, http, https, udp, file, crypto, concat'
3 août 2020, par gh05tI've been trying to find a solution to play m3u8 files in flutter and have the ability to change quality and speed of the videos, and I've reached a point where I'm able to do one or the other but not both. To change streams of m3u8, I'm splitting the files locally and essentially creating different files with each file only having one quality thus achieving quality change, but to play local files I have to use format option of
ffmpeg protocol_whitelist
and for some reason it's messing with my ability to play videos faster than 1.0, now the problem is not with the files I tried to connect to same file using google drive and since it's not a local file I don't need to set theprotocol_whitelist
. I don't know if this is an ffmpeg issue or an ijk player issue or perhaps even just a flutter ijk player issue, but if someone knows or has any ideas on how to fix please let me know, I also tried to use networkdataSource and give url as'file://path/filename.m3u8'
but no luck it requires the protocol_whitelist as well.

The player by default sets the fflags with 'fastseek' and I suspect that setting protocol_whitelist, is causing some issue with this flag and that is what is causing the problem.(fast seek helps with seeking to a point ahead of buffer in m3u8 and has nothing to do with player speed I've learned)


So basically can I either fix this issue somehow ? (either by changing qualities from the original master m3u8 file with the player and not doing all this stuff with local file ?)


Or is there a way to give a local file to player such that it thinks it came from http/https and it plays it without causing an issue ?
(Wait did I answer my own question here ? making a http server and serving my file from my phone and using that should that be enough but localhost will be same as using file :/// essentially or not ? It's not and it fixes the issue ! XD)


In case someone just knows some other solution perhaps ?
I do know that it's possible to add a function in c in ffmpeg to play different streams from master m3u8 but then I would have to compile 4-5 versions of this for different mobile processors and then interface to Java with JNI/JNA and to objective C, and then to flutter, which seems out of scope of my ability for the time being.