Recherche avancée

Médias (91)

Autres articles (84)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (7973)

  • Rtsp streaming with 3gp (Video encoded with ffmpeg) breaking every 8 seconds

    8 août 2012, par user1581063

    I have set up Darwin streaming server(6.0) to stream rtsp on android / other mobile devices in AWS using Ec2.
    I have opened all UDP and necessary tcp ports required for playing RTSP

    I am using ffmpeg to encode videos. Below is the command used for encoding a H264 video to H263.

    ffmpeg -i test1.mp4 -f 3gp -s 176x144 -vcodec h263 -b:v 339k -r 14.895 -acodec libamr_nb -ac 1 -ar 8000 -ab 12.2k -y test.3gp

    The encoded videos stops every multiples of 8 seconds, bufffers and plays again in all Android phone(< 4.0).

    I tried all the options still the behavior is same. The same RTSP link plays well with Daroon player( downloaded from google play) on Android or VLC player in windows.

    I am not able to figure whether its a encoding issue or server side issue.

    Link for the mobile : m.try.vasop.com/rtsp.php

    Link for the RTSP : rtsp ://175.41.130.157/1343973357914_h263.3gp

  • Announcing the world’s fastest VP8 decoder : ffvp8

    24 juillet 2010, par Dark Shikari — ffmpeg, google, speed, VP8

    Back when I originally reviewed VP8, I noted that the official decoder, libvpx, was rather slow. While there was no particular reason that it should be much faster than a good H.264 decoder, it shouldn’t have been that much slower either ! So, I set out with Ronald Bultje and David Conrad to make a better one in FFmpeg. This one would be community-developed and free from the beginning, rather than the proprietary code-dump that was libvpx. A few weeks ago the decoder was complete enough to be bit-exact with libvpx, making it the first independent free implementation of a VP8 decoder. Now, with the first round of optimizations complete, it should be ready for primetime. I’ll go into some detail about the development process, but first, let’s get to the real meat of this post : the benchmarks.

    We tested on two 1080p clips : Parkjoy, a live-action 1080p clip, and the Sintel trailer, a CGI 1080p clip. Testing was done using “time ffmpeg -vcodec libvpx or vp8 -i input -vsync 0 -an -f null -”. We all used the latest SVN FFmpeg at the time of this posting ; the last revision optimizing the VP8 decoder was r24471.

    Parkjoy graphSintel graph

    As these benchmarks show, ffvp8 is clearly much faster than libvpx, particularly on 64-bit. It’s even faster by a large margin on Atom, despite the fact that we haven’t even begun optimizing for it. In many cases, ffvp8′s extra speed can make the difference between a video that plays and one that doesn’t, especially in modern browsers with software compositing engines taking up a lot of CPU time. Want to get faster playback of VP8 videos ? The next versions of FFmpeg-based players, like VLC, will include ffvp8. Want to get faster playback of WebM in your browser ? Lobby your browser developers to use ffvp8 instead of libvpx. I expect Chrome to switch first, as they already use libavcodec for most of their playback system.

    Keep in mind ffvp8 is not “done” — we will continue to improve it and make it faster. We still have a number of optimizations in the pipeline that aren’t committed yet.

    Developing ffvp8

    The initial challenge, primarily pioneered by David and Ronald, was constructing the core decoder and making it bit-exact to libvpx. This was rather challenging, especially given the lack of a real spec. Many parts of the spec were outright misleading and contradicted libvpx itself. It didn’t help that the suite of official conformance tests didn’t even cover all the features used by the official encoder ! We’ve already started adding our own conformance tests to deal with this. But I’ve complained enough in past posts about the lack of a spec ; let’s get onto the gritty details.

    The next step was adding SIMD assembly for all of the important DSP functions. VP8′s motion compensation and deblocking filter are by far the most CPU-intensive parts, much the same as in H.264. Unlike H.264, the deblocking filter relies on a lot of internal saturation steps, which are free in SIMD but costly in a normal C implementation, making the plain C code even slower. Of course, none of this is a particularly large problem ; any sane video decoder has all this stuff in SIMD.

    I tutored Ronald in x86 SIMD and wrote most of the motion compensation, intra prediction, and some inverse transforms. Ronald wrote the rest of the inverse transforms and a bit of the motion compensation. He also did the most difficult part : the deblocking filter. Deblocking filters are always a bit difficult because every one is different. Motion compensation, by comparison, is usually very similar regardless of video format ; a 6-tap filter is a 6-tap filter, and most of the variation going on is just the choice of numbers to multiply by.

    The biggest challenge in an SIMD deblocking filter is to avoid unpacking, that is, going from 8-bit to 16-bit. Many operations in deblocking filters would naively appear to require more than 8-bit precision. A simple example in the case of x86 is abs(a-b), where a and b are 8-bit unsigned integers. The result of “a-b” requires a 9-bit signed integer (it can be anywhere from -255 to 255), so it can’t fit in 8-bit. But this is quite possible to do without unpacking : (satsub(a,b) | satsub(b,a)), where “satsub” performs a saturating subtract on the two values. If the value is positive, it yields the result ; if the value is negative, it yields zero. Oring the two together yields the desired result. This requires 4 ops on x86 ; unpacking would probably require at least 10, including the unpack and pack steps.

    After the SIMD came optimizing the C code, which still took a significant portion of the total runtime. One of my biggest optimizations was adding aggressive “smart” prefetching to reduce cache misses. ffvp8 prefetches the reference frames (PREVIOUS, GOLDEN, and ALTREF)… but only the ones which have been used reasonably often this frame. This lets us prefetch everything we need without prefetching things that we probably won’t use. libvpx very often encodes frames that almost never (but not quite never) use GOLDEN or ALTREF, so this optimization greatly reduces time spent prefetching in a lot of real videos. There are of course countless other optimizations we made that are too long to list here as well, such as David’s entropy decoder optimizations. I’d also like to thank Eli Friedman for his invaluable help in benchmarking a lot of these changes.

    What next ? Altivec (PPC) assembly is almost nonexistent, with the only functions being David’s motion compensation code. NEON (ARM) is completely nonexistent : we’ll need that to be fast on mobile devices as well. Of course, all this will come in due time — and as always — patches welcome !

    Appendix : the raw numbers

    Here’s the raw numbers (in fps) for the graphs at the start of this post, with standard error values :

    Core i7 620QM (1.6Ghz), Windows 7, 32-bit :
    Parkjoy ffvp8 : 44.58 0.44
    Parkjoy libvpx : 33.06 0.23
    Sintel ffvp8 : 74.26 1.18
    Sintel libvpx : 56.11 0.96

    Core i5 520M (2.4Ghz), Linux, 64-bit :
    Parkjoy ffvp8 : 68.29 0.06
    Parkjoy libvpx : 41.06 0.04
    Sintel ffvp8 : 112.38 0.37
    Sintel libvpx : 69.64 0.09

    Core 2 T9300 (2.5Ghz), Mac OS X 10.6.4, 64-bit :
    Parkjoy ffvp8 : 54.09 0.02
    Parkjoy libvpx : 33.68 0.01
    Sintel ffvp8 : 87.54 0.03
    Sintel libvpx : 52.74 0.04

    Core Duo (2Ghz), Mac OS X 10.6.4, 32-bit :
    Parkjoy ffvp8 : 21.31 0.02
    Parkjoy libvpx : 17.96 0.00
    Sintel ffvp8 : 41.24 0.01
    Sintel libvpx : 29.65 0.02

    Atom N270 (1.6Ghz), Linux, 32-bit :
    Parkjoy ffvp8 : 15.29 0.01
    Parkjoy libvpx : 12.46 0.01
    Sintel ffvp8 : 26.87 0.05
    Sintel libvpx : 20.41 0.02

  • Bash script to automate FFmpeg operations fails when calling the command, but copy-pasting the generated command into the terminal works [duplicate]

    28 février, par GaboScharff99

    I wrote a bash script which automates a number of conversion operations on video files using FFmpeg. Oddly enough, the FFmpeg call itself now fails when running the script, with a very confusing error message, I might add, but when I copy the command generated by the script into the terminal and run it, it works flawlessly. I'm sorry to insert such a long code block here, but considering how strange this error is, it might be anywhere in the script, so here it is :

    &#xA;

    #!/bin/bash&#xA;&#xA;audioTrack=1&#xA;subSource=1&#xA;subTrack=0&#xA;transcodeVideo=1&#xA;transcodeAudio=1&#xA;volumeMultiplier=1&#xA;degradeToStereo=0&#xA;subLanguage="Japanese"&#xA;&#xA;while getopts "t:ns:vam:dl:h" opt; do&#xA;    case "$opt" in&#xA;        t) audioTrack=${OPTARG};;&#xA;        n) subSource=0;;&#xA;        s) subTrack=${OPTARG};;&#xA;        v) transcodeVideo=0;;&#xA;        a) transcodeAudio=0;;&#xA;        m) volumeMultiplier=${OPTARG};;&#xA;        d) degradeToStereo=1;;&#xA;        l) subLanguage=${OPTARG};;&#xA;        h)&#xA;            echo "Options:"&#xA;            echo "-t [integer]: Audio track number. Default: 1."&#xA;            echo "-n: If included, subtitles will be taken from internal source."&#xA;            echo "-s [integer]: Subtitles track number. Default: 0."&#xA;            echo "-v: If included, video source will be copied without transcoding."&#xA;            echo "-a: If included, audio source will be copied without transcoding."&#xA;            echo "-m [number]: Volume multiplier. If 1, volume is unaffected. Default: 1"&#xA;            echo "-d: If included, audio will be degraded to stereo."&#xA;            echo "-l [language]: Subtitles language. Only used for external subtitles source. Default: Japanese."&#xA;            exit 0&#xA;        ;;&#xA;    esac&#xA;done&#xA;&#xA;echo "Audio track: $audioTrack."&#xA;echo "Subtitles track: $subTrack."&#xA;params="-map 0:0 -map 0:$audioTrack -map $subSource:$subTrack -c:v"&#xA;&#xA;if [[ $transcodeVideo -eq 1 ]]; then&#xA;    echo "Video will be transcoded."&#xA;    params="$params hevc"&#xA;elif [[ $transcodeVideo -eq 0 ]]; then&#xA;    echo "Video will be copied without transcoding."&#xA;    params="$params copy"&#xA;fi&#xA;&#xA;params="$params -c:a"&#xA;&#xA;if [[ $transcodeAudio -eq 1 ]]; then&#xA;    echo "Audio will be transcoded."&#xA;    params="$params libopus"&#xA;elif [[ $transcodeAudio -eq 0 ]]; then&#xA;    echo "Audio will be copied without transcoding."&#xA;    params="$params copy"&#xA;fi&#xA;&#xA;if [[ $volumeMultiplier -ne 1 ]]; then&#xA;    echo "Volume will be multiplied by a factor of $volumeMultiplier."&#xA;    params="$params -filter:a &#x27;volume=$volumeMultiplier&#x27;"&#xA;else&#xA;    echo "Volume will be unaffected."&#xA;fi&#xA;&#xA;if [[ $degradeToStereo -eq 1 ]]; then&#xA;    echo "Audio will be degraded to stereo."&#xA;    params="$params -ac 2"&#xA;elif [[ $degradeToStereo -eq 0 ]]; then&#xA;    echo "Audio will not be degraded to stereo."&#xA;fi&#xA;&#xA;params="$params -c:s copy"&#xA;&#xA;if [[ $subSource -eq 1 ]]; then&#xA;    echo "Subtitles source is external."&#xA;    echo "Subtitles language is $subLanguage."&#xA;    params="$params -metadata:s:s:0 title=&#x27;&#x27; -metadata:s:s:0 language=&#x27;$subLanguage&#x27;"&#xA;else&#xA;    echo "Subtitles source is internal."&#xA;fi&#xA;&#xA;if [[ -f titles.txt ]]; then&#xA;    echo "A titles.txt file was found. Titles will be changed according to it."&#xA;    echo "Please check titles.txt to make sure the titles are correct."&#xA;    changeTitles=1&#xA;    counter=0&#xA;else&#xA;    echo "A titles.txt file was not found. Titles will not be changed."&#xA;    changeTitles=0&#xA;fi&#xA;&#xA;read -p "Are these options correct? (y/n) " choice&#xA;&#xA;case "$choice" in&#xA;    y|Y)&#xA;        echo "Initiating conversion sequence. This may take a while..."&#xA;&#xA;        mkdir output&#xA;        currentParams=""&#xA;&#xA;        shopt -s nullglob&#xA;        for i in *.mp4 *.mkv; do&#xA;            currentParams=$params&#xA;            fileNameNoExtension=$(echo $i | rev | cut -f 2- -d &#x27;.&#x27; | rev)&#xA;&#xA;            if [[ $subSource -eq 1 ]]; then&#xA;                currentParams="-f srt -i $fileNameNoExtension.srt $currentParams"&#xA;            fi&#xA;&#xA;            if [[ $changeTitles -eq 1 ]]; then&#xA;                ((counter&#x2B;&#x2B;))&#xA;                currentParams="$currentParams -metadata title=&#x27;$(awk "NR==$counter" titles.txt)&#x27;"&#xA;            fi&#xA;&#xA;            ffmpeg -i "$i" $currentParams "output/$fileNameNoExtension.mkv"&#xA;        done&#xA;&#xA;        echo "Conversion finished!"&#xA;    ;;&#xA;    n|N) echo "Operation canceled. Exiting.";;&#xA;    *) echo "Invalid input. Try again.";;&#xA;esac&#xA;

    &#xA;

    The directory I'm running this in contains six video files :

    &#xA;

      &#xA;
    1. E1 - The Pirates of Orion.mkv
    2. &#xA;

    3. E2 - Bem.mkv
    4. &#xA;

    5. E3 - The Practical Joker.mkv
    6. &#xA;

    7. E4 - Albatross.mkv
    8. &#xA;

    9. E5 - How Sharper Than a Serpent&#x27;s Tooth.mkv
    10. &#xA;

    11. E6 - The Counter-Clock Incident.mkv
    12. &#xA;

    &#xA;

    Here's the titles.txt file, for completion's sake :

    &#xA;

    Star Trek: The Animated Series - Season 2, Episode 1 - The Pirates of Orion&#xA;Star Trek: The Animated Series - Season 2, Episode 2 - Bem&#xA;Star Trek: The Animated Series - Season 2, Episode 3 - The Practical Joker&#xA;Star Trek: The Animated Series - Season 2, Episode 4 - Albatross&#xA;Star Trek: The Animated Series - Season 2, Episode 5 - How Sharper Than a Serpent&#x27;s Tooth&#xA;Star Trek: The Animated Series - Season 2, Episode 6 - The Counter-Clock Incident&#xA;

    &#xA;

    And finally, here's the error message given by FFmpeg on the terminal for every video file when running the command :

    &#xA;

    Unable to find a suitable output format for &#x27;Trek:&#x27;&#xA;Trek:: Invalid argument&#xA;

    &#xA;

    Maybe there are better ways to handle all of this, but first and foremost, I would like to figure out why the command fails with such a confusing error message. The only place where the string 'Trek :' is found is in the title taken from titles.txt, but I don't understand why that's seemingly being passed to the name of the output file instead of the title, and apparently only when running the script.

    &#xA;

    Thanks a lot for your answers ! I know this is quite a bit of text, so I really appreciate you taking your time to read through this.

    &#xA;