Jump to content

read a certain point in a video file?


Guest
 Share

Recommended Posts

how it can be done?

for example, i want to reed and load a image from at X time in the video file ( flv / avi / mp4).

is there a command for this?

if not then i need Someone please write such a function ..

Thanks for helpers

Link to comment
Share on other sites

It does not matter what the project.

Only the command is important ..

this Command will be in the algorithm i will Write that is basically the project.

So this part, you do not need to know because it's useless.

the Command Should return $image variable

Edited by Guest
Link to comment
Share on other sites

  • Moderators

It does not matter what the project.

Only the command is important ..

this Command will be in the algorithm i will Write that is basically the project.

So this part, you do not need to know because it's useless.

the Command Should return $image variable

You know, one would think this is basic knowledge: being rude to someone trying to gather more information so they can help you is generally not the best way to obtain that help. And yet we see it more and more lately.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Yes, the project does matter. It's like context for a word, some words are useless without context. Your request is nearly useless without project details.

But anyway, as already suggested by JohnOne in your use _ScreenCapture() to get the image. It's up to you to determine the coordinates of the capture region and how to figure out when you're at the correct point in the video to take a screenshot.

Link to comment
Share on other sites

You know, one would think this is basic knowledge: being rude to someone trying to gather more information so they can help you is generally not the best way to obtain that help. And yet we see it more and more lately.

I did not mean to be rude ...

I write through Google Translate .. Maybe I was not paying attention to what came out ..

Anyway I'm sorry if I was rude.

Yes, the project does matter. It's like context for a word, some words are useless without context. Your request is nearly useless without project details.

But anyway, as already suggested by JohnOne in your other thread, use _ScreenCapture() to get the image. It's up to you to determine the coordinates of the capture region and how to figure out when you're at the correct point in the video to take a screenshot.

I prefer to read the file independent if this is possible and not be dependent on Capture.

I do not think so.

If I can write a complete sentence, but can not write another word in a sentence, so I just need to know how to write the word. It does not require me to elaborate on the court I write.

Edited by Guest
Link to comment
Share on other sites

I prefer to read the file independent if this is possible and not be dependent on Capture.

Ok well have fun with that. Good luck, and I really mean it. If you could explain why you need this we could offer more suggestions, like software that's already out there than can create thumbnails from video files.

I do not think so.

If I can write a complete sentence, but can not write another word in a sentence, so I just need to know how to write the word. It does not require me to elaborate on the court I write.

Did you use Google Translate for this?
Link to comment
Share on other sites

Ok well have fun with that. Good luck, and I really mean it. If you could explain why you need this we could offer more suggestions, like software that's already out there than can create thumbnails from video files.

Did you use Google Translate for this?

"Did you use Google Translate for this?"

Yes.

I always use Google Translate ..

It's too well written?

"Ok well have fun with that. Good luck, and I really mean it. If you could explain why you need this we could offer more suggestions, like software that's already out there than can create thumbnails from video files."

Ok ..

So is a small part of the action of the project.

The algorithm needs to scan the video file and extract images from video file only when there is a change of more than 5% from the previous frame to the current frame ..

I know how to detect the change by percent. I just need something to work on.

Link to comment
Share on other sites

No it's not that it was too well written, because it wasn't, but it was just a little confusing. It's a fundamental problem with the Translate service - sometimes it doesn't understand the context so the meaning the person is trying to convey is literally lost in translation.

But anyway back to your issue. That's a complex algorithm; sounds a lot like motion detection only you're using a video instead of a live feed. I am by no means an expert on this but I don't think AutoIt can do this on its own. You would need some external app with an API that AutoIt can interface with.

Link to comment
Share on other sites

No it's not that it was too well written, because it wasn't, but it was just a little confusing. It's a fundamental problem with the Translate service - sometimes it doesn't understand the context so the meaning the person is trying to convey is literally lost in translation.

But anyway back to your issue. That's a complex algorithm; sounds a lot like motion detection only you're using a video instead of a live feed. I am by no means an expert on this but I don't think AutoIt can do this on its own. You would need some external app with an API that AutoIt can interface with.

That is not true ..

This is partly true ..

But once you try it you realize it's really really not as complicated as it sounds.

That all it takes:

Global $v = 0
$size = WinGetPos("Program Manager")

$xmax = $size[2]
$ymax = $size[3]


$rxmax = $xmax/12
$rxmax = StringSplit($rxmax,".")
$rxmax = $rxmax[1]

$rymax = $ymax/7
$rymax = StringSplit($rymax,".")
$rymax = $rymax[1]


$p = 1
While 1
prosses()
$v1 = $v
$v = 0
prosses()
$v2 = $v
$v = 0
$c = ($v1/$v2)*100
If $c > 100 Then
$c = $c-100
ElseIf $c < 100 Then
$c = 100-$c
ElseIf $c = 100 Then
$c = 0
EndIf
$c = StringSplit($c,".")
$cf = $c[1]
If StringLeft($c[0],2) > 50 Then $cf = $cf+1
ToolTip($cf & "%")

If $cf > 0 Then
_ScreenCapture_Capture(@WorkingDir & "test" & $p & ".jpg")
$p = $p+1
EndIf
WEnd

Func prosses()
For $x = $rxmax To $xmax
For $y = $rymax To $ymax
;ToolTip($x & "," & $y & " - " & $v)
$var = PixelGetColor($x,$y)
$v = $v+$var
$y = $y+$rymax
Next
$x = $x+$rxmax
Next
Return $v
;MsgBox(0,"",$v)
EndFunc

It's amazing how simple it is ...

Indeed, it does not check every pixel on purpose because it will take a long time.

It check 84 pixels which represent all the pixels on the screen.

Edited by Guest
Link to comment
Share on other sites

Well I do not think that AutoIt is ideally suited to such a project, I'd go for a lower level

language such as C++ or even assembly.

I'm not suggesting it's impossible, but I'd guess it is in pure AutoIt, so it looks as though it will

be up to you to create this functionality, because it does not exist here on the forum as far as I know.

For a start you should take a look at http://ffmpeg.org/ffmpeg.html to see if that might be of use.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Well I do not think that AutoIt is ideally suited to such a project, I'd go for a lower level

language such as C++ or even assembly.

I'm not suggesting it's impossible, but I'd guess it is in pure AutoIt, so it looks as though it will

be up to you to create this functionality, because it does not exist here on the forum as far as I know.

For a start you should take a look at http://ffmpeg.org/ffmpeg.html to see if that might be of use.

Okay. Another way is more possible now is a script even written in another language Which only convert video file to many pictures.

Will be lots of pictures .. Then the script I write in autoit, will filter out most of the photos ..

I just need such a script ..

Link to comment
Share on other sites

Well look on search engine, there is not one here, but plenty with a search.

vlc media player will even do it via command line, amongst others.

I little effort (which does not translate as asking someone to search for you) goes a long way.

Best of luck.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...