Magic Lantern Forum

Experimental builds (WIP) => Other experimental builds => Topic started by: theBilalFakhouri on June 05, 2021, 03:45:56 PM

Title: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 05, 2021, 03:45:56 PM
Hello,

Some time ago, me and reddeercity found out how to change HDMI output signal from Interlaced to Progressive, also HDMI video system from NTSC to PAL, it was only matter of changing some registers values, wasn't that hard, also by digging into "Force HDMI-VGA" (https://www.magiclantern.fm/forum/index.php?topic=26108.msg235697;topicseen#msg235697) code, I found an option to force 1080i output on HDMI displays instead of 720x480p because some monitors don't support interlaced signal, so it output only in VGA mode, this option might be useful for some people.

Now I made a simple module includes these options:

(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FMn5pB6J%2FHDMI-Output.png&hash=faec1798b8309409402dfcf7d15fc982) (https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FZXY74rd%2FDefault-v.png&hash=08b6b4ff6895b3761d6164c0b02c7215) (https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FxgBbxht%2FChanged-v.png&hash=9d3027e0eb5739e00e39b08bb53fb15e)

Supported models:

(700D.115 / 650D.104 / 600D.102 / 550D.109 / 6D.116 / 5D2.212 / 100D.101 / EOSM.202 / 70D.112 / 60D.111 / 50D.109 / 1100D.105).

The HDMI output should be 1080i to use Progressive option.

Notes:
-You will need a build from iso-research (https://builds.magiclantern.fm/experiments.html) branch
-The module works in crop_rec_4k builds too, but it conflict with crop_rec module if both loaded, unload crop_rec in this case (use a custom crop_rec_4k build for 70D).
-Download the module, then copy it to ML/modules folder in SD card.

-Some HDMI TVs/monitors won't work when using Progressive setting, it will give black screen
-Currently the module have quirks on DIGIC 4 cameras when using it while recording H.264 video.
-Progressive mode might make an overhead, I got some choppy frames when recorded 720p60 H.264 video
-Using Progressive mode on capture card might give squeezed 1920x540p output, you may need to de-squeeze it to 1920x1080p

-1920x540p is cleaner than 1920x1080i, I could see the noise clearly.
-If your 1080p monitor doesn't support Interlaced signal, enable "Force 1080i output" option, you may have scanning lines pattern, try switching "Signal" to "Progressive".

-After forcing HDMI output to 1080i, you may need to switch the camera to photo mode (beside turning off "Force 1080i output" option) if you want to get back to VGA output.

-This module might be useful for streamers :)
-Use it at your own risk

Module settings:
-Signal: change HDMI output signal from 1920x1080i @ 60 Hz to 1920x540p @ 30 Hz
-System: change HDMI video system from 1080i @ 60 Hz to 1080i @ 50 Hz, or from 1920x540p @ 30 Hz to 1920x540p 25 Hz, or from 720x480p @ 60 Hz to 720x480p @ 50 Hz
-Force 1080i output: Force high resolution (1920x1080i) on HDMI displays.



This video recorded in initial hdmi_out release, so "Force 1080i output" wasn't there at that time.


Short showcase on 5D2 from @Skinny (Thanks!):



This module Confirmed working on 700D, 5D2 and 550D, please test this new module and feedback for other models, if the module didn't work on a certain model then report back.

