Recherche avancée

Médias (91)

Autres articles (46)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (5161)

  • Neutral net or neutered

    4 juin 2013, par Mans — Law and liberty

    In recent weeks, a number of high-profile events, in the UK and elsewhere, have been quickly seized upon to promote a variety of schemes for monitoring or filtering Internet access. These proposals, despite their good intentions of protecting children or fighting terrorism, pose a serious threat to fundamental liberties. Although at a glance the ideas may seem like a reasonable price to pay for the prevention of some truly hideous crimes, there is more than first meets the eye. Internet regulation in any form whatsoever is the thin end of a wedge at whose other end we find severely restricted freedom of expression of the kind usually associated with oppressive dictatorships. Where the Internet was once a novelty, it now forms an integrated part of modern society ; regulating the Internet means regulating our lives.

    Terrorism

    Following the brutal murder of British soldier Lee Rigby in Woolwich, attempts were made in the UK to revive the controversial Communications Data Bill, also dubbed the snooper’s charter. The bill would give police and security services unfettered access to details (excluding content) of all digital communication in the UK without needing so much as a warrant.

    The powers afforded by the snooper’s charter would, the argument goes, enable police to prevent crimes such as the one witnessed in Woolwich. True or not, the proposal would, if implemented, also bring about infrastructure for snooping on anyone at any time for any purpose. Once available, the temptation may become strong to extend, little by little, the legal use of these abilities to cover ever more everyday activities, all in the name of crime prevention, of course.

    In the emotional aftermath of a gruesome act, anything with the promise of preventing it happening again may seem like a good idea. At times like these it is important, more than ever, to remain rational and carefully consider all the potential consequences of legislation, not only the intended ones.

    Hate speech

    Hand in hand with terrorism goes hate speech, preachings designed to inspire violence against people of some singled-out nation, race, or other group. Naturally, hate speech is often to be found on the Internet, where it can reach large audiences while the author remains relatively protected. Naturally, we would prefer for it not to exist.

    To fulfil the utopian desire of a clean Internet, some advocate mandatory filtering by Internet service providers and search engines to remove this unwanted content. Exactly how such censoring might be implemented is however rarely dwelt upon, much less the consequences inadvertent blocking of innocent material might have.

    Pornography

    Another common target of calls for filtering is pornography. While few object to the blocking of child pornography, at least in principle, the debate runs hotter when it comes to the legal variety. Pornography, it is claimed, promotes violence towards women and is immoral or generally offensive. As such it ought to be blocked in the name of the greater good.

    The conviction last week of paedophile Mark Bridger for the abduction and murder of five-year-old April Jones renewed the debate about filtering of pornography in the UK ; his laptop was found to contain child pornography. John Carr of the UK government’s Council on Child Internet Safety went so far as suggesting a default blocking of all pornography, access being granted to an Internet user only once he or she had registered with some unspecified entity. Registering people wishing only to access perfectly legal material is not something we do in a democracy.

    The reality is that Google and other major search engines already remove illegal images from search results and report them to the appropriate authorities. In the UK, the Internet Watch Foundation, a non-government organisation, maintains a blacklist of what it deems ‘potentially criminal’ content, and many Internet service providers block access based on this list.

    While well-intentioned, the IWF and its blacklist should raise some concerns. Firstly, a vigilante organisation operating in secret and with no government oversight acting as the nation’s morality police has serious implications for freedom of speech. Secondly, the blocks imposed are sometimes more far-reaching than intended. In one incident, an attempt to block the cover image of the Scorpions album Virgin Killer hosted by Wikipedia (in itself a dubious decision) rendered the entire related article inaccessible as well as interfered with editing.

    Net neutrality

    Content filtering, or more precisely the lack thereof, is central to the concept of net neutrality. Usually discussed in the context of Internet service providers, this is the principle that the user should have equal, unfiltered access to all content. As a consequence, ISPs should not be held responsible for the content they deliver. Compare this to how the postal system works.

    The current debate shows that the principle of net neutrality is important not only at the ISP level, but should also include providers of essential services on the Internet. This means search engines should not be responsible for or be required to filter results, email hosts should not be required to scan users’ messages, and so on. No mandatory censoring can be effective without infringing the essential liberties of freedom of speech and press.

    Social networks operate in a less well-defined space. They are clearly not part of the essential Internet infrastructure, and they require that users sign up and agree to their terms and conditions. Because of this, they can include restrictions that would be unacceptable for the Internet as a whole. At the same time, social networks are growing in importance as means of communication between people, and as such they have a moral obligation to act fairly and apply their rules in a transparent manner.

    Facebook was recently under fire, accused of not taking sufficient measures to curb ‘hate speech,’ particularly against women. Eventually they pledged to review their policies and methods, and reducing the proliferation of such content will surely make the web a better place. Nevertheless, one must ask how Facebook (or another social network) might react to similar pressure from, say, a religious group demanding removal of ‘blasphemous’ content. What about demands from a foreign government ? Only yesterday, the Turkish prime minister Erdogan branded Twitter ‘a plague’ in a TV interview.

    Rather than impose upon Internet companies the burden of law enforcement, we should provide them the latitude to set their own policies as well as the legal confidence to stand firm in the face of unreasonable demands. The usual market forces will promote those acting responsibly.

    Further reading

  • Is there a way to batch split a file by chapter with ffmpeg and then reassemble with mkvmerge in windows ?

    8 novembre 2020, par Sipherdrakon

    So I made a batch script originally with the ability to relatively precision trim a video into chapters without having to run by keyframes, but the code looks horrible and I can't get it to loop through all mp4 files nor get mkvmerge to append the files after splitting them. Code is below but be gentle it is my first try.

    


    @echo off
