Author Topic: Corrupted pictures after scratching - single movies  (Read 12513 times)

Offline sayon

  • Newbie
  • Posts: 17
  • Helpful Contribution Status: +3/-0
Re: Corrupted pictures after scratching - single movies
« Reply #90 on: February 14, 2018, 04:04:56 pm »
TV series do not have about files. The About file is created by processing downloaded files from the movie data base site. Those images have invalid header data. The 1186 has a puny CPU and powerful hardware codecs. Everthing is done by instigating a supplied library function to offload tasks to the codecs. That includes building the About. This is a simple case of Rubbish in-Rubbish out. And Mede8er are not creating the rubbish files.

Thanks for the explanation

Offline jer1956

  • Global Moder8or
  • M8er Addict
  • *****
  • Posts: 17 223
  • Helpful Contribution Status: +192/-53
Re: Corrupted pictures after scratching - single movies
« Reply #91 on: February 14, 2018, 08:02:28 pm »
Thanks for the explanation

Explanations are not solutions. I can explain a lot of issues I wish we could solve. I have spent a lot of time solving a few, which if charged to engineers would be uneconomic. That is just reality.

Older users are more greatful of what we can keep going. New users just expect what retailers say is in the box.

That attitude can be very frustrating. I wish the the last batch had never been made.
« Last Edit: February 14, 2018, 08:26:30 pm by jer1956 »

Offline sayon

  • Newbie
  • Posts: 17
  • Helpful Contribution Status: +3/-0
Re: Corrupted pictures after scratching - single movies
« Reply #92 on: February 14, 2018, 09:49:43 pm »
Explanations are not solutions. I can explain a lot of issues I wish we could solve. I have spent a lot of time solving a few, which if charged to engineers would be uneconomic. That is just reality.

Older users are more greatful of what we can keep going. New users just expect what retailers say is in the box.

That attitude can be very frustrating. I wish the the last batch had never been made.
Personally, despite this problem I will continue to be faithful to my MED800 as I consider it an excellent HD player.
It is then a question of doing simple computer operations to solve graphic defects.
I understand that some may be a nuisance to this problem, but the important thing is that when the forum happens through the contribution of everyone, at least we get to fix it.
So as long as there will not be an equivalent player on the market and that also supports 4K I will go on like this

Offline mike_carton

  • Experienced Member
  • **
  • Posts: 147
  • Helpful Contribution Status: +8/-1
