[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colonizing education

From: Jean Louis
Subject: Re: Colonizing education
Date: Wed, 9 Dec 2020 10:53:12 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Paul Sutton via libreplanet-discuss <> 
[2020-12-09 10:30]:
> On 09/12/2020 03:53, msunet wrote:
> > Do you have that iso available somewhere that you can share? I'd be
> > curious to check it out.
> > 
> Hi
> Happy to share just trying to figure out the best way to share it  it is
> about 415mb in size, so I can upload to which
> has a max upload size of 2gb and send the link over.

I recommend that you first resize the video, as even with small video
size we can already see something. Then if you do wish to upload video
then I recommend using Mediagoblin instances or OpenTube.

MediaGoblin instances

Open Tube - video publishing on free software

Here is a handy Emacs function that can help you convert multiple
videos one by one in background:

(defun video2webm-dired ()
  "Converts any video to webm"
  (let* ((bitrate (read-number "Bitrate: " 300))
         (videos (dired-get-marked-files))
         (videos (mapcar 'video-mime-type-p videos))
         (videos (seq-remove 'null videos))
         (async-shell-command-buffer 'new-buffer)
         (command (format "ffmpeg -y -i `?` -c:v libvpx-vp9 -b:v %sk -pass 1 
-passlogfile `?` -speed 4 -c:a libopus -f webm /dev/null -async 1 -vsync 
passthrough && ffmpeg -y -i `?` -c:v libvpx-vp9 -b:v %sk -pass 2 -passlogfile 
`?` -speed 1 -c:a libopus \`?`.webm -async 1 -vsync passthrough && rm 
`?`-0.log;" bitrate bitrate)))
    (dired-do-async-shell-command command nil videos)))

(defun video-mime-type-p (file)
  "Determines mime type of video"
  (let ((mime-type (rcd-mime-type file)))
    (if (string-match "video" mime-type) file nil)))

(defun rcd-mime-type (file)
  "Returns mime type of the file"
  (let ((file-command (executable-find "file"))
        (mimetype (executable-find "mimetype")))
    ;; TODO:
    ;; There is much work to do here to work on various systems for
    ;; example there may not be same output on BSD and GNU systems.
    ;; Additional problem is file quoting.
    ;; file and mimetype may give different results
    (if file-command
        (string-trim (shell-command-to-string (format "%s -b --mime-type '%s'" 
file-command file)))
      (if mimetype
          (string-trim (shell-command-to-string (format "%s -b '%s'" mimetype 

You would open up directory, mark the files you wish to convert to
WEBM format and it will start converting. Once you do not see any more
.log files the conversion have been finished. You can try with bitrate
of 500 and it will be I guess good enough. Size will be so much less.

0. Put those functions in a file and load file into Emacs with L in
   Dired or just evaluate functions.
1. C-x C-f with Emacs

2. Find directory where is video located

3. Move cursor to directory or mark files to be converted with m

4. M-x video2webm-dired and choose 500 bitrate

Remember that people watch videos about 50% on their mobile phones and
your original video size does not really matter. When video is watched
on computer screen it is still pretty much viewable with some
degradation even if it is smaller in size.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]