
Recherche avancée
Autres articles (54)
-
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (6301)
-
match an image to a specific frame within a video with ffmpeg
26 juin 2015, par az0I have some images that were taken from a video via screen capture. I would like to know when in the video these images appear (timestamps). Is there a way to programmatically match an image with a specific frame in a video using ffmpeg or some other tool ?
I am very open to different technologies as I’m eager to automate this. It would be extremely time consuming to do this manually.
-
Xuggle - Concatenate two videos - Error - java.lang.RuntimeException : error -1094995529 decoding audio
1er avril 2013, par user2232357I am using the Xuggle API to concatenate two MPEG videos (with Audio inbuilt in the MPEGs).
I am referring to the https://code.google.com/p/xuggle/source/browse/trunk/java/xuggle-xuggler/src/com/xuggle/mediatool/demos/ConcatenateAudioAndVideo.java?r=929. (my both inputs and output are MPEGs).Getting the bellow error.
14:06:50.139 [main] ERROR org.ffmpeg - [mp2 @ 0x7fd54693d000] incomplete frame
java.lang.RuntimeException: error -1094995529 decoding audio
at com.xuggle.mediatool.MediaReader.decodeAudio(MediaReader.java:549)
at com.xuggle.mediatool.MediaReader.readPacket(MediaReader.java:469)
at com.tav.factory.video.XuggleMediaCreator.concatenateAllVideos(XuggleMediaCreator.java:271)
at com.tav.factory.video.XuggleMediaCreator.main(XuggleMediaCreator.java:446)Can anyone help mw with this ??? Thanks in Advance..
Here is the complete code.
public String concatenateAllVideos(ArrayList<tavtexttoavrequest> list){
String finalPath="";
String sourceUrl1 = "/Users/SSID/WS/SampleTTS/page2/AV_TAVImage2.mpeg";
String sourceUrl2 = "/Users/SSID/WS/SampleTTS/page2/AV_TAVImage3.mpeg";
String destinationUrl = "/Users/SSID/WS/SampleTTS/page2/z_AV_TAVImage_Final23.mpeg";
out.printf("transcode %s + %s -> %s\n", sourceUrl1, sourceUrl2,
destinationUrl);
//////////////////////////////////////////////////////////////////////
// //
// NOTE: be sure that the audio and video parameters match those of //
// your input media //
// //
//////////////////////////////////////////////////////////////////////
// video parameters
final int videoStreamIndex = 0;
final int videoStreamId = 0;
final int width = 400;
final int height = 400;
// audio parameters
final int audioStreamIndex = 1;
final int audioStreamId = 0;
final int channelCount = 1;
final int sampleRate = 16000 ; // Hz 16000 44100;
// create the first media reader
IMediaReader reader1 = ToolFactory.makeReader(sourceUrl1);
// create the second media reader
IMediaReader reader2 = ToolFactory.makeReader(sourceUrl2);
// create the media concatenator
MediaConcatenator concatenator = new MediaConcatenator(audioStreamIndex,
videoStreamIndex);
// concatenator listens to both readers
reader1.addListener(concatenator);
reader2.addListener(concatenator);
// create the media writer which listens to the concatenator
IMediaWriter writer = ToolFactory.makeWriter(destinationUrl);
concatenator.addListener(writer);
// add the video stream
writer.addVideoStream(videoStreamIndex, videoStreamId, width, height);
// add the audio stream
writer.addAudioStream(audioStreamIndex, audioStreamId, channelCount,sampleRate);
// read packets from the first source file until done
try {
while (reader1.readPacket() == null)
;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// read packets from the second source file until done
try {
while (reader2.readPacket() == null)
;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// close the writer
writer.close();
return finalPath;
}
static class MediaConcatenator extends MediaToolAdapter
{
// the current offset
private long mOffset = 0;
// the next video timestamp
private long mNextVideo = 0;
// the next audio timestamp
private long mNextAudio = 0;
// the index of the audio stream
private final int mAudoStreamIndex;
// the index of the video stream
private final int mVideoStreamIndex;
/**
* Create a concatenator.
*
* @param audioStreamIndex index of audio stream
* @param videoStreamIndex index of video stream
*/
public MediaConcatenator(int audioStreamIndex, int videoStreamIndex)
{
mAudoStreamIndex = audioStreamIndex;
mVideoStreamIndex = videoStreamIndex;
}
public void onAudioSamples(IAudioSamplesEvent event)
{
IAudioSamples samples = event.getAudioSamples();
// set the new time stamp to the original plus the offset established
// for this media file
long newTimeStamp = samples.getTimeStamp() + mOffset;
// keep track of predicted time of the next audio samples, if the end
// of the media file is encountered, then the offset will be adjusted
// to this time.
mNextAudio = samples.getNextPts();
// set the new timestamp on audio samples
samples.setTimeStamp(newTimeStamp);
// create a new audio samples event with the one true audio stream
// index
super.onAudioSamples(new AudioSamplesEvent(this, samples,
mAudoStreamIndex));
}
public void onVideoPicture(IVideoPictureEvent event)
{
IVideoPicture picture = event.getMediaData();
long originalTimeStamp = picture.getTimeStamp();
// set the new time stamp to the original plus the offset established
// for this media file
long newTimeStamp = originalTimeStamp + mOffset;
// keep track of predicted time of the next video picture, if the end
// of the media file is encountered, then the offset will be adjusted
// to this this time.
//
// You'll note in the audio samples listener above we used
// a method called getNextPts(). Video pictures don't have
// a similar method because frame-rates can be variable, so
// we don't now. The minimum thing we do know though (since
// all media containers require media to have monotonically
// increasing time stamps), is that the next video timestamp
// should be at least one tick ahead. So, we fake it.
mNextVideo = originalTimeStamp + 1;
// set the new timestamp on video samples
picture.setTimeStamp(newTimeStamp);
// create a new video picture event with the one true video stream
// index
super.onVideoPicture(new VideoPictureEvent(this, picture,
mVideoStreamIndex));
}
public void onClose(ICloseEvent event)
{
// update the offset by the larger of the next expected audio or video
// frame time
mOffset = Math.max(mNextVideo, mNextAudio);
if (mNextAudio < mNextVideo)
{
// In this case we know that there is more video in the
// last file that we read than audio. Technically you
// should pad the audio in the output file with enough
// samples to fill that gap, as many media players (e.g.
// Quicktime, Microsoft Media Player, MPlayer) actually
// ignore audio time stamps and just play audio sequentially.
// If you don't pad, in those players it may look like
// audio and video is getting out of sync.
// However kiddies, this is demo code, so that code
// is left as an exercise for the readers. As a hint,
// see the IAudioSamples.defaultPtsToSamples(...) methods.
}
}
public void onAddStream(IAddStreamEvent event)
{
// overridden to ensure that add stream events are not passed down
// the tool chain to the writer, which could cause problems
}
public void onOpen(IOpenEvent event)
{
// overridden to ensure that open events are not passed down the tool
// chain to the writer, which could cause problems
}
public void onOpenCoder(IOpenCoderEvent event)
{
// overridden to ensure that open coder events are not passed down the
// tool chain to the writer, which could cause problems
}
public void onCloseCoder(ICloseCoderEvent event)
{
// overridden to ensure that close coder events are not passed down the
// tool chain to the writer, which could cause problems
}
}
</tavtexttoavrequest> -
ffmpeg - transpose then apply watermark
16 avril 2014, par Jeremy WilsonI'm trying to use the -vf / -filter_complex options to chain two filters - a video rotate and then applying a watermark.
I've got an existing command for the watermark :
-vf "movie=wm.png [watermark] ; [in][watermark] overlay=main_w/2-overlay_w/2:main_h-overlay_h [out]"
And I have a rotate :
-vf "transpose=1"
How can I combine the two, doing the rotate, then applying the watermark ? I can't seem to get -filter_complex to work :
-i wm.png -filter_complex "transpose=1,transpose=1,overlay=main_w/2-overlay_w/2:main_h-overlay_h"
It works but the video isn't rotated.