Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (57)

  • Modifier la date de publication

    21 juin 2013, par

    Comment 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, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (7088)

  • How to resize an mp4 video and reduce frame rate while keeping quality ?

    1er décembre 2019, par Jules

    I’m trying to resize (keeping quality) and reduce frame rate to 30, I’ve seen various command but I’m having difficulty.

    This seems to resize nicely

    ffmpeg -i final-video.mp4 -aspect 886:1920 -c copy final-resized.mp4

    I’ve also see -r 30 and -filter:v fps=fps=30

    But neither seem to work in-conjunction with the resize command.

    I’ve seen posts like this
    Re-sampling H264 video to reduce frame rate while maintaining high image quality
    But this takes a long time.

  • Stream h264 to javafx possibly using javacv/ffmpeg

    4 octobre 2018, par cagney

    I’m really stuck on getting a video stream to play on a java fx project.

    — Short version :

    I’m streaming h264/avcc flavor video from an android phone to a desktop computer. However javafx doesn’t have an easy solution for displaying stream. I’m attempting to use javacv / ffmpeg in an attempt to make this work. However I am getting errors from ffmpeg.

    1) Is there a better way to display streaming video on javafx ?

    2) Do you have a sample project or good tutorial for javacv ffmpegframegrabber ?

    3) I think I may be missing some small detail in mycode but Im not sure what i would be.

    — Longer Version :

    1) On the android end Im getting video using mediarecorder. In order to get the sps/pps info I record and save a small movie to the device and then parse the sps and pps data.

    2) Next, on the android, I split up the nalus to meet MTU req and send them over a udp connection to my desktop

    3)On my desktop I reassmble the nalus( or trash them if they loose data) and feed those to an input stream that I gave to the framegreabber constructor.

    — The Code and Logs :

    The errors are long and numerous depending on the flavor I feed it. Here are two separate examples which are usually repeated at great length

    [h264 @ 0000020225907a40] non-existing PPS 0 referenced
    [h264 @ 0000020225907a40] decode_slice_header error
    [h264 @ 0000020225907a40] no frame!

    [h264 @ 00000163d8637a40] illegal aspect ratio
    [h264 @ 00000163d8637a40] pps_id 3412 out of range
    [AVBSFContext @ 00000163e28a0e00] Invalid NAL unit 0, skipping.

     !! One big caveat that I am aware off is that I have not implemented timestamps
    which I created on the android device when feeding ffmpeg. I think it should still show distorted images without this though

    Because I have spent all day guessing and trying I have several "flavors" of data I have shoved through. I am only showing the first section of each nal which I believe if correct would at least show a garbage image as long as my sps and pps are right

    sps: 67 80 80 1E E9 01 68 22 FD C0 36 85 09 A8
    pps: 68 06 06 E2

    Below is annex B style.
    These were each prefixed with either 00 00 01 and 00 00 00 01

    Debug transfer 65 B8 40 0B E5 B8 7B 80 5B 85
    Debug transfer 41 E2 20 7A 74 34 3B D6 BE FA
    Debug transfer 41 E4 40 2F 01 E0 0C 06 EE 91
    Debug transfer 41 E6 60 3E A1 20 5A 02 3C 6D
    Debug transfer 41 E8 80 13 B0 B9 82 C3 03 F4
    Debug transfer 41 EC C0 1B A3 0C 28 F1 B0 C8
    Debug transfer 41 EE E0 1F CE 07 30 EE 05 06
    Debug transfer 41 F1 00 08 ED 80 9C 20 09 73
    Debug transfer 41 F3 20 09 E9 00 86 60 21 C3
    VideoDecoderaddPacket type: 24
    Debug transfer 67 80 80 1E E9 01 68 22 FD C0
    Debug transfer 68 06 06 E2
    Debug transfer 65 B8 20 00 9F 80 78 00 12 8A
    Debug transfer 41 E2 20 09 F0 1E 40 7B 0C E0
    Debug transfer 41 E4 40 09 F0 29 30 D6 00 AE
    Debug transfer 41 E6 60 09 F1 48 31 80 99 40
    [h264 @ 000001c771617a40] non-existing PPS 0 referenced

    Here I tried Avcc style. You can see the first line is the combination of the sps pps followed by idr and then repeated non idr

    Debug transfer 18 00 0E 67 80 80 1E E9 01 68
    Debug transfer 00 02 4A 8F 65 B8 20 00 9F C5
    Debug transfer 00 02 2F DA 41 E2 20 09 E8 0F
    Debug transfer 00 02 2C 34 41 E4 40 09 F4 20
    Debug transfer 00 02 4D 92 41 E6 60 09 FC 2B
    Debug transfer 00 02 47 02 41 E8 80 09 F0 72
    Debug transfer 00 02 52 50 41 EA A0 09 EC 0F
    Debug transfer 00 02 58 8A 41 EC C0 09 FC 6F
    Debug transfer 00 02 55 F9 41 EE E0 09 FC 6E
    Debug transfer 00 02 4D 79 41 F1 00 09 F0 3E
    Debug transfer 00 02 4D B6 41 F3 20 09 E8 64

    The following class is where I try to get javacv/ffmpeg to show the video. I dont think its an ideal solution and am researching canvasfram as a replacement to the image view.

       public class ImageDecoder {

       private final static String TAG = "ImageDecoder ";

       private ImageDecoder(){

       }


       public static void streamImageToImageView(
               final ImageView view,
               final InputStream inputStream,
               final String format,
               final int frameRate,
               final int bitrate,
               final String preset,
               final int numBuffers
       )
       {
           System.out.println("Image Decoder Starting...");


           try(    final FrameGrabber grabber = new
       FFmpegFrameGrabber(inputStream))
           {

               final Java2DFrameConverter converter = new Java2DFrameConverter();

               grabber.setFrameNumber(frameRate);
               grabber.setFormat(format);
               grabber.setVideoBitrate(bitrate);
               grabber.setVideoOption("preset", preset);
               grabber.setNumBuffers(numBuffers);

               System.out.println("Image Decoder waiting on grabber.start...");
               grabber.start();   //---- this call is blocking the loop

               System.out.println("Image Decoder Looping---------------------------
      -------- hit stop");
               while(!Thread.interrupted()){
                   //System.out.println("Image Decoder Looping");
                   final Frame frame = grabber.grab();
                   if (frame != null){
                       final BufferedImage bufferedImage =
       converter.convert(frame);
                       if (bufferedImage != null){

                           Platform.runLater(() ->
       view.setImage(SwingFXUtils.toFXImage(bufferedImage, null)));
                       }else{
                           System.out.println("no buf im");
                       }
                   }else{
                       System.out.println("no fr");
                       Thread.currentThread().interrupt();
                   }

               }



           }catch (Exception e){
               System.out.print(TAG + e);
           }


       }






       }

    Any help is greatly appreciated.

  • Running Windows XP In 2016

    2 janvier 2016, par Multimedia Mike

    I have an interest in getting a 32-bit Windows XP machine up and running. I have a really good yet slightly dated and discarded computer that seemed like a good candidate for dedicating to this task. So the question is : Can Windows XP still be installed from scratch on a computer, activated, and used in 2016 ? I wasn’t quite sure since I have heard stories about how Microsoft has formally ended support for Windows XP as of the first half of 2014 and I wasn’t entirely sure what that meant.

    Spoiler : It’s still possible to install and activate Windows XP as of the writing of this post. It’s also possible to download and install all the updates published up until support ended.

    The Candidate Computer
    This computer was assembled either in late 2008 or early 2009. It was a beast at the time.


    New old Windows XP computer
    Click for a larger image

    It was built around the newly-released NVIDIA GTX 280 video card. The case is a Thermaltake DH-101, which is a home theater PC thing. The motherboard is an Asus P5N32-SLI Premium with a Core 2 Duo X6800 2.93 GHz CPU on board. 2 GB of RAM and a 1.5 TB hard drive are also present.

    The original owner handed it off to me because their family didn’t have much use for it anymore (too many other machines in the house). Plus it was really, obnoxiously loud. The noisy culprit was the stock blue fan that came packaged with the Intel processor (seen in the photo) whining at around 65 dB. I replaced the fan and brought the noise level way down.

    As for connectivity, the motherboard has dual gigabit NICs (of 2 different chipsets for some reason) and onboard wireless 802.11g. I couldn’t make the latter work and this project was taking place a significant distance from my wired network. Instead, I connected a USB 802.11ac dongle and antenna which is advertised to work in both Windows XP and Linux. It works great under Windows XP. Meanwhile, making the adapter work under Linux provided a retro-computing adventure in which I had to modify C code to make the driver work.

    So, score 1 for Windows XP over Linux here.

    The Simple Joy of Retro-computing
    One thing you have to watch out for when you get into retro-computing is fighting the urge to rant about the good old days of computing. Most long-time computer users have a good understanding of the frustration that computers keep getting faster by orders of magnitude and yet using them somehow feels slower and slower over successive software generations.

    This really hits home when you get old software running, especially on high-end hardware (relative to what was standard contemporary hardware). After I got this new Windows XP machine running, as usual, I was left wondering why software was so much faster a few generations ago.

    Of course, as mentioned, it helps when you get to run old software on hardware that would have been unthinkably high end at the software’s release. Apparently, the minimum WinXP specs as set by MS are a 233 MHz Pentium CPU and 64 MB of RAM, with 1.5 GB of hard drive space. This machine has more than 10x the clock speed (and 2 CPUs), 32x the RAM, and 1000x the HD space. Further, I’m pretty sure 100 Mbit ethernet was the standard consumer gear in 2001 while 802.11b wireless was gaining traction. The 802.11ac adapter makes networking quite pleasant.

    Purpose
    Retro-computing really seems to be ramping up in popularity lately. For some reason, I feel compelled to declare at this juncture that I was into it before it was cool.

    Why am I doing this ? I have a huge collection of old DOS/Windows computer games. I also have this nerdy obsession with documenting old video games in the MobyGames database. I used to do a lot of this a few years ago, tracking the effort on my gaming blog. In the intervening years, I have still collected a lot of old, unused, unloved video games, usually either free or very cheap while documenting my collection efforts on that same blog.

    So I want to work my way through some of this backlog, particularly the games that are not yet represented in the MobyGames database, and even more pressing, ones that the internet (viewed through Google at least) does not seem to know about. To that end, I thought this was a good excuse to get Windows XP on this old machine. A 32-bit Windows XP machine is capable of running any software advertised as supporting Windows XP, Windows ME, Windows 98, Windows 95, and even 16-bit Windows 3.x (I have games for all these systems). That covers a significant chunk of PC history. It can probably be made to run DOS games as well, but those are (usually) better run under DosBox. In order to get the right display feel, I even invested in a (used) monitor sporting a 4:3 aspect ratio. If I know these old games, most will be engineered and optimized for that ratio rather than the widescreen resolutions seen nowadays.

    I would also like to get back to that Xbox optical disc experimentation I was working on a few years ago. Another nice feature of this motherboard is that it still provides a 40-pin IDE/PATA adapter which makes the machine useful for continuing that old investigation (and explains why I have that long IDE cable to no where pictured hanging off the board).

    The Messy Details
    I did the entire installation process twice. The first time was a bumbling journey of discovery and copious note-taking. I still have Windows XP installation media that includes service pack 2 (SP2), along with 2 separate licenses that haven’t been activated for a long time. My plan was to install it fresh, then install the relevant drivers. Then I would investigate the Windows update and activation issues and everything should be fine.

    So what’s the deal with Windows Update for XP, and with activations ? Second item first : it IS possible to still activate Windows XP. The servers are still alive and respond quickly. However, as always, you don’t activate until you’re sure everything is working at some baseline. It took awhile to get there.

    As for whether Windows Update still works for XP, that’s a tougher question. Short answer is yes ; longer answer is that it can be difficult to kick off the update process. At least on SP2, the “Windows Update” program launches IE6 and navigates to a special microsoft.com URL which initiates the update process (starting with an ActiveX control). This URL no longer exists.

    From what I can piece together from my notes, this seems to be the route I eventually took :

    1. Install Windows XP fresh
    2. Install drivers for the hardware ; fortunately, Asus still has all the latest drivers necessary for the motherboard and its components but it’s necessary to download these from another network-connected PC since the networking probably won’t be running “out of the box”
    3. Download the .NET 3.5 runtime, which is the last one supported by Windows XP, and install it
    4. Download the latest NVIDIA drivers ; this needs to be done after the previous step because the installer requires the .NET runtime ; run the driver installer and don’t try to understand why it insists on re-downloading .NET 3.5 runtime before installation
    5. While you’re downloading stuff on other computers to be transported to this new machine, be sure to download either Chrome or Firefox per your preference ; if you try to download via IE6, you may find that their download pages aren’t compatible with IE6
    6. Somewhere along the line (I’m guessing as a side effect of the .NET 3.5 installation), the proper, non-IE6-based Windows Update program magically springs to life ; once this happens, there will be 144 updates (in my case anyway) ; installing these will probably require multiple reboots, but SP3 and all known pre-deprecation security fixes will be installed
    7. Expect that, even after installing all of these, a few more updates will appear ; eventually, you’ll be at the end of the update road
    8. Once you’re satisfied everything is working satisfactorily, take the plunge and activate your installation

    Residual Quirks
    Steam runs great on Windows XP, as do numerous games I have purchased through the service. So that opens up a whole bunch more games that I could play on this machine. Steam’s installer highlights a curious legacy problem of Windows XP– it seems there are many languages that it does not support “out of the box” :


    Steam missing languages under Windows XP

    It looks like the Chinese options and a few others that are standard now weren’t standard 15 years ago.

    Also, a little while after booting up, I’ll get a crashing error concerning a process called geoforms.scr. This appears to be NVIDIA-related. However, I don’t notice anything obviously operationally wrong with the system.

    Regarding DirectX support, DirectX 9 is the highest version officially supported by Windows XP. There are allegedly methods to get DirectX 10 running as well, but I don’t care that much. I did care, briefly, when I realized that a bunch of the demos for the NVIDIA GTX 280 required DX10 which left me wondering why it was possible to install them on Windows XP.

    Eventually, by installing enough of these old games, I fully expect to have numerous versions of .NET, DirectX, QT, and Video for Windows installed side by side.

    Out of curiosity, I tried playing a YouTube HD/1080p video. I wanted to see if the video was accelerated through my card. The video played at full speed but I noticed some tearing. Then I inspected the CPU usage and noticed that the CPU was quite loaded. So either the GTX 280 doesn’t have video acceleration, or Windows XP doesn’t provide the right APIs, or Chrome is not able to access the APIs in Windows XP, or perhaps some combination of the foregoing.

    Games are working well, though. I tried one of my favorite casual games and got sucked into that for, like, an entire night because that’s what casual games do. But then, I booted up a copy of WarCraft III that I procured sometime ago. I don’t have any experience with the WarCraft universe (RTS or MMO) but I developed a keen interest in StarCraft II over the past few years and wanted to try WarCraft III. Unfortunately, I couldn’t get WarCraft III to work correctly on several different Windows 7 installations (movies didn’t play, which left me slightly confused as to what I was supposed to do).

    Still works beautifully on the new old Windows XP machine.