Download (https://bitbucket.org/bilal_fakhouri/magic-lantern/downloads/hdmi_out.mo) / Source code (https://bitbucket.org/bilal_fakhouri/magic-lantern/downloads/hdmi_out.zip) / Technical discussion (https://www.magiclantern.fm/forum/index.php?topic=25222.0)
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 06, 2021, 06:21:58 PM
Hi! Is there any possibility to switch to progressive without entering 1080i?
It seems that my monitor won't accept interlaced 1080i and the camera defaults to 480 so module can't work...
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 06, 2021, 08:17:00 PM
720x480 output using HDMI is already in Progressive mode by default
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 06, 2021, 10:37:31 PM
ok, I didn't explain what I mean properly... I have a monitor which can work with 1080p, but apparently it can't display 1080i. So I can't enter 1080i mode at all...
I just wanted to have better resolution than 720x480, and if there is a way to enable say 1920x540p or any other resolution higher than 720x480, without switching to interlaced mode first, it would be great.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 06, 2021, 10:47:09 PM
Got it, fortunately the answer is yes:


I have 1080p monitor and when attaching my 700D to the monitor using HDMI, the camera won't accept outputting in 1080i, it outputs to 720x480p, I do think my monitor doesn't support outputting Interlaced signal properly (some scanning lines pattern would happen) but it can show the Interlaced image at least . .

By reading "Force HDMI-VGA" code, I found an option to force outputting Full-HD signal (1080i), tried it on my 1080p monitor, the output switched from 720x480p to 1080i, nice! but again this only worked in none-LiveView mode, since I know how to switch the Interlaced signal in 1080i to Progressive (https://www.magiclantern.fm/forum/index.php?topic=26107.msg235690#msg235690), I got rid of scanning lines pattern, so Forcing VGA to 1080i, then switching the signal to Progressive might be very useful for some users.


But we need to solve this problem first:
https://www.magiclantern.fm/forum/index.php?topic=26108.0

At this time of writing, not sure how to solve it
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: deerport on June 07, 2021, 07:08:58 AM
Can it also work for 7D?
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 07, 2021, 09:56:17 AM
It is very cool, I saw it :)
Is it a problem also for digic 4 cameras? I only have 550D and 5D2, so if this hack can work I would be really happy. The module from the first post is universal for the whole range of cameras, so I thought maybe... anyway it is very interesting progress
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 07, 2021, 08:24:05 PM
New version posted, changes:

-VGA output 720x480p now supports HDMI video "System" option, you can toggle between 720x480p @ 60Hz and 720x480p @ 50Hz
-DIGIC 4 cameras: Added option to "Force 1080i output", for DIGIC 5 cameras we need solve this issue (https://www.magiclantern.fm/forum/index.php?topic=26108.msg235697;topicseen#msg235697) first to make it work.

More details, download link in the first post (https://www.magiclantern.fm/forum/index.php?topic=26107.msg235690#msg235690).

@Skinny please test the new "Force 1080i output" option, also try to switch the "Signal" to "Progressive".

Any feedbacks are welcomed!
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 07, 2021, 10:07:57 PM
It worked! i'm gonna test it more on both cameras tomorrow :) awesome!
as it turns out, the monitor can perfectly accept 1080i with forced output... no artefacts or anything. But if I switch to progressive, it shows blank screen with warning "change resolution", probably because of a strange aspect ratio.

1080i is cool, much more detailed than 480 :D now I can focus easily without any magnification. Thank you a lot!
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 07, 2021, 10:36:34 PM
Awesome :D thanks for the feedback!
I would like to see a video showing enabling "Force 1080i output" option on 5D2, also 550D, to include it in the first post.

Yeah, Progressive mode doesn't work well on all TV/Monitors, for me I have tested this option on two Sony TVs and it gave a blank screen, on Samsung TV and a PC Monitor it worked fine.

Waiting for your new tests! also if you could test "System" option too on both VGA and 1080i outputs on both cams, I would appreciate it!
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 08, 2021, 10:28:09 PM
ok I can confirm it is working on 550D and 5D2 :D and NTSC and PAL switch also works..

so what kind of video do you want? I don't have a capture card to show the screen, but maybe I can record something with another camera...
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 09, 2021, 12:05:09 AM
Nice! thanks for testing!

No need to capture card, attach the 5D2 to the monitor, film the monitor with the 550D in H.264, or using any smartphone with 1080p, and just make sure the image is clear and steady, turn on 5D2, then turn on "HDMI Output", and enable "Force 1080i output" option, and let us see the result :).


Updated first post,  5D2 and 550D have been confirmed to work (Thanks @Skinny).
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 11, 2021, 06:52:45 PM
ok I did it :D
I don't know if recording the monitor with 550D is a good idea, but anyway:


And sorry for the accent, this is literally second or third time I speak English :)
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 11, 2021, 07:13:10 PM
Thanks @Skinny!

I have included the video in the first post, no worries about the accent ;D
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 18, 2021, 04:12:37 AM
New version posted, changes:

-"Force 1080i output" now available for DIGIC 5 cameras :D (I figure it out, thanks to DebugMsg, as I guessed I needed to apply the patch in another way)

This option tested with success on 700D, please feedback for other DIGIC 5 cameras.

Download link in the first post (https://www.magiclantern.fm/forum/index.php?topic=26107.msg235690#msg235690).
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Walter Schulz on June 19, 2021, 07:42:59 AM
@Skinny + Bilal:
Having troubles to confirm 550D "working". Should it work for H.264 recording, too? Because mine doesn't. Most of the screen got frozen and there is an area on top with scrambled content. Area = Top of screen, filling whole width.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 19, 2021, 09:14:44 AM
There are lots of things.. I will do more tests soon.

It isn't working with h.264 recording on 5D2 too, it just switches to 480. and screen goes black periodically, like it is trying to switch but falls back to 480.
But the videos recorded ok. At least in a few tests.

I tested 550 with very slow SD card (I just recently lost my fast sd card) and it was recording only 5-6 seconds, so I thought everyting is the same. I didn't noticed frozen screen because most of the time my monitor was black, and I only saw it for a moment and then "recording stopped".
Now with normal fast SD card I can see - everything as you described, it's frozen with distorted content in the top area.
Actually it starts with 480 sometimes, and then switches to 1080 and screen freezes.

Sometimes 550D doesn't turn off correctly after I use this module, card activity led stays lit.
So it's kind of unstable and more useful for live streaming and so on, for now.. (for 550D).

I didn't have time to check RAW recording with this module on 5D2, but I'm gonna do more tests later
What else... on 550D I can watch recorded h.264 clips in full screen, full width. On 5D2 it is centered and much smaller, with borders.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on June 19, 2021, 03:04:40 PM
@Walter
You mean when enabling "Force 1080i output", what settings have you used with the module?

Thanks for the feedback guys, I didn't have this problem on 700D (DIGIC 5) when recording H.264, it's works fine, the output stays 1080i, also no weird artifacts in LiveView

I will prepare a build for 550D, 5D2 to check some registers values when recording H.264 video, also will put another way to apply "Force 1080i output" patch (the patch which solved force 1080i on 700D).

@Skinny
Yes, I had the problem when the camera is not turning off cleanly, I might have a fix for this, mostly we only need to use "HDMI Output" settings in LiveView, but not in menus.

What else... on 550D I can watch recorded h.264 clips in full screen, full width. On 5D2 it is centered and much smaller, with borders.

What was the output on 550D and 5D2 when watching H.264 videos ?
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Walter Schulz on June 19, 2021, 03:12:02 PM
@Walter
You mean when enabling "Force 1080i output", what settings have you used with the module?

All combinations. PAL/NTSC, Progressive/Interlaced.

BTW: Tested with 7D. Don't have a device giving me troubles connecting with Full-HD so unsure if working properly. No visible problems, though.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 19, 2021, 03:59:26 PM
What was the output on 550D and 5D2 when watching H.264 videos ?
It was all 1080 in both cameras.. The setting I used is NTSC interlaced.

And 5D2 is always turns off correctly, at least so far I haven't noticed anything :)


@theBilalFakhouri thank you so much for all this work, if I ever knew how much progress you will make for 650/700D, I would definitely buy 650 instead of 550 :D I am really surprised how much functionality you have added to this camera
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 24, 2021, 07:49:56 PM
little update - I just finished repairing 24" monitor (haha, service center said it cannot be fixed) So I connected 550D and it works with interlaced and progressive scan :) But I didn't see much difference between the two. Although I look at the noise very closely. Well anyway, I can see the output in both modes.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Walter Schulz on June 24, 2021, 08:24:58 PM
But I didn't see much difference between the two.

Haven't compared it yet, either.
Have you tried fast moving scenes?
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Skinny on June 24, 2021, 08:52:06 PM
nope... I thought it should be more detailed or something, because theBilalFakhouri said in the first post:

-1920x540p is cleaner than 1920x1080i, I could see the noise clearly.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: cyberninjaTF2 on September 04, 2021, 04:42:30 AM
Unfortunately this didn't work on my 60d (Firmware version 1.1.1-ml-iso-research), the HDMI Output option under the Display tab won't appear after i copied the "hdmi_out.mo" to the ML/modules folder.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: mineralof on September 04, 2021, 09:43:38 PM
can i somehow start broadcasting on dji RavenEye with this module on canon 6d?
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on September 05, 2021, 11:23:46 AM
can i somehow start broadcasting on dji RavenEye with this module on canon 6d?

You can use this module with any HDMI device, not all HDMI devices are guaranteed to work (like when using Progressive option), you need to do some tests.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: IDA_ML on September 06, 2021, 08:06:22 AM
Has anyone tried the HDMI output on a 1920x1080 capture card?  Does that work and how is image quality in the 1x3 crop modes?  I use these 1x3 modes all the time.  My idea is to use an old smart phone as external monitor via a capture card.  Will that work?
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Walter Schulz on September 06, 2021, 08:25:01 AM
You can answer both questions on your own:
a) Connect camera HDMI to HDMI input of your monitor/TV set.
b) Connect capture card to phone and connect capture card to HDMI output.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: theBilalFakhouri on September 06, 2021, 08:34:18 AM
1x3 presets (which have real-time correct preview) do work with HDMI output, but only in 1080i output and in Full Canon preview (toggle between Small and Full Canon preview by pressing Info button while in 1080i output), the quality is good enough and of course it's better than camera LCD, but it suffer from aliasing and moire in LiveView (this also happens on LCD).

