
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (44)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (7901)
-
Saving an animation using ffmpeg and matplotlib on anaconda3
21 juin 2016, par Varsha DyavaiahI am trying to create videos of NBA Action with Sportsvu data.
I was following the steps given in this blog by Dan Vatterott :
I am trying to create a animation and save it using ffmpeg and matplotlib.
The code snippet is attached below.import matplotlib.animation as animation
plt.rcParams['animation.ffmpeg_path'] = '/home/anaconda3/pkgs/ffmpeg-2.1.0-1/bin'
fig = plt.figure(figsize=(15,7.5)) #create figure object
ax = plt.gca() #create axis object
draw_court([0,100,0,50]) #draw the court
player_text = list(range(10)) #create player text vector
player_circ = list(range(10)) #create player circle vector
ball_circ = plt.Circle((0,0), 1.1, color=[1, 0.4, 0]) #create circle object for bal
for i in list(range(10)): #create circle object and text object for each player
col=['w','k'] if i<5 else ['k','w'] #color scheme
player_circ[i] = plt.Circle((0,0), 2.2, facecolor=col[0],edgecolor='k') #player circle
player_text[i] = ax.text(0,0,'',color=col[1],ha='center',va='center') #player jersey # (text)
ani = animation.FuncAnimation(fig, animate, frames=np.arange(0,np.size(ball_xy,0)), init_func=init, blit=True, interval=5, repeat=False,\
save_count=0) #function for making video
FFwriter = animation.FFMpegWriter()
ani.save('Event_%d.mp4' % (search_id),dpi=100,writer = FFwriter,fps=25) #function for saving video
plt.close('all') #close the plotWhen I try to save the animation ’ani’ , I get Errno 13 (Permission denied).
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
in <module>()
17
18 FFwriter = animation.FFMpegWriter()
---> 19 ani.save('Event_%d.mp4' % (search_id),dpi=100,writer = FFwriter,fps=25) #function for saving video
20 plt.close('all') #close the plot
/home/anaconda3/lib/python3.5/site-packages/matplotlib/animation.py in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs)
799 # since GUI widgets are gone. Either need to remove extra code to
800 # allow for this non-existant use case or find a way to make it work.
--> 801 with writer.saving(self._fig, filename, dpi):
802 for anim in all_anim:
803 # Clear the initial frame
/home/anaconda3/lib/python3.5/contextlib.py in __enter__(self)
57 def __enter__(self):
58 try:
---> 59 return next(self.gen)
60 except StopIteration:
61 raise RuntimeError("generator didn't yield") from None
/home/anaconda3/lib/python3.5/site-packages/matplotlib/animation.py in saving(self, *args)
192 '''
193 # This particular sequence is what contextlib.contextmanager wants
--> 194 self.setup(*args)
195 yield
196 self.finish()
/home/anaconda3/lib/python3.5/site-packages/matplotlib/animation.py in setup(self, fig, outfile, dpi, *args)
182 # Run here so that grab_frame() can write the data to a pipe. This
183 # eliminates the need for temp files.
--> 184 self._run()
185
186 @contextlib.contextmanager
/home/anaconda3/lib/python3.5/site-packages/matplotlib/animation.py in _run(self)
210 stdout=output, stderr=output,
211 stdin=subprocess.PIPE,
--> 212 creationflags=subprocess_creation_flags)
213
214 def finish(self):
/home/anaconda3/lib/python3.5/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds)
948 c2pread, c2pwrite,
949 errread, errwrite,
--> 950 restore_signals, start_new_session)
951 except:
952 # Cleanup if the child failed starting.
/home/anaconda3/lib/python3.5/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
1542 else:
1543 err_msg += ': ' + repr(orig_executable)
-> 1544 raise child_exception_type(errno_num, err_msg)
1545 raise child_exception_type(err_msg)
1546
PermissionError: [Errno 13] Permission denied
</module>Can someone help me ? Thanks in advance.
-
libx265 motion compensation and CU traverse
17 juin 2016, par ArianaI’m trying to play with the H.265 motion compensation and search (HEVC- libx265 implementation from here : https://bitbucket.org/multicoreware/x265/downloads). I need to slightly extend the edge extension search, and fill the macro block with left-most pixels as if my sample videos are like cylinder (rightmost is connected to leftmost).
What I need to do is basically this :
One way to do that is to modify the edge extension area (which is already in the code, in the
frameFilter.cpp
), and do that for rightmost and fill parts of blocks which are out with leftmost pixels. I identified the piece of code here which apparently is responsible for that. Can someone help me with implementing this feature ?if ((col == 0) | (col == m_frameFilter->m_numCols - 1))
{
// TODO: improve by process on Left or Right only
primitives.extendRowBorder(reconPic->getLumaAddr(m_rowAddr), stride, reconPic->m_picWidth, realH, reconPic->m_lumaMarginX);
if (m_frameFilter->m_param->internalCsp != X265_CSP_I400)
{
primitives.extendRowBorder(reconPic->getCbAddr(m_rowAddr), strideC, reconPic->m_picWidth >> hChromaShift, realH >> vChromaShift, reconPic->m_chromaMarginX);
primitives.extendRowBorder(reconPic->getCrAddr(m_rowAddr), strideC, reconPic->m_picWidth >> hChromaShift, realH >> vChromaShift, reconPic->m_chromaMarginX);
}
}
// Extra Left and Right border on first and last CU
if ((col == 0) | (col == m_frameFilter->m_numCols - 1))
{
copySizeY += lumaMarginX;
copySizeC += chromaMarginX;
}
// First column need extension left padding area and first CU
if (col == 0)
{
pixY -= lumaMarginX;
pixU -= chromaMarginX;
pixV -= chromaMarginX;
} -
FFMPEG Motion Compensation and Search
20 juin 2016, par Tina JasminI’m trying to modify the motion detection part of FFMPEG. What I want to do is to extend the search space, so that whenever the macroblock hit the right most edge of the frame, I need it to still move the block towards the left-most as if they are connected (in my example videos, the right edge is actually a continue of the left edge). Can someone help me to point where exactly I can modify it within FFMPEG source code or x265, or x264 ?
I took H265 as an example from here. It has a
motion.cpp
file which nicely specifies the possible block sizes as below. But I can’t find the specific loop that traverses the frame. A help is highly appreciated.#define SETUP_SCALE(W, H) \
sizeScale[LUMA_ ## W ## x ## H] = (H * H) >> 4;
SETUP_SCALE(4, 4);
SETUP_SCALE(8, 8);
SETUP_SCALE(8, 4);
SETUP_SCALE(4, 8);
SETUP_SCALE(16, 16);
SETUP_SCALE(16, 8);
SETUP_SCALE(8, 16);
SETUP_SCALE(16, 12);
SETUP_SCALE(12, 16);
SETUP_SCALE(4, 16);
SETUP_SCALE(16, 4);
SETUP_SCALE(32, 32);
SETUP_SCALE(32, 16);
SETUP_SCALE(16, 32);
SETUP_SCALE(32, 24);
SETUP_SCALE(24, 32);
SETUP_SCALE(32, 8);
SETUP_SCALE(8, 32);
SETUP_SCALE(64, 64);
SETUP_SCALE(64, 32);
SETUP_SCALE(32, 64);
SETUP_SCALE(64, 48);
SETUP_SCALE(48, 64);
SETUP_SCALE(64, 16);
SETUP_SCALE(16, 64);
#undef SETUP_SCALEUPDATE :
One way to do that (in x265) is to modify the edge extension area (which is already in the code, in the
frameFilter.cpp
), and do that for rightmost and fill blocks with leftmost pixels. I identified the piece of code here. Can someone help me to add this feature for right-to-left extension ?if ((col == 0) | (col == m_frameFilter->m_numCols - 1))
{
// TODO: improve by process on Left or Right only
primitives.extendRowBorder(reconPic->getLumaAddr(m_rowAddr), stride, reconPic->m_picWidth, realH, reconPic->m_lumaMarginX);
if (m_frameFilter->m_param->internalCsp != X265_CSP_I400)
{
primitives.extendRowBorder(reconPic->getCbAddr(m_rowAddr), strideC, reconPic->m_picWidth >> hChromaShift, realH >> vChromaShift, reconPic->m_chromaMarginX);
primitives.extendRowBorder(reconPic->getCrAddr(m_rowAddr), strideC, reconPic->m_picWidth >> hChromaShift, realH >> vChromaShift, reconPic->m_chromaMarginX);
}
}
// Extra Left and Right border on first and last CU
if ((col == 0) | (col == m_frameFilter->m_numCols - 1))
{
copySizeY += lumaMarginX;
copySizeC += chromaMarginX;
}
// First column need extension left padding area and first CU
if (col == 0)
{
pixY -= lumaMarginX;
pixU -= chromaMarginX;
pixV -= chromaMarginX;
}