
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (44)
-
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (7722)
-
Ignore streams when finding stream info
17 mars 2018, par CSNewmanI’m trying to speed up the start of ffmpeg when processing my live stream, and have narrowed down the issue to the ‘avformat_find_stream_info’ function. The source I’m trying to process seems to have a number of streams that ffmpeg is unable to determine what they are and therefore spends a while trying to find information about them (The entire analyse window). I know ahead of time that I only want to find information about stream #0:0 and #0:1, and I will be disregarding the other streams anyways.
I managed to work around this using the API by setting the number of streams before the find information call and then restoring the value afterwards.
inputContext->nb_streams = (uint) 2;
if (ffmpeg.avformat_find_stream_info(inputContext, null) < 0)
{
throw new InvalidOperationException("Could not read stream information.");
}
inputContext->nb_streams = oldSize;However, I would prefer to use the CLI interface of ffmpeg.
My current command
ffmpeg -find_stream_info false -i http://192.168.1.112:5004/auto/v1 -c copy -map 0:v:0 -map 0:a:0 -ignore_unknown -f hls -hls_flags delete_segments -segment_list playlist.m3u8 -segment_list_type hls -segment_list_size 10 -segment_list_flags +live -segment_time 10 -f segment stream%%05d.ts
Giving the following input (Unneeded logging removed)
[mpeg2video @ 000001ce79423440] Invalid frame dimensions 0x0.
Last message repeated 9 times
[mpegts @ 000001ce7941b740] Could not find codec parameters for stream 5 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ce7941b740] Could not find codec parameters for stream 6 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ce7941b740] Could not find codec parameters for stream 7
(Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000001ce7941b740] Could not find codec parameters for stream 8
(Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'http://192.168.1.112:5004/auto/v1':
Duration: N/A, start: 91296.182311, bitrate: N/A
Program 4165
Stream #0:0[0x65]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x66](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
Stream #0:2[0x6a](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 64 kb/s (visual impaired) (dependent)
Stream #0:3[0x69](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:4[0x98]: Audio: mp2 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:5[0x1c21]: Unknown: none ([11][0][0][0] / 0x000B)
Stream #0:6[0x1c33]: Unknown: none ([11][0][0][0] / 0x000B)
Stream #0:7[0x1bbf]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:8[0x1bc1]: Unknown: none ([5][0][0][0] / 0x0005)I’m unsure if there’s a way to achieve the same functionality with the CLI, however I’m open changing how my setup works.
One idea that I considered was running two ffmpeg instances, one to strip the unneeded streams (and not find the stream info) and then have another that takes that stripped stream and performs the rest of the functionality.
Any insight here would be grateful, thanks in advance.
-
ValueError : I/O operation on closed file with ffmpeg
22 mars 2018, par AstroCodaI’m trying to get this (minimal working example) code to compile in a virtual environment on Anaconda which I’ve set up in a supercomputing cluster :
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as manimation
FFMpegWriter = manimation.writers['ffmpeg']
metadata = dict(title='Movie Test', artist='Matplotlib',
comment='Movie support!')
writer = FFMpegWriter(fps=15, metadata=metadata)
fig = plt.figure()
l, = plt.plot([], [], 'k-o')
plt.xlim(-5, 5)
plt.ylim(-5, 5)
x0, y0 = 0, 0
with writer.saving(fig, "writer_test.mp4", 100):
for i in range(100):
x0 += 0.1 * np.random.randn()
y0 += 0.1 * np.random.randn()
l.set_data(x0, y0)
writer.grab_frame()The thing is, this code works absolutely fine on my local machine (MacOSX) - Anaconda distribution ; Python 2.7 ; same matplotlib and numpy version, and I have ffmpeg on Anaconda ; I have ffmpeg on the cluster as well, albeit at a different version to the one on Python (but no issue with this on my local machine). When I run the code on the cluster, I get :
Traceback (most recent call last):
File "movie_test.py", line 25, in <module>
writer.grab_frame()
File "~/anaconda2/envs/test_movie/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 241, in saving
self.finish()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 367, in finish
self.cleanup()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 405, in cleanup
out, err = self._proc.communicate()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 927, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1713, in _communicate
orig_timeout)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1769, in _communicate_with_poll
register_and_append(self.stdout, select_POLLIN_POLLPRI)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1748, in register_and_append
poller.register(file_obj.fileno(), eventmask)
ValueError: I/O operation on closed file
</module>All the searches I’ve made correspond to relatively simple text write in/out operations, but not for videos. Thanks in advance for the help !
-
Catching ffmpeg errors in Tensorflow
12 avril 2018, par lollercoasterCurrently I make extensive use of tensorflow’s ffmpeg interface :
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
from tensorflow.python.ops import io_ops
from tensorflow.contrib import ffmpeg
def load(mp3_path):
with tf.name_scope("loading") as scope:
audio_binary = tf.read_file(mp3_path)
waveform = tf.reshape(ffmpeg.decode_audio(
audio_binary, file_format='mp3',
samples_per_second=44100, channel_count=1), [-1])
return waveformThis is wonderful, but sometimes (well, a lot) I get errors like this when looping through a bunch of files to create TFRecord files :
[mp3 @ 0xdd4400] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3 @ 0xf2e440] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3 @ 0x202bf40] invalid new backstep -1
[mp3 @ 0x15c5440] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3 @ 0x1752460] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3 @ 0x1f10160] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3 @ 0x1a16dc0] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3 @ 0x9f2c80] Header missing
Error while decoding stream #0:0: Invalid data found when processing inputwhich shows up in stdout while running this Python script.
I’d like to catch these somehow ! And prevent the rest of my loop from continuing if the data I’m reading is invalid.
Currently, these errors just happen and the script happily keeps running, which is probably not the way it should work.
I’m not making use of the Dataset API for this, so these direct
session.run(waveform_op)
calls should throw and Exception or something when parsing fails !Anyone know how I can do this ?