Magic Hat – WIN stays in

The MHP (Magic Hat Portfolio) on Stockopedia (http://www.stockopedia.com/fantasy-funds/magic-hat-463/) is an experiment by me to see if a human can improve on a mechanical Greeblatt Magic Formula screen. I am trying to weed out “mistakes” that I feel the screening commits: unseasoned companies, scams, foreign companies (particularly Chinese), fishy accounting, and statistical quirks. Apart from that, I am agnostic as to the sector the company operates in, although I will try to avoid heavy concentration in any one sector. I will mostly apply “Strategic Ignorance”, by which I mean that I wont try to be clever in my stockpicking. My picking will be mostly mechanical. A summary of most of my Magic Hat articles can be found on the web page http://www.markcarter.me.uk/money/greenblatt.htm This will allow you to see, at a glance, what shares have been bought and sold in the past, as well as what shares have been rejected from consideration and why.

WIN (Wincanton) was due to be ejected from the portfolio. However, since it passes the Greenblatt Screen, it stays in.

Another easy month.

MHP is beating the FTSE350 on a 1-, 2-, 3- and 5- year basis, which is pleasing to see. The out-performance is not meteoric, but it’s nice to see that although the FTSE350 is down 2.7% over 3 years, the portfolio is up 20.1% over that period.

Posted in Uncategorized | Leave a comment

#cinelerra-cv: navigating the codec maze

Bottom line up front

Use DV files for importing and exporting to/from Cinelerra, transcoding with ffmpeg where necessary. MP3 files are good for sound-only tracks. Other formats are often problematical, and you’ll save yourself a lot of grief if you just stick with the tried and true.

The melange

Cinelerra has its own internal version of ffmpeg, meaning that both the standalone version of ffmpeg and vlc support a much wider range of containers and codecs.

Not all containers support all codecs. MP4 does not support the pcm_s16le audio codec, for example. pcm_s16le works perfectly in Cinelerra, and is used in DV files. But the fact that MP4 doesn’t support the codec means that you probably don’t want to work with MP4.

Cinelerra support of audio codecs seems patchy, making many containers/codecs unusable. What I have found is that sometimes the video will work fine, but I have problems with the sound, like it cutting out if I move the slider over Cinelerra’s viewer window.

The upshot is: just use DV, and Cinelerra should work smoothly.

DV is a space hog

An hour of DV will take up about 13GB – which is obviously a huge amount. Compare that with, say, a WTV (Window’s TV) file, which will use about 718MB.

DV is relatively quick to transcode, and is smooth for Cinelerra. So there’s that.

If I have a lot of footage at your disposal, but only want to use sparse sections of it, my current approach is to start with the footage in MOV format. I can select chunks of footage from the MOV file using ffmpeg, which I save in DV format. Here’s an example command:

ffmpeg -ss 01:02:30  -i reel01.mov -t 00:01:00 \
-vf scale=720x576 chunk01-01.dv

The ss flag specifies the start point for the chunk (1 hr, 2 min, 30 sec in my example), whilst the t flag  sets the duration of the clip (in this case 1 min).

MOV file

MOV files have the advantage over DV files in that they are much more compact, and have similar quality. They are slower to transcode, though.

Cinelerra seems to get “close” to importing MOV files.Often the sound will work if I play a clip from the beginning, but then run into problems if I want to start a clip at random points. MOV files that use the mp3 audio codec play in vlc flawlessly, but Cinelerra doesn’t like them.

Cinelerra’s rendering of MOV files are bad, and a no-go.

libvorbis is bad

I could not get either vlc or Cinelerra to play audio encoded in this codec.

Other ffmpeg audio codecs which work in vlc, but not in Cinelerra: ac3, libmp3lame

Audio codecs with were reported as unknown: libfaac, wav

An interesting audio codec is aac. This seems to be “the wave of the future”. It is designed to be a successor to MP3, and it used by YouTube, amongst others. Unfortunately, ffmpeg reported that aac support was experimental, requiring an over-ride flag to use it. I didn’t want to use an experimental feature, especially since the chances of Cinelerra supporting it were slim.

WTV format

WTV is an abbreviation for “Windows Recorded TV Show”. Vlc can play these files, but it stutters frequently. Cinelerra does not understand them at all.

Fortunately, you can use ffmpeg to convert them into a friendlier format. The quality will be just as good.

Posted in Computers | Tagged , | Leave a comment

Compiling #cinelerra-cv in Ubuntu Xenial

I was able to compile the latest version of cinelerra-cv from git:

git clone git://git.cinelerra-cv.org/CinelerraCV.git cinelerra-cv

I used commit 21049b7c from Apr 22 2016.

The following is neither a strictly necessary nor sufficient list of packages that need to be installed, but it should help you to get up to speed reasonably quickly from a new Xenial installation:

 

# standard'ish GNU tools
sudo apt-get install libtool # stops configure.ac AC_ENABLE_SHARED, ... probs

# mandatory formats 
sudo apt-get install \
libogg-dev \
libvorbis-dev \
libdv-dev \
libtheora-dev \
libjpeg-dev \
libfaac-dev \
libfaad-dev \
libtiff-dev \
libx264-dev \
libfftw3-dev \
libopenexr-dev \
uuid-dev \
libmjpegtools-dev \
liba52-dev \
libmp3lame-dev \
libsndfile-dev 

#optional formats
sudo apt-get install \
libraw1394-dev \
libiec61883-dev \
libavc1394-dev

# optional, but you might as well:
sudo apt-get install \
libqt4-opengl-dev \
libopencv-dev

 

Then you can build in a fairly standard way:

./autogen.sh
./configure
make
sudo make install

 

I have yet to test cinelerra in operation.

 

Have fun

Posted in Uncategorized | Tagged , , | Leave a comment

HOME and DEB followup

Six months ago I wrote about HOME (Home Retail) and DEB (Debenhams).

The story was that DEB had good price momentum, whilst HOME had poor momentum.HOME sunk on its trading update, whilst DEB gained. I said at the time that HOME looked value-trappy.

I had anticipated that HOME would continue to decline, whilst DEB would continue to improve. I was wrong, however. Here are their charts for the last 6 months:

home.png

 

 

deb.png

As you can see, HOME improved over the last 6 months, outperforming the index (FT100) by 56%, whilst DEB declined, under-performing it by 7%.

HOME’s shareprice has been helped by the takeover offer from SBRY (Sainsbury), so it would be difficult to know how things would have panned out without this exceptional event. Having said that, HOME’s cash pile made it more attractive as a bid target.

Momentum can reverse.

HOME 171p . DEB 79p. ASX 3426

Posted in Uncategorized | Leave a comment

Magic Hat – RM stays in

The MHP (Magic Hat Portfolio) on Stockopedia (http://www.stockopedia.com/fantasy-funds/magic-hat-463/) is an experiment by me to see if a human can improve on a mechanical Greeblatt Magic Formula screen. I am trying to weed out “mistakes” that I feel the screening commits: unseasoned companies, scams, foreign companies (particularly Chinese), fishy accounting, and statistical quirks. Apart from that, I am agnostic as to the sector the company operates in, although I will try to avoid heavy concentration in any one sector. I will mostly apply “Strategic Ignorance”, by which I mean that I wont try to be clever in my stockpicking. My picking will be mostly mechanical. A summary of most of my Magic Hat articles can be found on the web page http://www.markcarter.me.uk/money/greenblatt.htm This will allow you to see, at a glance, what shares have been bought and sold in the past, as well as what shares have been rejected from consideration and why.

RM is due to be ejected from the portfolio this month, but since it still qualifies as a Magic Formula share, it stays in.

An easy month.

Posted in Uncategorized | Leave a comment

CBUY – Cloudbuy – followup

Quick update on CBUY from Oct 2016. (http://is.gd/nnwRBs) It resumed listing. I viewed its transaction with EFH as a sign that the company way doomed, and viewed the chairman’s buy of £8k as an extremely bearish sign.

This turned out to be an accurate read on the situation. Shares were trading at 13.55p at the time. They are now at 7.25p.

Enough said.

7.25p

Posted in Uncategorized | Leave a comment

Cinelerra OGG timeline bug

The waveform on the timeline is taken from idx file.

I reported a problem:

> Add an ogg music file to the timeline. The status bar indicates that an > idx file is being created, and the progress bar progressively sweeps > from 0 to 100%. Wait until the idx file is produced. The console will > display a message saying that a thread has exited.
>
> Now try to manipulate the audio scaling on the timeline (it’s the second > up/down arrows on the control bar at the bottom). You will see that the > audio oscilloscope on the timeline disappears. You can still play the
> audio, though. The problem appears to be with some other sound files, too, as reported here on Nov 2015: http://lists.cinelerra-cv.org/pipermail/cinelerra/2015q4/003681.html It is reported to work without problem with MP3 and WAV.

Some of my investigation work:

EDL (Edit Decision List): Cinelerra project files

~/.bcast contain idx files, which is audio data to display the waveform on tracks

Asset::write_index() is what stores some header info and writes Asset::index_buffer(,,,. data_bytes) to file.

IndexThread::run() is what calls write_index().

index_status = INDEX_NOTTESTED | INDEX_BUILDING | INDEX_READY

I am suspicious of mainindexes.C:231, which might always cause the writing of index files.

A problem that I discovered is in asset.C: Asset::write_index(char *path, int data_bytes). At the bottom of the function are the lines: // Force reread of header
index_status = INDEX_NOTTESTED;
// index_status = INDEX_READY;
index_end = audio_length;
old_index_end = 0;
index_start = 0;

Writing the index seems to effectively invalidate it, which causes the timeline to disappear, and the index to be regenerated every time an OGG music file is dragged to the timeline. So that looks wrong in itself, but doesn’t explain why Cinelerra tries to write the index for OGG music files every time, but not MP3 files.

Update 04-Apr-2016: Apparently the problem also exists with .png, .jpg .avi

Posted in Uncategorized | Tagged , | Leave a comment