youtube-dl: Different format selector for portrait and landscape videos - youtube-dl

Currently I use a config file with -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' to download the videos at 480p. But the issue is that when the video is in portrait mode, I need it in 720p. Is there a way to put it in the same config file without creating a separate portrait config?

Related

How to fix with custom image from slurm-gcp?

I distributed slurm-gcp using Terraform through the GitHub and it was available successfully. Source:
Slurm on Google Cloud Platform
But I want to change the image I use when using node to a custom image.
I am trying to edit /slurm/scripts/config.yaml.
Among the contents of the file:
image: projects/schedmd-slurm-public/global/images/family/schedmd-slurm-20-11-7-hpc-centos-7
I want to edit the part.
How to reroute this part to my custom image?
First you need to create your own image.
Create a new VM with the image you want to modify; make appropriate changes and stop the VM. Then create a new image from the VM's disk.
Next create a custom image from that disk and your path in the config.yaml file can look like this:
image: projects/my-project-name/global/images/your-image-name
You can get exact path to your custom image by running:
wb#cloudshell:~ (wb)$ gcloud compute images describe your-image-name | grep selfLink
selfLink: https://www.googleapis.com/compute/v1/projects/wb/global/images/your-image-name

How to push images with appium on AWS device farm devices

I've created a code, that works for pushing images with appium locally on both android and iOS devices.
the images are in the appium project's /src/main/resources/images folder
String basePath = System.getProperty("user.dir");
String imagePath = "/src/main/resources/images/testImage.jpeg";
File imageToPush= new File(basePath+imagePath);
The problem is, that when this code runs on AWS I cannot find the images ( and don't know how/where to find them).
I've tried multiple ways to construct the basePath but so far with no success
According to Appium push file documentation, you can provide the directory to place the files.
You can try to push the file using the Android SD card directory or the iOS application data folder directory as the parameter. You can then access the files in Android SD Card or the iOS application data folder.
Alternatively, you can also use the Add Extra Data feature to add the images in form of a zip file when you schedule a run on the console or you provide a extraDataPackageArn in the schedule-run CLI command. extraDataPackageArn is generated from the create-upload CLI command. In this case, you can use create-upload CLI command on the images in form of a zip file you want to push to the device to get the extraDataPackageArn.
You can then access the extra data in Android SD card or the iOS application data folder according to https://aws.amazon.com/device-farm/faqs/,
Q: I’d like to supply media or other data for my app to consume. How do I do that?
You can provide a .zip archive up to 4 GB in size. On Android, it will be extracted to the root of external memory; on iOS, to your app’s sandbox.
For Android expansion files (OBB), we will automatically place the file into the location appropriate to the OS version.

Portrait video converted to Landscape in AWS Elemental Mediaconvert

I'm using AWS 'Elemental MediaConvert' service to get the HLS format of the uploaded video. We are using this as Video-On-Demand service. Everything works fine. Video that is been uploaded in 's3-input' bucket will taken by lambda service and processed by boto3 elemental mediaconvert client. Out of the video will be stored in 's3-output' bucket. One problem is Portrait videos are appearing in Landscape mode in 's3-output' bucket and also when HLS url is played in mobile/browser.
Make sure you use the latest version of boto3 if you use it at all. Anyways
Add "Rotate": "AUTO" to VideoSelector in inputs. In this case, EMC will try to automatically rotate the video based on metadata if it's available.
These links were really useful for me:
List https://www.mandsconsulting.com/lambda-functions-with-newer-version-of-boto3-than-available-by-default/
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/mediaconvert.html
Well... In your place here is what I'd do... I'll go to the last "job"... Go to the "output" section. Then go to the output formats sub-sections... and set the size of the desired output Manually.
I don't think Elemental MediaConvert has presets for vertical video. It's a pretty new (awesome) product.
Good luck!

Sitecore - How to load images on CD server from CM server?

I have two separated servers: one is CD server and one is CM Server. I upload images on CM server and publish them. On the web database, although I saw the the images under Media Library item
But they aren't displayed on CD server (e.g on website), it indicates that the images not found. Please help me to know how I can solve that problem or I do need some configuration for that.
Many thanks.
Sitecore media items can carry actual media file either as:
Blob in the database - everything works automatically OOB
Files on the file system - one needs to configure either WebDeploy, or DFS
Database resources are costly, you might not want to waste them on something that can be achieved by free tools.
Since WebDeploy by default locates modified files by comparing file hashes between source, and target, it will become slower after a while.
You might have uploaded image in media library as a file. As such, image is stored as a File on file system. To verify this, your image item in media library will have a path value set in 'File Path' field of your image item. Such files have to be moved to file system of CD server as well.
If you uploaded your images in bulk, you can store them as blob in DB by default rather than as a File in file system using following setting-
<setting name="Media.UploadAsFiles" value="false">

Artifacts on video transcoded from GIF by Elastic Transcoder

I'm trying to transcode GIF to MP4 with H.264 inside using AWS Elastic Transcoder. I noticed strange color artifacts on transcoded video: color stripes on the right.
Original GIF:
Transcoded video screenshot:
I've tried to change settings, even changed output format to WEBM+VP8: same result. My local ffmpeg has no such issue, so I think there is something on ET side.
My MP4 settings, if what:
Do you have any ideas?
The width of the image is 381, an odd number that might be getting mishandled during re-scaling.
Try cropping off one pixel on the right to make the image 380x150.