
Recherche avancée
Autres articles (62)
-
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 (8738)
-
Anomalie #3272 : Double # dans l’attribut action du formulaire
4 octobre 2014, par cedric -Oui le fix est bien utile, au moins tant qu’il restera des IE7 dans la nature. De mémoire il était aussi touché par le bug que IE6, il faudrait vérifier si IE8 l’est aussi.
Ici le vrai bugfix c’est de modifier le formulaire concerné et d’utiliser |ancre_url pour mettre l’ancre car on ne sait jamais ce que action peut contenir en effet. -
Paperclip-ffmpeg not working on Rails
28 juillet 2013, par Lee7355512727I installed Paperclip-ffmpeg and tried to upload a flv file, but it seems there are some problems converting the file.
I added
Paperclip.options[:command_path] = "/usr/bin/"
(I got the path by usingwhich ffmpeg
) to myconfig/environments/development.rb
file, following the instructions on the paperclip-ffmpeg github page.Here is my model
subquestion.rb
, which contains a paperclip field called qflv :class Subquestion < ActiveRecord::Base
belongs_to :question
has_many :qimages , :dependent => :destroy
has_attached_file :qflv, styles: {
medium: {geometry: "640*480", format: 'flv'},
thumb: {geometry: "100*100#", format: 'jpg', time: 10}
}, processors: [:ffmpeg]And here is my
_subquestion_fields.html.erb
file, where users upload videos :<%= f.file_field :qflv %>
_subquestion_fields.html.erb
is rendered by question.html.erb file :<%= nested_form_for @question, :url => {:action => 'create_question'} do |f| %>
<%= f.fields_for :subquestions do |builder| %>
<%= render 'subquestion_fields', :f => builder %>And here is part of the error message :
WARNING: gnome-keyring:: couldn't connect to: /run/user/li/keyring-CsW4u8/pkcs11: No such file or directory
ffmpeg version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
built on Mar 30 2013 22:23:21 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[flv @ 0x8ba50a0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from '/tmp/03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l9.flv':
Metadata:
metadatacreator : modified by youku.com in 20111202
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
Duration: 00:05:25.03, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264 (High), yuv420p, 448x336 [PAR 1:1 DAR 4:3], 15 tbr, 1k tbn, 30 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16
Incorrect frame size
Failed to set value '0x0' for option 's'
WARNING: gnome-keyring:: couldn't connect to: /run/user/li/keyring-CsW4u8/pkcs11: No such file or directory
ffmpeg version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
built on Mar 30 2013 22:23:21 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[flv @ 0x86490a0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from '/tmp/03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l9.flv':
Metadata:
metadatacreator : modified by youku.com in 20111202
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
Duration: 00:05:25.03, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264 (High), yuv420p, 448x336 [PAR 1:1 DAR 4:3], 15 tbr, 1k tbn, 30 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'
[buffer @ 0x864c180] w:448 h:336 pixfmt:yuv420p
[scale @ 0x8653840] w:448 h:336 fmt:yuv420p -> w:448 h:336 fmt:yuvj420p flags:0x4
[crop @ 0x864dc20] w:448 h:336 -> w:0 h:0
[crop @ 0x864dc20] Invalid too big or non positive size for width '0' or height '0'
Error opening filters!
Started POST "/test_geisinger/roots/questions/create" for 127.0.0.1 at 2013-07-27 23:12:31 -0400
Processing by RootsController#create_question as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"EiJk5dBf1nL96BtUiKc0qALCg0Bj9mQ0dx9IodfYdO0=", "question"=>{"explanation"=>"flv", "choice_id"=>"8", "correct_selection_id"=>"32", "quiz_id"=>"10", "subquestions_attributes"=>{"0"=>{"subquestion_type"=>"flv", "_destroy"=>"false", "qflv"=>#x-flv\r\n", @tempfile=#tmp/RackMultipart20130727-1837-1f6g2s0>>}}}, "commit"=>"Submit"}
[paperclip] [ffmpeg] ffmpeg -i "/tmp/03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l9.flv" 2>&1
[paperclip] [ffmpeg] Command Success
[paperclip] [ffmpeg] Making...
[paperclip] [ffmpeg] Building Destination File: '03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l9' + 'flv'
[paperclip] [ffmpeg] Destination File Built
[paperclip] [ffmpeg] Adding Geometry
[paperclip] [ffmpeg] Extracting Target Dimensions
[paperclip] [ffmpeg] Target Size is Available
[paperclip] [ffmpeg] Keeping Aspect Ratio
[paperclip] [ffmpeg] Resize
[paperclip] [ffmpeg] Convert Options: 0x0
[paperclip] [ffmpeg] Adding Format
[paperclip] [ffmpeg] Adding Source
[paperclip] [ffmpeg] Building Parameters
[paperclip] [ffmpeg] -i :source -s 0x0 -y :dest
Command :: ffmpeg -i '/tmp/03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l9.flv' -s 0x0 -y '/tmp/03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l920130727-1837-11o3enh.flv'
[paperclip] An error was received while processing: #tmp/03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l9.flv' -s 0x0 -y '/tmp/03000201005171FC8274A20623ECA86B119768-56C7-7A62-DB7A-A4B599F64EE720130727-1837-13757l920130727-1837-11o3enh.flv'' returned 1. Expected 0There might be some problems with pkcs11 so I found this article :
https://bugzilla.redhat.com/show_bug.cgi?id=783568
But I could not find
/etc/xdg/autostart/gnome-keyring-*.desktop
.Thank you !
-
stout to textarea from ffmpeg command
21 septembre 2014, par BrettHi im trying to get the output of a ffmpeg command into a text level here is my code i am posting the lot as im brand new to java and am not sure where ive gone wrong i want to run the command and have the progress bar update and the output to show on a text area.
any help would appreciatedpackage MyPackage;
import java.util.*;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author brett
*/
public class NumberAdditionUI extends javax.swing.JFrame {
private static final long serialVersionUID = 1L;
/**
* Creates new form NumberAdditionUI
*/
public NumberAdditionUI() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
//
private void initComponents() {
db = new javax.swing.JFileChooser();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jTextField1 = new javax.swing.JTextField();
jButton3 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jProgressBar1 = new javax.swing.JProgressBar();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
db.setBackground(java.awt.Color.white);
db.setCurrentDirectory(new java.io.File("C:\\Users\\brett\\Documents\\convert"));
db.setDialogTitle("grabAFile");
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Smoke Goobies");
setMaximumSize(getPreferredSize());
jButton1.setText("Exit");
jButton1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("Browse");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jTextField1.setText("Select A File To Covert");
jButton3.setText("Run This Puppy");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jLabel1.setFont(new java.awt.Font("Goudy Old Style", 1, 56)); // NOI18N
jLabel1.setIcon(jLabel1.getIcon());
jLabel1.setText(" MASHiTuP");
jProgressBar1.setValue(50);
jProgressBar1.setBorder(new javax.swing.border.MatteBorder(null));
jTextArea1.setColumns(20);
jTextArea1.setRows(5);
jTextArea1.setAutoscrolls(false);
jScrollPane1.setViewportView(jTextArea1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 282, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jButton3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton1)))
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jScrollPane1))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton2)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton3))
.addContainerGap())
);
jProgressBar1.getAccessibleContext().setAccessibleName("MYsTATUS");
pack();
}//
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
int returnVal = db.showOpenDialog( this );
File f = db.getSelectedFile();
String filename = f.getAbsolutePath();
jTextField1.setText(filename);
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
java.lang.Runtime rt = java.lang.Runtime.getRuntime();
java.lang.Process proc = null;
try {
proc = rt.exec("ipconfig");
//proc = rt.exec("ffmpeg -i C:\\Users\\brett\\Documents\\MASH_02.avi C:\\Users\\brett\\Documents\\mash09.avi");
} catch (IOException ex) {
Logger.getLogger(NumberAdditionUI.class.getName()).log(Level.SEVERE, null, ex);
}
BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream()));
BufferedReader stdError = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
// read the output from the command
System.out.println("Here is the standard output of the command:\n");
String s;
try {
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
jTextArea1.append(s+"\n\n");
}
} catch (IOException ex) {
Logger.getLogger(NumberAdditionUI.class.getName()).log(Level.SEVERE, null, ex);
}
// read any errors from the attempted command
System.out.println("Here is the standard error of the command (if any):\n");
try {
while ((s = stdError.readLine()) != null) {
System.out.println(s);
}
} catch (IOException ex) {
Logger.getLogger(NumberAdditionUI.class.getName()).log(Level.SEVERE, null, ex);
}
}
/**
*
* @param args the command line arguments
*/
public static void main(String args[])
{
/*
* Set the Nimbus look and feel
*/
//
/*
* If Nimbus (introduced in Java SE 6) is not available, stay with the
* default look and feel. For details see
* http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NumberAdditionUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//
/*
* Create and display the form
*/
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
new NumberAdditionUI().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JFileChooser db;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JLabel jLabel1;
private javax.swing.JProgressBar jProgressBar1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JTextField jTextField1;
// End of variables declaration
}