Firefox: Facebook comments missing from news sites

Minor issue, but after installing FF 59 (due to constant crashing of 61 and 61.0.1) and making some changes to settings, I noticed that comments had disappeared from the two news sites I frequent. I tried turning off Ublock Origin, but no change. Then I checked my FF settings page.

In settings, Privacy and Security, if you have set Tracking Protection to Always – Always, FB comment sections on news sites will not appear (at least that is the case for me in FF 59). Set these to Only in private windows and Only when using Tracking Protection. Comment sections are back.

Advertisements

Firefox 61 on Ubuntu sucks like a neutron star

I’ve been using Firefox mostly happily up until today. Site after site gives me the damn “Gah! Your tab just crashed” error. If I disable that feature, it crashes FF. Also, Facebook videos stopped working. No, it isn’t an add-on. Even a totally new install does the same thing. Completely useless, Mozilla. Thank you.

I have an older version of FF installed concurrently and it works perfectly, demonstrating that the issue is in the programming of the new FF 61 (and 61.0.1 which I also tried). Mozilla is on a campaign to purge information about how to even install older versions. They say this is because it will leave the user open to malware. Sure, I if I were using the browser for general purposes instead of specific. But the whole nanny attitude of “we know what’s best for you” is infuriating.

Chrome works fine, but lacks some of the add-ons I like. I’ll see if I can get 60.0.2 to work. By the way, unplug your network connection to keep FF from updating in the background if you install an older version using the “-P” option in terminal when you do the install. Using Profile Manager lets you specify which version of FF you will run. Then disable the Always Update in preferences. Then you can close FF and reconnect to your network.

When you create a shortcut (launcher) on your desktop, you can also specify that it not talk to other installed versions of Firefox. This line also specifies that it use the profile I just created:
/home/(…)/Downloads/Firefox/firefox/firefox-bin -P -no-remote Sixty02

-P says to use a certain profile
-no-remote says to not talk to any existing FF installed on the system
Sixty02 is what I named the profile during install

Trouble (and solution) getting Hanwha XNV-6011 to record on Pelco Digital Sentry

Korean military supplier Hanwha bought the company Samsung and has been updating some of the products with their new brand and some new features. The company for which I work uses a lot of Samsung IP cameras, and now Hanwha. Up until yesterday, I’ve had no issue with connecting to the cameras, either through the generic ONVIF method, or through RTSP streams.

I recently bought 4 new Hanwha XNV-6011 mini-dome cameras, installed them, and went to add them to our aging Pelco Digital Sentry NVR. I had no issue viewing the cameras in a browser, or in VLC Player, but the Digital Sentry unit consistently refused to show any video. It worked fine with the previous version, the Samsung SNV-6013 mini-dome. The new camera is supposed to be ONVIF S compliant, which is what the Pelco unit requires.

I went in circles checking and double-checking to make sure I hadn’t typed anything wrong, and still no video from these cameras in the Digital Sentry. I tried placing the username and password in the RTSP URL, but that didn’t work either.

Then I started looking at the various settings available on the camera itself, and found one that allowed me to use an RTSP stream without authentication. Since my camera networks are all private IP based (can’t be viewed from Internet), this wasn’t really an issue, so I checked that box and the video instantly appeared on the Digital Sentry!

I still don’t know why this was an issue, since the Digital Sentry had the proper username and password.

Transferring files to and from an Android phone: KDE Connect app

A couple of years or so ago, when I’d want to connect my Android phone to my computer, it was as simple as hooking up a micro-USB cord and plugging it into the computer. Then one day it didn’t connect. After searching for reasons, I found that I now had to do things like “Enable USB debugging” and choose what I wanted as a default when USB was detected by the phone, and then it seemed to work ok.

Recently, I found that even after selecting these options, Linux would show the icon for the phone on my desktop but it still wasn’t really connecting. I did some more searching and a handful of sites had multiple steps for installing MTP file system programs, none of which seemed to work very well as a practical solution. Criminy, I just want to transfer some files, not go through a ritual each time.

I then saw a reference to a free Linux program “KDE Connect” and an accompanying app for the phone (also free), and the transfer will happen over wifi for any device that is running the KDE Connect software.

On the PC (running Ubuntu with the Xfce desktop), I added the current PPA (some articles reference an outdated one):
sudo add-apt-repository ppa:webupd8team/indicator-kdeconnect
sudo apt-get update

To install the program:
sudo apt install indicator-kdeconnect

The icon “KDE Connect Indicator” showed up in my System drop-down folder. Two other very similar icons also showed up, one also in System called “KDE Connect Indicator Settings”, the other in Internet which is also called “KDE Connect Indicator Settings”.

