Problems with mp4 files in Firefox

We had some students who took a video with their phone and wanted to post it on an html page. The html code we used was:


In Chrome, this worked fine. But in Firefox, it would show like this.

When that happened, I went to Tools -> Web Developer -> Browser Console. I got a message like this:

HTTP "Content-Type" of "video/3gpp" is not supported.  Load of media resource http://www.example.com/Robot.3gp failed.

This message was strange because I wasn't posting a file called Robot.3gp, but one called Robot.mp4. So on my server, I checked the file.

$ file Robot.mp4
Robot.mp4: ISO Media, MPEG v4 system, 3GPP 

So whatever created this file, actually made a 3gpp file and not a legit mp4. However, I found that you can convert a 3gpp file to mp4 using ffmpeg. I renamed my Robot.mp4 file to Robot.3gp and then converted it.

$ ffmpeg -i Robot.3gp -ab 64k -ar 44100 -strict -2 Robot.mp4
ffmpeg version 2.8.12 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Robot.3gp':
  Metadata:
    major_brand     : 3gp5
    minor_version   : 0
    compatible_brands: 3gp5isom
    creation_time   : 2017-07-26 17:45:04
  Duration: 00:00:20.23, start: 0.000000, bitrate: 5135 kb/s
    Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m), 720x480, 5005 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2017-07-26 17:45:04
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 123 kb/s (default)
    Metadata:
      creation_time   : 2017-07-26 17:45:04
[libx264 @ 0x1e6d1e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x1e6d1e0] profile High, level 3.0
[libx264 @ 0x1e6d1e0] 264 - core 148 r2699 a5e06b9 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'Robot.mp4':
  Metadata:
    major_brand     : 3gp5
    minor_version   : 0
    compatible_brands: 3gp5isom
    encoder         : Lavf56.40.101
    Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 480x720, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2017-07-26 17:45:04
      encoder         : Lavc56.60.100 libx264
    Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      creation_time   : 2017-07-26 17:45:04
      encoder         : Lavc56.60.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame=  607 fps=178 q=-1.0 Lsize=    1593kB time=00:00:20.22 bitrate= 645.1kbits/s    