-I didn't have corrupted frames with 1x3 presets and 1080i HDMI (tested on 700D).

As far as I know, Danne did implement HDMI support for 1x3 presets for EOS M but he didn't test it, you need to make some tests (e.g try it on any TV with 1080i output) then feedback.

Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: IDA_ML on September 06, 2021, 10:02:22 AM
You can answer both questions on your own:
a) Connect camera HDMI to HDMI input of your monitor/TV set.
b) Connect capture card to phone and connect capture card to HDMI output.

If I could, I wouldn't be asking, right?  I am considering buying a capture card, adapters and cables but don't have them yet.  My purchase decision will depend on whether this is a working solution or not.  If anybody has some experience with that, I should appreciate some information.

Thanks a lot, Bilal.  This is very useful information, indeed. 
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Walter Schulz on September 06, 2021, 10:16:12 AM
Nobody can tell if your old smartphone will do the job. Telling type and OS version would be a start ...
HDMI adapter (with/without cable) is 2.50 to 6 €, cheap HDMI-USB converter 8 to 15 €. I recommend adapter and converter with cables attached.
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: IDA_ML on September 06, 2021, 02:47:27 PM
The phone is Samsung Galaxy S5 with Android OS on it, (I do not remember the exact version and dont have the phone here to check).  I will also need a OTG cable, I guess. 
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: JogaDann on December 16, 2021, 05:47:58 PM
Hi! I have a 5D2 running lastest 2020Dec28 build. But yes, I want to try hdmi_out.mo. Why I'm not doing this?