The one I found useful was the first one. It tells the user to start the phone app and request pairing. Click that and an indicator in the upper right of the PC screen pops up and says “Pairing request from ____ Accept or Reject?”. Accept it and the indicator appears as an icon in the toolbar. Clicking the icon shows the name of my phone, the battery level, and some options for browsing the phone or sending files. Browse doesn’t seem to work at all for me, not sure if that is an issue with the Xfce desktop I’m using or what.

On the phone, I have the options to Send files, Multimedia control, Run a command, and Remote input which lets me control the PC mouse.

It struck me how utterly simple that was. No USB cable, no new filesystem installs.

Read up on how much this app is able to do, and what can be shared between the devices.

Here is the link to information about the updated “fork” of the program:
http://www.webupd8.org/2017/01/integrate-your-android-device-with.html

And a link to the wiki:
https://community.kde.org/KDEConnect

NOTE: The paranoid me says to be careful not to give a backdoor into your PC via a compromised phone. The number of malware infested Android phones are in the millions. This program acts just like you on your computer, so be aware of that.

Pana$onic battery message

RANT: Bought a new Panasonic video camera which came with a small battery. I bought a couple of “compatible” batteries and a charger for $50 online which seemed to work fine for a day or so. Then the camera said “This battery cannot be used” and shut off. Both batteries didn’t suddenly develop issues. I did some looking online and Panasonic created some circuitry to tell them when a 3rd party battery is being used:
http://av.jpn.support.panasonic.com/support/global/cs/info/dsc_battery.html

This was allegedly to “protect” their customers. Somehow I don’t buy that.

It is certainly their right to build their cameras to only support their own batteries. I get that. Except they charge about 6 times the amount for one battery. I guess they assume if I’m willing to pay $1000 for a camera, I wouldn’t balk at $120 for a battery. But it is a LOT more customer friendly to make their cameras the focus, and let customers tell others how great the camera is instead of trying to squeeze extra dollars out of us for accessories.

I’ve had no trouble using 3rd party batteries on my older camera, so didn’t anticipate it on this one. Now I’ll have to find a reputable dealer and buy known Panasonic batteries.

Another thing, even the Panasonic shopping website says the large battery is out of stock. I can’t use the small battery to shoot a whole jazz gig. Sheesh!

Amazon is listed as a dealer, and their price for one Panasonic brand battery is $118. I’ll try that one.

NOTE: The brands that currently fail on the new HC-WXF1 video camera are Powerextra and Wasabi. Neither brand claims to work with the new camera, but they do say their batteries work like the VW-VBT380 which Panasonic says is the large battery for this camera. I had to return both of the 3rd party batteries.

New camcorder Panasonic HC-WXF1, but issue converting to H.265

UPDATE 2: I did some more reading about h265 and how more modern hardware is needed to properly render it, and since my PC is over 10 years old, that may be part of the artifact issue I’m seeing with h265 and full 4K size video. I’m going to try playing the clips on more modern hardware and see if the clips are the issue or the hardware.

UPDATE: This isn’t a solution, but is a work-around for now since my clients don’t even have 4K TVs. If I resample the 4K camera video down to HD (1920×1080) and compress with h.265, it gives me a very nice quality clip that is small and that doesn’t have artifacts even though I still see the initial error about the missing key frame. Here is the code I will use until I have a solution to leave the clips in 4K:
ffmpeg -i 4K-input-file.mp4 -c:a copy -c:v libx265 -vf scale=1920:-2:flags=lanczos HD-265-output-file.mp4

– – – – – – – – – – – – – – – – – – – – –
I just got my Panasonic HC-WXF1 4K camcorder and it is pretty nice! I’m running some tests to see what I can do with the resulting 4K video so I can predict better what my clients will get when I shoot their music gigs. The first thing I wanted to do was convert to h.265 to shrink the file size. This is a SLOW process, but the quality is typically great (see my previous post).

I did a 30 second video outside as a test. It was encoded by the camera with h.264 into 4K MP4 (3840×2160). I wanted to then convert this to h.265 to conserve space and compare the quality. However, ffmpeg first gives a couple of errors and the resulting video is full of horrible artifacts. The MP4 from the camera is fine on its own, and plays fine in VLC.

Here is a snapshot comparison of the two visuals (resized):
snapshot1

Link to original 30-sec 4K video on YouTube Youtube probably re-encoded it, so no telling if it is the same as what I had.

I tried to link to the converted file showing the artifacts, but YouTube re-encodes videos and that “corrected” for the issue, though it looks kind of lousy.

snapshot2

Here is the code I used:
ffmpeg -i S1000001.MP4 -c:v libx265 -c:a libfdk_aac -crf 28 265-4k.mp4

Here are the errors that ffmpeg shows just prior to encoding:
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5565a45f0a00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 3003
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5565a45f0a00] st: 0 edit list 1 Cannot find an index entry before timestamp: 3003