Re: Corrupted pictures after scratching - single movies
« Reply #93 on: February 14, 2018, 11:22:35 pm »
The Mede8ers are good players for HD and 3D. Even very recent players from other manufacturers cannot play 23.976 FPS and 24 FPS media correctly. As I wait to see how the 4K thing shakes out, I expect to use my Mede8ers for a while (I think we'll stabilize at 8K with HDR and DV.) It'd have been perfect if it had support for:

- Box Set / Saga - Somebody hacked the original Mede8er firmware to add that support (http://www.mede8erforum.com/index.php/topic,4898.0.html); so, if the X3D firmware was made available publicly, it'd get that feature too

- forced subtitle flag

Offline jer1956

  • Global Moder8or
  • M8er Addict
  • *****
  • Posts: 17 223
  • Helpful Contribution Status: +192/-53
Re: Corrupted pictures after scratching - single movies
« Reply #94 on: February 15, 2018, 04:50:06 pm »
That code was pre secure boot. Now the firmware won't install and run if not built using the secure boot SDK.

Offline Fallen69

  • Newbie
  • Posts: 8
  • Helpful Contribution Status: +0/-0
Re: Corrupted pictures after scratching - single movies
« Reply #95 on: February 17, 2018, 01:22:05 pm »
I really wish I had read this forum posting before I decide to re-organise things this morning  :(

Not happy that we have no support (800X3D) product is still being sold on Amazon with no mention that support has been withdrawn.   Should be some end-of-life notice or something plastered over the Mede8er website as well.  I thought just future development had stopped, not the actual support for when things go wrong.

Anyway, I tried the workaround (thanks for that) and it works, but I don't know if I can be bothered to mess around with each entry.   Strange thing is with previous media players never had a scraper and it didn't bother me.  But with this now, because it has a scraper,  I kind of want it to work automatically with no messing. 

What are the alternatives to this media player?  Are there any players that are fully supported?  Other brands etc that somebody could recommend?

At the moment I am tempted to setup a spare PC run Plex and stream.

Offline propfax@gmx.de

  • Newbie
  • Posts: 2
  • Helpful Contribution Status: +0/-0
Re: Corrupted pictures after scratching - single movies
« Reply #96 on: February 17, 2018, 05:27:47 pm »
Der jer1956,

Your product is based on (own) engineering knowledge, plus supliers and/or OEM parts. It doesn't matter which kind of contracts between this companies are exesting or not,
you are the seller !
The custumor bought from you! And you are in contract with this custumoers, and not one of your supliers or OEM partners.
You are responsible for all issues !

You was telling us, Sanji has no own developers, and this is one of the reasons, why we have to accept this technical issue / to accept the published workarround.
Where are the guys wghich developed the Mede8er with the firmware ?
Sanji sold this product, and I guess the mede8er player is only a "contract work", but this is not relevant.
In this case, they to place a new order to this guys to fixe it !

One part of a vendor is, to make as vendor finacial reserves for guarantee responsibles and after sales !

Take a look to post #73 from YyNnn and #78 from Satnaff.
Do you know, what they did ?
It's the responsible from the Service dept or R&D to figure this out!
Did you payed salary to them ?

The published workarround didn't work for me, and it's not importend if it works or not, because it's a workarround.
There is no guaranty, that a workarround have to work, a workarround is not a FIX !

You guess and hope, that the community (your customers) will accept this workarround, and will "maybe develop" other workarrounds,
with the result, they feel comfortable about this, and you as vendor could "to twiddle one's thumbs'.....

But N O T:
We, your customers, are claiming this issue to you / the vendor Sanji to FIX IT !

That is your responsibility !


KR
propfax

greetings from Germany


PS
@Fallen69
I'm testing a http://www.bee-link.com/Beelink-MiniPC-TV-BOX-61-1.html
you need KODI for this, KODI is very powerful but also very complex in the configuration.
This player works with all formats, ATMOS works, 3D I didn't have testet until now.
I didn't have a 4K device in the moment =>FullHD
A friend from me has already sold the Mede8er and has now a Vero 4K https://osmc.tv/vero/
in the moment support this player no 3D.
(ATMOS, 4K is all working)

Offline Fallen69

  • Newbie
  • Posts: 8
  • Helpful Contribution Status: +0/-0
Re: Corrupted pictures after scratching - single movies
« Reply #97 on: February 17, 2018, 07:28:25 pm »
Thnks propfax ... will check out.

Offline YyyNnn

  • B8a Tester - 1000X3D
  • Active Member
  • ****
  • Posts: 91
  • Helpful Contribution Status: +3/-12
Re: Corrupted pictures after scratching - single movies
« Reply #98 on: February 21, 2018, 02:16:20 pm »
Propfax is right. Snaji have to fix it.

Offline livevil

  • Newbie
  • Posts: 8
  • Helpful Contribution Status: +1/-0
Re: Corrupted pictures after scratching - single movies
« Reply #99 on: February 21, 2018, 07:38:34 pm »
I've been tinkering with my mede8er and a raspberry this week and I found a way to make it work (it's not a fix though but it removes the need to manually edit images  :P).

I've installed mitmproxy on the raspberry and run it as a transparent proxy. I've attached a python script that intercepts answers from the server containing "image" in the header. The script edits the density of the images to force 72x72 and transmits them to the client.

I've then changed the gateway of the mede8er to point to the raspberry and now when I scrap, I get 72dpi images, which are accepted by the mede8er to build the about.jpg and the folder.jpg   :)

EDIT: it's weird tough because it seems that tmdb doesn't always send images with 1x1dpi. Some of the "wrong" pictures I got last week are now OK (72dpi)  :o
« Last Edit: February 21, 2018, 08:03:08 pm by livevil »

Offline jer1956

  • Global Moder8or
  • M8er Addict
  • *****
  • Posts: 17 223
  • Helpful Contribution Status: +192/-53
Re: Corrupted pictures after scratching - single movies
« Reply #100 on: February 21, 2018, 09:24:43 pm »
Please post more details. Something similar could be done with other devices acting as a proxy.

Offline livevil

  • Newbie
  • Posts: 8
  • Helpful Contribution Status: +1/-0
Re: Corrupted pictures after scratching - single movies
« Reply #101 on: February 21, 2018, 10:09:57 pm »
The problem that could be encountered with this solution would be if the mede8er uses https for the requests and verifies the certificate. In this case, it would detect the "man-in-the-middle" because it wouldn't provide the right certificate for the domain it was requesting.
During the tests I've made tonight, the mede8er only sent http requests towards image.tmdb.org, so these can be easily intercepted.

I will try to post more details later.

Offline mike_carton

  • Experienced Member
  • **
  • Posts: 147
  • Helpful Contribution Status: +8/-1
Re: Corrupted pictures after scratching - single movies
« Reply #102 on: February 22, 2018, 12:33:55 am »
This is what I like about the communities that build around hobbies like this.

Offline livevil

  • Newbie
  • Posts: 8
  • Helpful Contribution Status: +1/-0
Re: Corrupted pictures after scratching - single movies
« Reply #103 on: February 22, 2018, 08:43:10 pm »
So this is what I have done to get the images (it's a bit long). For this, I am using a Raspberry Pi 3, with Raspbian Stretch

The network needs to be properly configured first. It's better to have a fixed IP otherwise the Raspberry may change IP upon reboot. I will assume that it is done... So let's install mitmproxy.

First do a:
Code: [Select]
sudo apt-get update
sudo apt-get upgrade

Then install the dependencies for mitmproxy:
Code: [Select]
sudo apt-get install python3-dev python3-pip libffi-dev libssl-dev
You need python 3.5 or higher to install mitmproxy 2.0.2 (you can check your current version with: python -V)

I tried to install mitmproxy from apt-get, but I could only have version 0.8-2 (you can check which version will be installed by using apt-cache madison mitmproxy, apt-cache showpkg mitmproxy or apt-cache policy mitmproxy)
So I installed it directly with python:
Code: [Select]
sudo pip3 install mitmproxy
If everything went well, mitmproxy should be installed by now. By default, it uses port 8080 (I haven't tried to change it, but you could). We need to redirect http (80) and https (443) traffic towards it: these are the ports that the mede8er is using to send its queries. If you are running a web server or something else on these ports, you need to disabled it or change its port.
Then you need to allow port forwarding:
Code: [Select]
sysctl -w net.ipv4.ip_forward=1
And redirect the ports:
Code: [Select]
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080
(change "eth0" with your network interface, e.g. "wlan0" for wifi; check with ifconfig or ip link show)

mitmproxy is ready to run. Check if it is working by starting it with:
Code: [Select]
mitmproxy -T --host
(Note: if you want to use mitmproxy as an explicit proxy with your web browser, e.g. for testing purpose, you need to remove the "transparent" option "-T")

Now you should obtain a black window with a blue ribbon on the bottom. The application is ready to receive and process requests. Go to the mede8er and change the gateway to point to the raspberry. Try the scraper on your movie directory: you should have queries/reponses showing in the window (with the 200 code that says that it was processed successfully).
If so, mitmproxy is running fine. Right now, the query and response are left untouched. We need to attach a python script to the program. Quit mitmproxy (press ":", then "q", then "y").

Go to your home folder and open an editor:
Code: [Select]
cd /home/pi
sudo nano changedpi.py

And paste the following code:
Code: [Select]
"""
Written by livevil, version 1.2
Script for mitmproxy (tested with version 2.0.2)
This script intercepts the jpeg images sent by the server, checks whether the jfif
marker is present, if so, it gets the image density  and forces it to (72,72) dpi in
case it is set to (1, 1)
"""
import io
from PIL import Image
from mitmproxy import http
from mitmproxy import ctx

def response(flow: http.HTTPFlow) -> None:
    ctx.log.info("Script has started.")
    if ("image.tmdb.org" in flow.request.host_header) and flow.response.headers.get("content-type", "").startswith("image"):
        ctx.log.info("image sent by image.tmdb.org")
        s = io.BytesIO(flow.response.content)
        img = Image.open(s)
        try:
            imgmarker = img.info['jfif']
        except:
            ctx.log.info("jfif marker not found, nothing done...")
            pass
        else:
            ctx.log.info("image density is : {0} ".format(img.info['jfif_density']))
            if img.info['jfif_density'] == (1, 1):
                ctx.log.info("density is (1, 1), forcing it to (72, 72)")
                s2 = io.BytesIO()
                img.save(s2, "jpeg", dpi=(72,72))
                flow.response.content = s2.getvalue()
                flow.response.headers["content-type"] = "image/jpg"
            else:
                ctx.log.info("image density is OK, nothing done...")

Save and close by pressing "Ctrl+X" and validate with "Y". Now run mitmproxy again with the script attached:
Code: [Select]
mitmproxy -T --host -s changedpi.py
You should get the same black window, with a "[scripts:1]" at the bottom. Try again the scrapper: if everything goes well, the images with 1x1 dpi should be modified to 72x72 dpi.

Also port forwarding will be lost upon reboot, so you will need to enter again:
Code: [Select]
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080
when you restart. This is easily done automatically but I didn't have the time yet.

I didn't test everything extensively. I first installed mitmproxy 2 days ago, after trying some other things. So it's new to me :) Try it and tell me if it works for you :)

Offline jer1956

  • Global Moder8or
  • M8er Addict
  • *****
  • Posts: 17 223
  • Helpful Contribution Status: +192/-53
Re: Corrupted pictures after scratching - single movies
« Reply #104 on: February 23, 2018, 09:44:55 am »
Thanks for taking the time to post this.

Many of us have PC's as servers and could act as the gateway.