Because ISO branch just stucks the camera at a blue + red LED on when I turn it off. Did someone have this issue? I know, it's a ML issue, not a module one, but I wish to know if one of you had something similar, and maybe have a workaround. I'm very excited to try hdmi_out.mo (and solve the 480p output), but the base ML isn't working properly  :-\
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: PukDaLuck on December 19, 2021, 10:48:36 PM
@theBilalFakhouri I would like to use this on my 50D but the iso-research builds don't work for this camera. The camera locks up when it shutdowns down with the iso-research branch (solid blue light). The lua_fix branch works but your module doesn't work with that branch sadly.

I think this is the commit that was applied to the lua_fix branch:
https://foss.heptapod.net/magic-lantern/magic-lantern/-/merge_requests/720/diffs?commit_id=035648f634448331cc93af393ffbb70cc05daf34 (https://foss.heptapod.net/magic-lantern/magic-lantern/-/merge_requests/720/diffs?commit_id=035648f634448331cc93af393ffbb70cc05daf34)

Does anyone have an iso-reseach build with this code change?
Any other way to get iso-reseach working on the 50D?
Any way to install hdmi_output.mo in the lua_fix release?

Thanks
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: JogaDann on January 29, 2022, 12:04:20 AM
@theBilalFakhouri I would like to use this on my 50D but the iso-research builds don't work for this camera. The camera locks up when it shutdowns down with the iso-research branch (solid blue light). The lua_fix branch works but your module doesn't work with that branch sadly.