setlocal enableDelayedExpansion

REM CODE BELOW CREATES JSON FILES FOR ALL MP4 FILES WITHIN THE SAME DIRECTORY
ffprobe -v quiet -print_format json -show_chapters -loglevel error "01x01.mp4" > "01x01.json"

REM CODE BELOW SETS VARIABLES FROM EACH SPECIFIC JSON
FOR /F "delims=" %%i in ('jq .chapters[2].start ^< 01x01.json') DO SET /A start1=%%i
FOR /F "delims=" %%j in ('jq .chapters[2].end ^< 01x01.json') DO SET /A end1=%%j

FOR /F "delims=" %%k in ('jq .chapters[4].start ^< 01x01.json') DO SET /A start2=%%k
FOR /F "delims=" %%l in ('jq .chapters[4].end ^< 01x01.json') DO SET /A end2=%%l

FOR /F "delims=" %%m in ('jq .chapters[6].start ^< 01x01.json') DO SET /A start3=%%m
FOR /F "delims=" %%n in ('jq .chapters[6].end ^< 01x01.json') DO SET /A end3=%%n

FOR /F "delims=" %%o in ('jq .chapters[8].start ^< 01x01.json') DO SET /A start4=%%o
FOR /F "delims=" %%p in ('jq .chapters[8].end ^< 01x01.json') DO SET /A end4=%%p

REM SETS THE DURATION OF EACH FILE TO USE PRECISION TIMING FOR START AND STOP TIMES
CALL vbs (%end1%-%start1%)/1000
SET duration1=%val%
CALL vbs (%end2%-%start2%)/1000
SET duration2=%val%
CALL vbs (%end3%-%start3%)/1000
SET duration3=%val%
CALL vbs (%end4%-%start4%)/1000
SET duration4=%val%

REM SETS THE START TIME IN SECONDS VS MILLISECONDS
CALL vbs (%start1%)/1000
SET start1=%val%
CALL vbs (%start2%)/1000
SET start2=%val%
CALL vbs (%start3%)/1000
SET start3=%val%
CALL vbs (%start4%)/1000
SET start4=%val%

REM TRIM AND SPLIT ORIGINAL FILE INTO SEPERATE SECTIONS BASED ON CHAPTER MARKERS
ffmpeg -ss %START1% -i 01x01.mp4 -ss 0 -c copy -to %DURATION1% -avoid_negative_ts make_zero 01x01-1.mp4
ffmpeg -ss %START2% -i 01x01.mp4 -ss 0 -c copy -to %DURATION2% -avoid_negative_ts make_zero 01x01-2.mp4
ffmpeg -ss %START3% -i 01x01.mp4 -ss 0 -c copy -to %DURATION3% -avoid_negative_ts make_zero 01x01-3.mp4
ffmpeg -ss %START4% -i 01x01.mp4 -ss 0 -c copy -to %DURATION4% -avoid_negative_ts make_zero 01x01-4.mp4

REM DELETES UNNEEDED JSON AFTER USE
del /s *.json

REM APPEND ALL MP4 FILES INTO COHESIVE MKV
for /d /r %%D in (*) do (
    pushd %%D
    set files=
    for %%F in (*.mp4) do set files=!files! + ^( "%%F" ^)
    if not "!files!"=="" %mkvmerge% -o "01x01-FINAL.mkv" !files:~2!
    popd
)

