moviemasher / moviemasher.js

JavaScript library for realtime, browser-based video and audio editing
Mozilla Public License 2.0
305 stars 62 forks source link

playback quality #11

Closed think-01 closed 6 years ago

think-01 commented 7 years ago

when I embed mplayer in a default way i.e.:

var context = document.getElementById("mm-canvas").getContext('2d');
mm_player = MovieMasher.player({canvas_context: context});
MovieMasher.register(MovieMasher.Constant.filter, [
    { "id":"overlay", "source": "//static2.rekt.gg/js/filters/overlay.js" },
    { "id":"scale", "source": "//static2.rekt.gg/js/filters/scale.js" },
    { "id":"setsar", "source": "//static2.rekt.gg/js/filters/setsar.js" }
]);
mm_player.mash = "....";

it results with a player element displaying frames in a dramatically low quality ( 300x150 png ) how can I set a different quality? ( raw frames downloaded by player from ny server are 768x432 jpg )

also how can I set frames dimensions different than 768x432? I tried to set 'dimensions' firld to sequence output object in import job but w/o any effect...

Thanks in advance! Slaw from rekt.gg team

syntropo commented 7 years ago

If you're wanting to change the size of the image sequence that's generated for uploaded files, change import_dimensions in moviemasher.ini file.

think-01 commented 7 years ago

okay and how about mmPlayer sequence playback quality?

I mean my sequence is 768x432 jpg ( mmPlayer downloads these frame files ) but its played back as 300x150 png ( when I 'save image as' from player object ) how can I change that?

syntropo commented 7 years ago

Oh, you mean the visible size of the player in the HTML? That's controlled in app.css - the amm-player-panel class.

think-01 commented 7 years ago

hmmm where is app.css? I can't see it on github repo? also the frame bitmaps are being converted from 768x432 jpg to 300x150 png in the meantime... ( mmPlayer downloads 768x432 jpg files but displays 300x150 png )

syntropo commented 7 years ago

That file is in the angular-moviemasher project.

think-01 commented 7 years ago

okay, so if we use just moviemasher.js w/o angular frontend and we embed mmPlayer just like you showed in docs i.e.:

var context = document.getElementById("mm-canvas").getContext('2d');
mm_player = MovieMasher.player({canvas_context: context});
MovieMasher.register(MovieMasher.Constant.filter, [
    { "id":"overlay", "source": "//static2.rekt.gg/js/filters/overlay.js" },
    { "id":"scale", "source": "//static2.rekt.gg/js/filters/scale.js" },
    { "id":"setsar", "source": "//static2.rekt.gg/js/filters/setsar.js" }
]);
mm_player.mash = "....";

then how can I force player to use frame bitmaps bigger than default 300x150px? Where original frames ( downloaded by player from server ) get resampled to lower resolution?

syntropo commented 7 years ago

It all hinges on the size of canvas associated with the context you pass when constructing the Player instance - in this case, whatever element has ID mm-canvas.

think-01 commented 7 years ago

Hi @syntropo , on my AWS moviemasher AMI in /var/www/config/moviemasher.ini I have

; import_dimensions: Size of low resolution image frames displayed in applet
; import_dimensions=1536x864
; import_dimensions=1280x720
; import_dimensions=768x432
; import_dimensions=512x288
import_dimensions=256x144

but still it generates all SEQUENCE as 1280x720x10 how can I change that?

I also send 768x432 in outputs->dimensions for sequence in transcode job but this does not help either.

syntropo commented 7 years ago

Could you post the job JSON itself?

think-01 commented 7 years ago

here you go: http://www.jsoneditoronline.org/?id=81ebad5d768904cfaeef9de36f583286