I think this is the commit that was applied to the lua_fix branch:
https://foss.heptapod.net/magic-lantern/magic-lantern/-/merge_requests/720/diffs?commit_id=035648f634448331cc93af393ffbb70cc05daf34 (https://foss.heptapod.net/magic-lantern/magic-lantern/-/merge_requests/720/diffs?commit_id=035648f634448331cc93af393ffbb70cc05daf34)

Does anyone have an iso-reseach build with this code change?
Any other way to get iso-reseach working on the 50D?
Any way to install hdmi_output.mo in the lua_fix release?

Thanks
Yes, I had the same on 5D2  :'(
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: Priit Pavelson on April 07, 2022, 09:08:02 AM
Unfortunately this didn't work on my 60d (Firmware version 1.1.1-ml-iso-research), the HDMI Output option under the Display tab won't appear after i copied the "hdmi_out.mo" to the ML/modules folder.
It didn't work for me either: 60D.111

ok I can confirm it is working on 550D and 5D2 :D and NTSC and PAL switch also works..
I got an error after enabling the module on 5D2.212
tcc: error: undefined symbol 'unpatch_memory'
tcc: error: undefined symbol 'patch_hook_function'
[E] failed to link modules
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: lea84 on April 12, 2022, 06:21:27 PM
@theBilalFakhouri I would like to use this on my 50D but the iso-research builds don't work for this camera. The camera locks up when it shutdowns down with the iso-research branch (solid blue light). The lua_fix branch works but your module doesn't work with that branch sadly.

I think this is the commit that was applied to the lua_fix branch:
https://foss.heptapod.net/magic-lantern/magic-lantern/-/merge_requests/720/diffs?commit_id=035648f634448331cc93af393ffbb70cc05daf34 (https://foss.heptapod.net/magic-lantern/magic-lantern/-/merge_requests/720/diffs?commit_id=035648f634448331cc93af393ffbb70cc05daf34)

Does anyone have an iso-reseach build with this code change?
Any other way to get iso-reseach working on the 50D?
Any way to install hdmi_output.mo in the lua_fix release?

Thanks

Same with Canon 5D ii. has someone a solution???
Title: Re: HDMI Output Settings (hdmi_out.mo)
Post by: liteo on April 27, 2022, 10:06:40 AM
Hi @JogaDann

I had the same issue with my 5D2 but managed to make it work.

I had to use a custom crop_rec_4k release (official release of crop_rec_4k for 5D2 doesn't exist) mentionned here https://www.magiclantern.fm/forum/index.php?topic=19336.msg223333#msg223333 (https://www.magiclantern.fm/forum/index.php?topic=19336.msg223333#msg223333)
The bitbucket to download the release no longer exists but can be found here https://bitbucket-archive.softwareheritage.org/new-static/e6/e6b5dbd1-408b-4864-b984-289cb9371366/attachments/ (https://bitbucket-archive.softwareheritage.org/new-static/e6/e6b5dbd1-408b-4864-b984-289cb9371366/attachments/)