REM DELETE UNNEEDED MP4 ORIGINALS AND SPLIT FILES
del /s *.mp4


    


    I know it is super long and every time I try to use a variable or a loop to run through all files it can't read the json file. I've been at this all day and I can use the script as is but I have to make a file for each iteration.

    


    I was also hoping to be able to have it only pull chapters labeled as "video" but I haven't quite figured that one out yet.

    


    I'll add the vbs batch file for the arithmetic section as well as the sample json if it will help.

    


    @echo off
>"%temp%\VBS.vbs" echo Set fso = CreateObject("Scripting.FileSystemObject") : Wscript.echo (%*)
for /f "delims=" %%a in ('cscript /nologo "%temp%\VBS.vbs"') do set "val=%%a"
del "%temp%\VBS.vbs"


    


    {
    "chapters": [
        {
            "id": 0,
            "time_base": "1/1000",
            "start": 0,
            "start_time": "0.000000",
            "end": 5590,
            "end_time": "5.590000",
            "tags": {
                "title": "Video"
            }
        },
        {
            "id": 1,
            "time_base": "1/1000",
            "start": 5590,
            "start_time": "5.590000",
            "end": 13994,
            "end_time": "13.994000",
            "tags": {
                "title": "Advertisement"
            }
        },
        {
            "id": 2,
            "time_base": "1/1000",
            "start": 13994,
            "start_time": "13.994000",
            "end": 163964,
            "end_time": "163.964000",
            "tags": {
                "title": "Video"
            }
        },
        {
            "id": 3,
            "time_base": "1/1000",
            "start": 163964,
            "start_time": "163.964000",
            "end": 195940,
            "end_time": "195.940000",
            "tags": {
                "title": "Advertisement"
            }
        },
        {
            "id": 4,
            "time_base": "1/1000",
            "start": 195940,
            "start_time": "195.940000",
            "end": 547849,
            "end_time": "547.849000",
            "tags": {
                "title": "Video"
            }
        },
        {
            "id": 5,
            "time_base": "1/1000",
            "start": 547849,
            "start_time": "547.849000",
            "end": 595850,
            "end_time": "595.850000",
            "tags": {
                "title": "Advertisement"
            }
        },
        {
            "id": 6,
            "time_base": "1/1000",
            "start": 595850,
            "start_time": "595.850000",
            "end": 1413588,
            "end_time": "1413.588000",
            "tags": {
                "title": "Video"
            }
        },
        {
            "id": 7,
            "time_base": "1/1000",
            "start": 1413588,
            "start_time": "1413.588000",
            "end": 1477569,
            "end_time": "1477.569000",
            "tags": {
                "title": "Advertisement"
            }
        },
        {
            "id": 8,
            "time_base": "1/1000",
            "start": 1477569,
            "start_time": "1477.569000",
            "end": 1529696,
            "end_time": "1529.696000",
            "tags": {
                "title": "Video"
            }
        }
    ]
}


    


    I also tried using the start_time so I didn't have to do extra calculations but jq didn't like that either.

    


    mkvmerge doesn't even try to run when I have it in here and I still need to cut 7 seconds off the end and 12 seconds off the front of it once it is all one file again.

    


    Any help would be appreciated, I know it's a lot but I seem to have hit a roadblock or just sleep deprived at this point.

    


    UPDATE

    


    This works amazing I just need to figure out how to use files with spaces and I'm all set. I guess I could run a batch before hand replacing all spaces with underscores. That would probably work but I would like to not change filenames if I can help it.

    


    @echo off

