Forum > Audio and Video

NON(!)-EXE FFPlay4Laz

<< < (26/28) > >>

BosseB:
So I downloaded the SDL2.dll file as described and came a bit further...

I am using the default command in the top editbox but I replaced the text describing the window title where the screen data should come from and some metrics too.
In my case this title in the real case is very long so I used a Youtube video as test instead.
I wonder if there is not a possibility to define the source window using its handle instead? I can easily enumerate the windows and select the one with the correct listed title but use the handle value instead for the ffmpeg command.
Otherwise is there a flag to tell ffmpeg to use a partial match for the title?

I tested with a Youtube video playing in a FireFox window but no matter what I did the following happened:
- I used this as the "Grab" command:
--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ----f gdigrab -framerate 25 -offset_x 60 -offset_y 200 -video_size 815x443 -show_region 1 -i desktop "(4) cnn - YouTube - Mozilla Firefox"- When I clicked the Grab button a white rectangle briefly appeared in the upper left corner area of the screen (probably the area of screen that would be recorded?).
- Then it disappeared and an ffmpeg error was generated and nothing more happened.


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---*** FFProcess "ffmpeg.exe" started ***> ExitStatus CHANGED to: 259R LastLn[0000]: [gdigrab @ 0000021d1198ea00] Capturing whole desktop as 815x443x32 at (60,200)> ExitStatus CHANGED to: 1E ERROR: ExitCode=1 -> FFProcess stopped 'OnFFmpegError'.
What do I do then???

And where is the grabbed video file supposed to wind up?

metis:
@BosseB

Please, please, please,
put Questions, that are related to Recording with 'FFmpeg' into my FFGrab4Laz-Thread:  :'(
https://forum.lazarus.freepascal.org/index.php/topic,43411.0.html
(And remove Your last two Post from this Thread, of course.)

Then I will answer to all of Your Questions, e.g.:
Remove "(4) cnn - YouTube - Mozilla Firefox" and specify an OutputFile instead, like "grabbed.mkv".
I really do not want to merge Recording-Issues with Playing-Issues - they are too different !  ;D

metis:
@BosseB
You find my Answer to Your last 2 Posts at its correct Place here.

BosseB:
Hi again @metis
I have used your info plus PasLibVlc to manage videos downloaded from streams and Youtube in order to edit out the commercials before viewing the videos.
My edit application plays the video and I can step through it in various step sizes to find and set clip points (in seconds) where the commercials start and end.
Then the application can compile a call to ffmpeg to:
1) Extract every active video section into a tmp_xx.mp4 file
2) Combine these video files into a single complete (minus the commercials) video file.

This works fine except for a minor issue I have been wondering about, so here is a question regarding this:

It turns out that if I use ffmpeg to extract  from a specific time into the video for a set duration, both in seconds, then the resulting video does not really start at the point I wanted.
It seems to always contain something before the clip start point, it can be 1-2 seconds but sometimes longer than that.
How come this happens?
Are mp4 videos quantized such that there is a video "atom" which cannot be divided and any clip will be done at "atom" borders?
I figured it should be possible to cut at frame borders (1/25 or 1/30 s) but it does not seem like this is happening.
The command I use to extract the tmp files is like this example (here the start is 1250s into the video and lasts for 600 s):

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---ffmpeg -ss 1250 -i input.mp4 -to 600 -c copy output.mp4

metis:
@BosseB


--- Quote ---This works fine except for a minor issue ... It turns out that if I use ffmpeg...
--- End quote ---
I'm really pleased, that I could help You with Your VideoEditor-App, but
I still don't know, why You keep on Putting Your Questions at the wrong Place.  %)

This Thread is - and always will be - about Streaming/Playing with FFmpeg-Libraries and Lazarus.

Composing FFmpeg-CommandLines is totally different from Writing Code for FFmpeg-Libraries.
Therefore, their Issues and Points for Discussion are not comparable at all, and I do not want to merge them in this Thread !  ;D

All Questions related to FFmpeg-CommandLine-Tools, like 'ffmpeg.exe', are welcome in my FFGrab4Laz-Thread:
https://forum.lazarus.freepascal.org/index.php/topic,43411.0.html.  ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version