So far, I haven’t seen anyone else report these kinds of errors. The syntax of the error doesn’t bring up any hits. I’m experimenting with converting to an intermediate format in the meantime. Oddly, I even downsampled the video in Corel Video Studio from 4K to standard HD and then tried to convert that via ffmpeg to h.265, thinking that it might be something to do with the frame size. But I got the same error. I’ve tried shooting longer videos as well and had the same result.

I tried converting to TS, which worked fine, but the following conversion from TS to the H.265 was full of the same artifacts. It gave the following errors at the start:
[h264 @ 0x560a620cebc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x560a620cebc0] SPS unavailable in decode_picture_timing
[h264 @ 0x560a620cebc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x560a620cebc0] SPS unavailable in decode_picture_timing

All of the errors seem to be related to timing.

When I encode from HD (1920×1080) even from the same camera, I do not get any errors.

The next part is the output of ffmpeg when I do the encoding. I’ve marked in bold the parts that are different than when I encode from HD.

jw@JW-PC:/media/jw/ShareDisk1/4K_CAMERA$ time ffmpeg -i S1020001.MP4 -c:v libx265 -crf 28 -c:a libfdk_aac test.mp4

ffmpeg version N-90524-ge30a37e Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.2.0-8ubuntu3.2)
configuration: --prefix=/home/jw/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/jw/ffmpeg_build/include --extra-ldflags=-L/home/jw/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/jw/bin --enable-pic --enable-pthreads --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx265 --enable-libvpx --enable-version3 --enable-libass --enable-libxvid --enable-postproc --enable-gpl --enable-nonfree
libavutil 56. 12.100 / 56. 12.100
libavcodec 58. 16.100 / 58. 16.100
libavformat 58. 10.100 / 58. 10.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 13.100 / 7. 13.100
libswscale 5. 0.102 / 5. 0.102
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x559875557a40] st: 0 edit list: 1 Missing key frame while searching for timestamp: 3003
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x559875557a40] st: 0 edit list 1 Cannot find an index entry before timestamp: 3003.

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'S1020001.MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2018-04-14T16:47:55.000000Z
Duration: 00:00:18.02, start: 0.000000, bitrate: 60862 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 60550 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2018-04-14T16:47:55.000000Z
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
Metadata:
creation_time : 2018-04-14T16:47:55.000000Z
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 2.7+20-3440a56acc78
x265 [info]: build info [Linux][GCC 7.2.0][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 3 / wpp(34 rows) [HD says 17 rows]
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=8 deblock sao
Output #0, mp4, to 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
encoder : Lavf58.10.100
Stream #0:0(eng): Video: hevc (libx265) (hev1 / 0x31766568), yuv420p(progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 30k tbn, 29.97 tbc (default)
Metadata:
creation_time : 2018-04-14T16:47:55.000000Z
encoder : Lavc58.16.100 libx265
Stream #0:1(eng): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 139 kb/s (default)
Metadata:
creation_time : 2018-04-14T16:47:55.000000Z
encoder : Lavc58.16.100 libfdk_aac
frame= 21 fps=0.0 q=0.0 size= 0kB time=00:00:00.46 bitrate= 0.8kbits/sframe= 28 fps= 12 q=0.0 size= 0kB time=00:00:00.96 bitrate= 0.4kbits/s

FFMPEG using x265 vs x264

I just recompiled ffmpeg (see previous post for that bit of hell) and included h.265 encoding. I’m going to be processing 4K video soon, so wanted to get the hang of this codec. It works with any video, of course, but up until today I hadn’t used it.

The command line is very similar to x264, but includes a new parameter “crf” (constant rate factor). This can also be used for x264, but until now I never used it.
For x265 28 is the default rate in the range of 0-51.
For x264 23 is the default in the recommended range of 18-28.

Lower number = higher quality (lower compression) and larger file size.
Higher number = lower quality (greater compression) and smaller file size.

ffmpeg -i pam.m2ts -c:v libx265 -c:a libfdk_aac -crf 28 pam_265.mp4

The file size difference between raw, x264, and x265 is amazing!

My current HD video camera produces MTS high-def files.
Here are the file sizes for a 12 minute clip:
MTS: 830MB
x264: 439MB (not quite half the size of MTS)
x265: 122MB (about 1/7 the size of MTS!)

To my eyes, there was no discernible difference in quality, using the default settings. x265 seems like a great codec for file sharing and should save a ton of space when I’m uploading video clips for singers. That assumes they will be able to view the clips. Microsoft Windows does not by default play MP4 files (by choice, even though millions use this format). One has to install a 3rd party media player or codec package for Windows to play MP4. VLC is one common 3rd party media player.