i want to merge downloaded adaptive streams using pytube. My attempts with ffmpeg were futile. always the same error: "could not find codec parameter..."
the command i used is shown in the image.
Please help me
enter image description here
I tried the command in the image
I'm using Processing 4.0b7 (also tried with previous versions), and installed its Video Library. I have the following code (Im literally just trying to play a video):
import processing.video.*;
Movie video;
void setup() {
size(640, 480);
video = new Movie(this, "video.mp4");
video.play();
}
void draw() {
if (video.available()) {
video.read();
image(video, 0, 0);
}
}
I have "video.mp4" on a folder named data, on the same file as the sketch.
Whenever I try to run the code, I get the following error:
(java.exe:28748): GLib-CRITICAL **: 19:04:53.545: g_dir_open_with_errno: assertion 'wpath != NULL' failed
Cannot load GStreamer plugins from C:\Users\Estêvão\Documents\Processing\libraries\video\library\windows-amd64\gstreamer-1.0
Processing video library using bundled GStreamer 1.16.2
java.lang.IllegalArgumentException: No such Gstreamer factory: playbin
at org.freedesktop.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:307)
at org.freedesktop.gstreamer.Element.makeRawElement(Element.java:104)
at org.freedesktop.gstreamer.elements.PlayBin.<init>(PlayBin.java:118)
at processing.video.Movie.initGStreamer(Unknown Source)
at processing.video.Movie.<init>(Unknown Source)
at ex5_2_1.setup(ex5_2_1.java:26)
at processing.core.PApplet.handleDraw(PApplet.java:2142)
at processing.awt.PSurfaceAWT$9.callDraw(PSurfaceAWT.java:1440)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:356)
RuntimeException: Could not load movie file video.mp4
RuntimeException: Could not load movie file video.mp4
RuntimeException: Could not load movie file video.mp4
I'm using Windows 11. I think the problem is coming from the library instalation, but I've asked for friends who have their video working to send me their Processing files, and I'm still getting the same problem. Also deleted everything Processing-related and reinstalled it several times, and I still can't get it to work. Other libraries such as sound are working.
I've finally solved the problem.
The sketch was on a folder with special characters. I had already changed the name of the folder, but I kept getting the same bug, so I assumed that wasn't the problem.
But well, my name has a special character as well, therefore, so does my username. Processing goes through the Windows user folder before getting to the sketch folder, and turns out that's what was making the program not work.
Thank you all for your help, anyways!
Unfortunately I won't have the time to debug this in detail (e.g. if it's something to do with special(unicode) characters in paths or something deeper within the processing-video library).
For now I suggest using an older version of Processing.
I can confirm the video library works on Windows 11 with Processing 3.5.4 and the Procecessing video 2.0 library (Thank you #cSharp for the helpful comments)
Update I can confirm you can use Processing video 2.1 with Processing 4.0b7 on Windows 11.
You would need to:
remove the current video library
unzip video.zip (link to video version 2.1 for Processing4 above)
restart Processing (if you had it open already)
You can run your code or Processing > Examples > Contributed Libraries > Video Library for Processing 4 > Movie > Loop to test.
In my project I'm positioning 3d files using ARKit. I'm able to load .dae and .obj format models.
Is there any way I could load .fbx files?
Updated: 14th January, 2023.
Info about .FBX conversion you can find HERE.
ARKit is not capable of loading 3D models in a scene. It's a job for SceneKit or RealityKit. However both frameworks don't directly support .FBX file format. You can implement a reading of .FBX file format via ModelIO but it's a real challenge for any developer, because you need to figure out how to deal with hierarchies, materials, lighting, animation, etc.
The best way to prepare your model to work in SceneKit and RealityKit is to convert it into .USDZ file via usdzconvert command found in Xcode's command line tools. To convert .FBX file into .USDZ just execute the following command in Terminal:
usdzconvert ~/Desktop/fileName.fbx
There are also additional flags for applying render passes generated in 3D package:
usdzconvert fileName.fbx -diffuseColor albedo.png
-opacity transparent.png
-metallic chrome.jpg
-roughness rough.jpg
-normal bump.png
-occlusion ao.jpg
-emissiveColor emit.png
-clearcoat varnishing.jpg
-clearcoatRoughness ungloss.png
To use this command line conversion tool, download USDZ Tools from Apple developer resource and FBX Python SDK from Autodesk developer resource. Don't forget to setup a global variables in macOS.
If you prefer GUI, use Reality Converter app.
June 2020
To convert FBX to USDZ you need the usdzconvert utility from Apple. To get it to work, read the install instructions carefully.
You will need both the "FBX Python SDK" and the "FBX Python Bindings" from here.
Please note that the current (June 2020) version of the FBX Python SDK is 2020.1, so you'll have to change the following line in USB.command
# export PYTHONPATH=$PYTHONPATH:/Applications/Autodesk/FBX\ Python\ SDK/2019.0/lib/Python27_x86
to
export PYTHONPATH=$PYTHONPATH:/Applications/Autodesk/FBX\ Python\ SDK/2020.1/lib/Python27_ub
To use usdzconvert, double-click /Applications/usdpython/USD.command and type usdzconvert into the terminal that opens up.
That's it!
You can download Reality Converter app from Apple. This allows converting fbx to usdz.
Try using AssimpKit to use your fbx file in a SceneKit scene.
AssimpKit currently supports 29 file formats (including fbx) that allows you to use
these files directly in SceneKit without having to convert these to
any of the files that SceneKit or Model IO supports thereby saving an
extra step in your asset pipeline.
Other supported file formats:
3d, 3ds, ac, b3d, bvh, cob, dae, dxf, ifc, irr, md2, md5mesh, md5anim,
m3sd, nff, obj, off, mesh.xml, ply, q3o, q3s, raw, smd, stl, wrl, xgl,
zgl, fbx, md3
You cannot use FBX directly in XCode/Scenekit (or at least not yet).
You need to convert the file ether to .obj or (what I prefer) .dae
Using i.Ex Blender as conversion tool works usually without any issues.
Then you can, if you desire, convert it to a .scn file from XCode directly. (according to Apple a .scn file has a smaller size and loads faster)
I'm working on a project where i have to take an image and convert the textual context into sound.At first stage i have to convert those image into text(english).I'm using tessaract API's for converting that image into text(en).I have been trying to follow up tessaract
tutorials for completing the steps.But it is my unfortunate that i haven't found any tutorils which give me the image to text conversion without any error.
Last time i got a template from online.But it is not working and also not showing any error.
https://github.com/gali8/Tesseract-OCR-iOS
If anyone please check the link and please tell me why it is not running on iOS device or simulator.I have been using Xcode 5.1.I also want a better reference or suggestion regarding my problem.Thanks!
Does anyone out there have a process or solution for displaying a corrupted image using wxpython. To be clear the image is corrupted but ACDSEE is still able to display it (all be it displayed corrupted), also the default windows fax/image viewer can display the image (all be it corrupted). When I try to process the image with wx I get an error and my script stops:
image.thumbnail((NewWidth, temp_height), Image.ANTIALIAS)
File "C:\Python27\lib\site-packages\PIL\Image.py", line 1559, in thumbnail
self.load()
File "C:\Python27\lib\site-packages\PIL\ImageFile.py", line 215, in load
raise_ioerror(e)
File "C:\Python27\lib\site-packages\PIL\ImageFile.py", line 52, in raise_ioerror
raise IOError(message + " when reading image file")
IOError: broken data stream when reading image file
I realize that I could just find where the error occurs and "skip" any corrupted images but I would rather be able to display them (than skip them) despite the corruption, as the two programs I mention above can. Any help/suggestions/guidance would be appreciated.
FYI. Not downing wx, I LOVE it! Ms Paint cannot display the image, it gracefully fails and gives a message that the image is corrupted (the equivalent of skipping) and MS Picture Manager actually hung on the image. So if the consensus is that wx just can't handle corrupted images I am willing to accept that and will add "skipping" code for corrupted images, but I wanted to ask the question before I did so.
I don't think wxPython supports this currently. I would just create some kind of default broken image or message that you can display instead. You might also try using the Python Imaging Library itself to open the image.
If you can find an open source image viewer that does work with corrupt images, than you should take a look at their code to see if we could patch wxPython.