for %%i in (*.mp4) do (
FOR /F "delims=" %%A IN ('ffprobe -v quiet -print_format json -show_chapters -loglevel error "%%i" ^| xidel - -se "$json/(chapters)()[id!=0 and tags/title='Video']/concat('ffmpeg -ss ',start div 1000,' -i %%i -to ',((end - start) div 1000),' -c copy -avoid_negative_ts make_zero %%~ni-',position(),'.mp4')"') DO %%A
FOR /F "delims=" %%A IN ('xidel -s --xquery "concat('mkvmerge -o "%%~ni-FINAL.mkv" "',join(file:list(.,false(),'%%~ni-*.mp4'),'" + "'),'"')"') DO %%A
)


    


  • Android ffmpeg runtime error

    6 septembre 2013, par Syntaxicated

    I'm new to Stackoverflow and although I've tried to find an answer to my question, I can't see anything that fits my circumstances. Apologies if it is a duplicate, however.

    I'm trying my hand at some Android development and have hit a problem with ffmpeg.

    I have built a basic app which should take a file on the sdcard, rotate it and save it as a new file to the same folder.

    I'm using ffmpeg to do the transposing and cropping but so far I cannot get ffmpeg to execute.

    I've used the 'guardianproject' android-ffmpeg library on github (here) to execute the ffmpeg commands but it doesn't actually do anything.

    Here's my code :

    package com.tw.videwell;

    import java.io.File;

    import org.ffmpeg.android.FfmpegController;
    import org.ffmpeg.android.MediaDesc;
    import org.ffmpeg.android.ShellUtils.ShellCallback;
    import org.ffmpeg.android.filters.TransposeVideoFilter;

    import android.annotation.SuppressLint;
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.Menu;
    import android.view.View;
    import android.widget.Button;

    public class MainActivity extends Activity {

    Button b;
    FfmpegController ff;
    MediaDesc in;
    MediaDesc out;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
       run();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
       // Inflate the menu; this adds items to the action bar if it is present.
       getMenuInflater().inflate(R.menu.main, menu);
       return true;
    }

    private void run(){
       b = (Button) findViewById(R.id.button1);    

       //Set click listener for shoot button
       b.setOnClickListener(new View.OnClickListener() {
           public void onClick(View v) {
               process();
           }    
       });


    }

    @SuppressLint("SdCardPath")
    private void process(){
       try {
           in = new MediaDesc();
           out = new MediaDesc();
           in.path="/sdcard/Video/test.mp4";
           TransposeVideoFilter tvf= new TransposeVideoFilter(TransposeVideoFilter.NINETY_CLOCKWISE);
           out.path="/sdcard/Video/out.mp4";
           out.videoFilter=tvf.toString();
           File fileTemp = null;
           ff = new FfmpegController(getApplicationContext(), fileTemp);
           //ff.processVideo(in, out, true, scb);

       } catch (Exception e) {
           // TODO Auto-generated catch block
           e.printStackTrace();
       }
    }

    private ShellCallback scb = new ShellCallback(){

       @Override
       public void shellOut(String shellLine) {
           // TODO Auto-generated method stub
           System.out.println("Out");
       }

       @Override
       public void processComplete(int exitValue) {
           // TODO Auto-generated method stub
           System.out.println("Complete");
       }

    };
    }

    When I run the app on my device the log reports the following :

    W/System.err(32114): android.content.res.Resources$NotFoundException: File res/raw/ffmpeg from drawable resource ID #0x7f040000
    W/System.err(32114):    at android.content.res.Resources.openRawResourceFd(Resources.java:982)
    W/System.err(32114):    at org.ffmpeg.android.FfmpegController.checkBinary(FfmpegController.java:49)
    W/System.err(32114):    at org.ffmpeg.android.FfmpegController.<init>(FfmpegController.java:41)
    W/System.err(32114):    at com.tw.videwell.MainActivity.process(MainActivity.java:61)
    W/System.err(32114):    at com.tw.videwell.MainActivity.access$0(MainActivity.java:52)
    W/System.err(32114):    at com.tw.videwell.MainActivity$2.onClick(MainActivity.java:44)
    W/System.err(32114):    at android.view.View.performClick(View.java:4211)
    W/System.err(32114):    at android.view.View$PerformClick.run(View.java:17362)
    W/System.err(32114):    at android.os.Handler.handleCallback(Handler.java:725)
    W/System.err(32114):    at android.os.Handler.dispatchMessage(Handler.java:92)
    W/System.err(32114):    at android.os.Looper.loop(Looper.java:137)
    W/System.err(32114):    at android.app.ActivityThread.main(ActivityThread.java:5227)
    W/System.err(32114):    at java.lang.reflect.Method.invokeNative(Native Method)
    W/System.err(32114):    at java.lang.reflect.Method.invoke(Method.java:511)
    W/System.err(32114):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
    W/System.err(32114):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
    W/System.err(32114):    at dalvik.system.NativeStart.main(Native Method)
    W/System.err(32114): Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
    W/System.err(32114):    at android.content.res.AssetManager.openNonAssetFdNative(Native Method)
    W/System.err(32114):    at android.content.res.AssetManager.openNonAssetFd(AssetManager.java:450)
    W/System.err(32114):    at android.content.res.Resources.openRawResourceFd(Resources.java:979)
    W/System.err(32114):    ... 16 more
    </init>

    From what I can deduce, the ffmpeg executable can't be found. It is stored in the /res/raw folder as I believe it should be and appears in the app folder on the device when I run it, but still can't find it.

    I'm developing on a Mac in Eclipse 4.2.1 with the latest Android SDK and am running the app on a Sony Xperia T with Android 4.2.2.

    I compiled the ffmpeg library using the installation method described on github, Android NDK 9 and the Mac XCode command line developer tools (make etc).

    What am I doing wrong ? Do I need to store the FFmpeg library file somewhere else ? Is there a massive error in my, albeit basic, coding ?