nginx – Google Analytics not showing what video .mp4 our users are viewing

Right now I am doing the following with nginx to implement a global rule set for Google Analytics to load on pages.

/etc/nginx/conf.d/analytics.conf

sub_filter '</head>' '<script type="text/javascript">var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-99999999-9"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);})();</script></head>'; 

Replacing UA-99999999-9 with my UA ID

However in Google analytics this does not show what video people are watching. Just the page they are on. We are hosting video files in a subfolder with no index file just like this

domain.com/video1.mp4 domain.com/video2.mp4 

Analytics just shows the user browsing domain.com

How are we able to see what the .mp4 file each user is viewing?

Make Rhythmbox play .mp4 files

Once my Rhythmbox was capable of playing .mp4 files, but I can’t seem to make it the same again.

I tried installing:

sudo apt-get install ubuntu-restricted-extras sudo apt-get install ffmpeg  sudo apt-get install faad sudo apt-get install libfaad2  sudo apt-get install gstreamer1.0-base sudo apt-get install gstreamer1.0-bad sudo apt-get install gstreamer1.0-ugly sudo apt-get install gstreamer1.0-tools  sudo apt-get build-dep rhythmbox sudo apt-get install libav-tools  sudo apt-get install libavcodec57 

But no success. My sources:

https://www.linuxquestions.org/questions/ubuntu-63/m4a-and-m4p-playback-with-rhythmbox-523497/

Unable to play MP3 or MP4 files in Rhythmbox or Movie Player

Cannot play .mp4 videos with the default video player

I downloaded some .mp4 videos on my PC and I want play them on my Samsung Galaxy Ace 2.

Despite the .mp4 videos can be played in my PC1 (with no problem), in my device (using the predefined video media player) the video cannot be played.

This screenshot shows the videos that my device cannot play them:

videos unabled to play

Only the video (pointed with the green arrow) – which is the default video that my device has can be played.

When I select any of the other videos, the device says: “Content not supported”:

video not available

Each time I send the video (via cable from the PC to the device), it will show two options:

Do you wish convert (insert_video_name_here.mp4) before copy it to the device?

  • Yes, convert and copy (recommended).
  • No, just copy (File will copy, but it might be possible it cannot play in the device).

No matter which option I select, the video is not playable.

This is the information about the predefined app:

app video media player

I was reading this answer and this one too about similar problems, but what I understand is due the resolution of the video, but I have no idea what can I do for play these videos in my device (despite those videos are .mp4 or .wmv files “the same as the predefined video – pointed with the green arrow in a previous screenshot”).

I really don’t want download another app and play the videos with them, hence I ask:

How can be played those videos wth the predefined app?


1 Windows 7 Professional 32 bits. Using Google Chrome “as video player” and the Windows Media Player.

PS: I also read about software which can convert videos for device-compatibility, but I’m not sure if those are free-malware applications.

re-write certain part of .mp4 file using ffmpeg

How do i update existing .mp4 file using ffmpeg (or any other tool for that matter)

I want to overwrite one minute of video from 30:09 (mins:sec) to 31:09 using another video of one minute.

Is there any ways to achieve WITHOUT creating a new temporary file? Basically would like to update existing file directly to save time that it takes in creating new file and overwriting the original file.

Thanks for your help.