video:1408kB audio:162kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.439324%
[libx264 @ 0x1e6d1e0] frame I:4     Avg QP:19.34  size:  9992
[libx264 @ 0x1e6d1e0] frame P:171   Avg QP:22.56  size:  4317
[libx264 @ 0x1e6d1e0] frame B:432   Avg QP:24.06  size:  1534
[libx264 @ 0x1e6d1e0] consecutive B-frames:  3.3%  2.6%  8.4% 85.7%
[libx264 @ 0x1e6d1e0] mb I  I16..4: 28.5% 58.4% 13.1%
[libx264 @ 0x1e6d1e0] mb P  I16..4:  4.2%  9.2%  1.8%  P16..4: 37.9%  7.7%  5.0%  0.0%  0.0%    skip:34.2%
[libx264 @ 0x1e6d1e0] mb B  I16..4:  0.3%  0.5%  0.1%  B16..8: 42.5%  2.7%  0.4%  direct: 1.4%  skip:52.2%  L0:48.5% L1:48.6% BI: 2.9%
[libx264 @ 0x1e6d1e0] 8x8 transform intra:59.6% inter:80.2%
[libx264 @ 0x1e6d1e0] coded y,uvDC,uvAC intra: 32.2% 41.0% 4.4% inter: 7.5% 10.5% 0.3%
[libx264 @ 0x1e6d1e0] i16 v,h,dc,p: 33% 24% 26% 18%
[libx264 @ 0x1e6d1e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 16% 45%  3%  9%  3%  9%  2%  3%
[libx264 @ 0x1e6d1e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 14% 27%  3% 18%  4% 16%  2%  3%
[libx264 @ 0x1e6d1e0] i8c dc,h,v,p: 61% 18% 20%  1%
[libx264 @ 0x1e6d1e0] Weighted P-Frames: Y:2.3% UV:0.0%
[libx264 @ 0x1e6d1e0] ref P L0: 56.2% 10.7% 21.3% 11.6%  0.1%
[libx264 @ 0x1e6d1e0] ref B L0: 84.3% 11.6%  4.1%
[libx264 @ 0x1e6d1e0] ref B L1: 94.4%  5.6%
[libx264 @ 0x1e6d1e0] kb/s:569.65
$ ll Robot*
-rwxr--r-- 1 hep html 12988147 Jul 27 12:53 Robot.3gp
-rw-rw-r-- 1 hep html  1630980 Jul 27 13:43 Robot.mp4
$ file Robot.3gp
Robot.3gp: ISO Media, MPEG v4 system, 3GPP
file Robot.mp4
Robot.mp4: ISO Media, MPEG v4 system, version 1

Now the Robot.mp4 file plays in Firefox without a problem.

Keyboard not working with old program setup

At work, we use some very old programs. In one program (layout), it opens up the other program (specctra). The weird error was that the keyboard would not work in specctra if it was started from layout. If I started it by itself from the command line, it worked perfectly. I looked at the logs when it started and found a lot of warnings that looked like this:

Warning: translation table syntax error: Unknown keysym name:  osfActivate
Warning: ... found while parsing ':osfActivate:            ManagerParentActivate()'
Warning: String to TranslationTable conversion encountered errors
Warning: translation table syntax error: Unknown keysym name:  osfBeginLine
Warning: ... found while parsing ':osfBeginLine:           ManagerGadgetTraverseHome()'
Warning: String to TranslationTable conversion encountered errors

Searching for this message brought me to this page. And the directions there worked perfectly.

[~]# cd /usr/
[/usr]# mkdir -p X11R6/lib
[/usr]# cd X11R6/lib/
[lib]# ln -s /usr/share/X11 .

After I created that link, the keyboard worked fine however specctra was started.

Compromised Account

I had a user account that was compromised yesterday. Fortunately, all they used it for was to send out a ton of spam for 11 hours or so. The person whose account was compromised came in today to find over 50,000 bounced messages in her account. So I had a pretty good idea of which account was causing the problem. After stopping her mailer and then starting and stopping sendmail, I saw that the messages were still going out. I changed her password and that appeared to stop things. I kept an eye on things and will continue to do so for the rest of the day, to see if anything else goes wrong.

In looking at the logs, I've found lots of messages like:

Jul  6 11:09:21 srv sendmail[23556]: STARTTLS=server, relay=46-23-137-130.static.podluzi.net [46.23.137.130], version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:09:23 srv sendmail[23556]: v66G9Ac7023556: 46-23-137-130.static.podluzi.net [46.23.137.130] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA
Jul  6 11:10:06 srv sendmail[23952]: STARTTLS=server, relay=95-107-2-69.dsl.orel.ru [95.107.2.69], version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:10:08 srv sendmail[23952]: v66G9xXg023952: 95-107-2-69.dsl.orel.ru [95.107.2.69] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA
Jul  6 11:10:48 srv sendmail[24162]: STARTTLS=server, relay=[78.90.224.29], version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:10:50 srv sendmail[24162]: v66GAfoO024162: [78.90.224.29] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA
...
Jul  6 11:12:25 srv sendmail[24858]: STARTTLS=server, relay=host53-static.74.169.95.hellotel.net [95.169.74.53] (may be forged), version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:12:26 srv sendmail[24858]: v66GCHIq024858: host53-static.74.169.95.hellotel.net [95.169.74.53] (may be forged) did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA
Jul  6 11:12:29 srv sendmail[24869]: STARTTLS=server, relay=static-digital2-info93.espacodigitalinfo.com.br [177.73.122.92] (may be forged), version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:12:31 srv sendmail[24869]: v66GCMQ5024869: static-digital2-info93.espacodigitalinfo.com.br [177.73.122.92] (may be forged) did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA
Jul  6 11:13:49 srv sendmail[25528]: STARTTLS=server, relay=130-193-72-23.mynetwaydsl.net [130.193.72.23] (may be forged), version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:13:51 srv sendmail[25528]: v66GDhMg025528: 130-193-72-23.mynetwaydsl.net [130.193.72.23] (may be forged) did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA
Jul  6 11:14:13 srv sendmail[25679]: STARTTLS=server, relay=static-espacodigital.200-3-20-234.espacodigitalinfo.com.br [200.3.20.233] (may be forged), version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:14:15 srv sendmail[25679]: v66GE68G025679: static-espacodigital.200-3-20-234.espacodigitalinfo.com.br [200.3.20.233] (may be forged) did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA
Jul  6 11:15:08 srv sendmail[25991]: STARTTLS=server, relay=[37.236.158.29], version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul  6 11:15:11 srv sendmail[25991]: v66GEt5t025991: [37.236.158.29] did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA

All of those did not issue MAIL/EXPN/VRFY/ETRN during connection to MSA messages are people trying to send mail through our server with the incorrect password. Part of me would like to collect all of those ip addresses and block all packets from them, since they're compromised. However, that would be a lot of work. And they could be just like me, someone who had a compromised account that they're cleaning up. And also like me, they'd like to have their email delivered again once things are back to normal.

Year is Half Over

That was quick. 2017 is already halfway over. Thought I'd take a minute to see how the year is progressing so far.

I started the year off great with my no sugar habit. But then I went on vacation at the end of April and sort of fell off the wagon for May and June. My intention was to start July better, but that hasn't happened. The good thing though is that I am getting better about not totally overindulging when I have a little bit of sugar. I just put the black face on the calendar and try to get back to eating right. And my new mantra is "I'll try again tomorrow". No use beating myself up over it.

My DIY projects have been going pretty well. I've made a number of things. Beer flight paddles for my brother's brew pub. They're working really well and he just asked me for 7-10 more. So I'll have to get on that. I made some small planters for my mom out of old boards in the basement. And I made a huge planter for my mom out of some old doors I found. I've gotten the welder all set up, though I haven't actually used it yet. Though that's more of a problem of finding space in my garage. For safety, I only want to weld outside or in the garage...not in the house.

I had emptied the back of my upstairs to start gutting it. That hasn't happened. In fact, I moved a twin bed up there because my brother and his husband moved all their stuff to my house because they're going to Shanghai for the year. And since I hurt my back about 10 days ago, I've been sleeping on this twin bed because it's harder than my own bed. So while I have great intentions for working on the house, nothing has been done.

The garden is looking pretty good. And I bought a ton of herbs. A new goal that I have is to try to learn how to cook well. I think I might need to use the herbs. Someday, I'd like to invite people over to my house for a dinner party and be able to cook for them. Shoot, I'd even like to be able to cook myself some decent meals. I have absolutely no confidence in my cooking skills at this time.

So far this year I have already bought myself a new bike. That was an excellent purchase and I like it a lot. Granted, I also got hit by a car for the first time ever. Fortunately, both me and my bike were fine, so I can keep riding. So I now fully understand the whole "you have to get back on the horse that threw you" mentality. I won't say that it didn't affect me, as I do tend to tense up when there are more cars around. But I do still ride. I also got a drill press. And it didn't cost me anything. Mickey gave it to me. I haven't yet used it because it didn't come with a key and I couldn't find mine. But I'm sure I'll use it soon.

So far the year is going well. My sister is getting married in two weeks, so I'm very happy for her. My brother and his husband are embarking on an adventure in Shanghai, so I'm happy for them. I still like my job and can take care of myself, so I'm happy for me.

The Back Part II

On July 21st, I got up as usual and did some stretches for my knee, as I had started doing again a few weeks before, and was putting my shoes on when I felt a sharp pain in my back. I don't know why, but I do know that I had done this before. So I had a pretty good idea of what to expect. It is now 10 days later and things feel pretty good. I started to be able to do normal things without a ton of pain after about a week. And as I noted in my previous blog post, ice is better than heat. And lying flat on the floor is quite helpful. Though, getting up from lying on the floor is quite painful. But I think it'll be back to normal after another week. I'm mainly writing this to note how long things take to get better and how often this is happening.

I also think that I might look into joining a gym where I could work with a trainer. Since I had literally just finished stretching and was putting on my shoes, I fear that perhaps I'm stretching incorrectly. And a trainer will work on stretching all my muscles, not just the ones that hurt. I'll have to look at things to see how expensive this might be.