Video format data

This topic has been viewed 7440 times and has 5 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Video format data

Post by enkonyito »

Following this , I wanted to test the addition of the Speed and Frame rate fields in the video panel.

Image


I kept the original VideoFormat constructor by replacing the predefined frameRate.

Code: Select all

new VideoFormat(VideoFormat.JPEG, new Dimension(Width, Height), Format.NOT_SPECIFIED, Format.byteArray, Format.NOT_SPECIFIED)
I modified the getVideoFormat method for which the videoFormat.getFrameRate() value is not taken into account because it is directly retrieved from the new Frame rate field.

When I play a video, the change in frame rate is perceptible but the value of the recorded data is set at 15 frames/sec.
video test_SH3D-6.0beta_320x240 pixels - 4-3 - 25 frames-seconde.mov
video test_SH3D-6.0beta_320x240 pixels - 4-3 - 50 frames-seconde.mov
EnkoNyito
User avatar
svedel77
Posts: 54
Joined: Thu May 10, 2018 10:27 am
Country: +45 Denmark

Re: Video format data

Post by svedel77 »

If this is getting to work, I'll be so happy!
Matthenry3
Posts: 1
Joined: Mon Oct 01, 2018 4:12 pm
Country: Bangladesh

Re: Video format data

Post by Matthenry3 »

Looks good. Hope this will work perfectly.
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Re: Video format data

Post by enkonyito »

By creating a new instance,

Code: Select all

videoFormat = new VideoFormat(VideoFormat.JPEG, new Dimension(videoFormat.getSize().width, videoFormat.getSize().height), Format.NOT_SPECIFIED, Format.byteArray, controllerFrameRate)
the frame rate is updated with each change and the correct value appears in the recorded video data.

Image
userGuideExample_SH3D-6.0beta_speed 0.5x_frame rate 60_PVR-1.6betaTest

Regarding the Speed field, the value is expressed in factor as for most video players/editors. Normal speed (1.0x) is the default speed of SH3D.
Its value change is taken into account when the play/pause button is pressed.
EnkoNyito
User avatar
bdfd
Posts: 2614
Joined: Sat Mar 29, 2014 7:17 am
Country: LILLE, Les Hauts de France, Western Europa

Re: Video format data

Post by bdfd »

Did you test this path in quality 3 or 4 ?

If yes, what was the calculation time ?
.
Evil progresses when good people do nothing!
---
SH3D 7.1 and nothing else - W11 64b in 4K
pabloab
Posts: 3
Joined: Wed Feb 22, 2023 10:41 pm

Re: Video format data

Post by pabloab »

I tweak the old .mov to be upscaled, slower, and in h264 .mp4, WhatsApp shareable.

Code: Select all

#!/usr/bin/env bash
for file in *.mov; do
  scale_factor="2"
  slow_factor="4"
  ffmpeg -y \
    -i "${file}" \
    -c copy \
    -an \
    -vf scale=iw*${scale_factor}:ih*${scale_factor} \
    -filter:v "setpts=${slow_factor}*PTS" \
    -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p \
    "${file%.*}_h264.mp4"
    # -stream_loop 3 \
done
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest