media

Recommended Java library for creating a video programmatically [closed]

耗尽温柔 提交于 2019-12-02 16:15:59
Can anyone recommend a Java library that would allow me to create a video programmatically? Specifically, it would do the following: take a series of BufferedImages as the frames allow a background WAV/MP3 to be added allow 'incidental' WAV/MP3s to be added at arbitrarily, programmatically specified points output the video in a common format (MPEG etc) Can anybody recommend anything? For the picture/sound mixing, I'd even live with something that took a series of frames, and for each frame I had to supply the raw bytes of uncompressed sound data associated with that frame. P.S. It doesn't even

Hybris MediaModel how to get Bytes

蓝咒 提交于 2019-12-02 13:49:52
问题 Is there any way in Hybris to obtain all the bytes from a MediaModel ? When I want to instantiate a PdfReader , I need to pass either the Path of the File OR the ByteArrayInputStream. How can I transform the MediaModel into a Byte Array? 回答1: You can use MediaService @Resource private MediaService mediaService; //... final MediaModel mediaModel= mediaService.getMedia("mediaName"); final InputStream inputStream = mediaService.getStreamFromMedia(mediaModel); Then you can pass InputStream or

@media min-width not being recognised by firefox 8

与世无争的帅哥 提交于 2019-12-02 12:37:03
问题 I have been using media queries for the first time, and things going well, but seem to have encountered a strange problem. here is my css: @media only screen and (min-width:481px) and (max-width:768px) { /* tablet portrait */ css here } @media only screen and (min-width:321px) and (max-width:480px) { /* mobile landscape */ css here } @media only screen and (max-width:320px){ /* mobile portrait */ css here } Everything works fine in Chrome, and the stylesheets are implemented as expected. In

play <audio></audio> file in django template

对着背影说爱祢 提交于 2019-12-02 11:11:06
I've been struggling with this for so long that I'm bordering depression. I have a model called "Song" that looks like this. from django.db import models class Song(models.Model): title = models.CharField(max_length=100) songfile = models.FileField() duration = models.FloatField() isPlaying = False def __str__(self): return self.title When you upload an mp3 file from the index page, it creates an instance of this model and stores the file in myapp/songdir/ using this view: def home(request): if request.method == 'POST': form = UploadForm(request.POST, request.FILES) if form.is_valid(): song

Google action MediaResponse not working on some devices

最后都变了- 提交于 2019-12-02 09:12:05
we are currently playing around with newly launched https://developers.google.com/actions/reference/rest/Shared.Types/AppResponse#mediaresponse According to documentation we will receive a final Response after media is finished playing. This works well in simulator but on mobile devices and speakers it works intermittently We only get this call back 2 or 3 times and sometimes never get it on either devices. As it works few times we are sure it's just google engine but want to make sure we are not doing anything wrong ourselves. I am using my own backend and have our engine (Action SDK). I am

play <audio></audio> file in django template

巧了我就是萌 提交于 2019-12-02 08:49:15
问题 I've been struggling with this for so long that I'm bordering depression. I have a model called "Song" that looks like this. from django.db import models class Song(models.Model): title = models.CharField(max_length=100) songfile = models.FileField() duration = models.FloatField() isPlaying = False def __str__(self): return self.title When you upload an mp3 file from the index page, it creates an instance of this model and stores the file in myapp/songdir/ using this view: def home(request):

Running ExtractDecodeEditEncodeMuxTest outside of testcase on Android

[亡魂溺海] 提交于 2019-12-02 08:29:21
问题 I am trying to add functionality to extract, decode, edit, encode and mux a video on Android. Therefore, I found some very useful implementation, which is part of the Android CTS ExtractDecodeEditEncodeMuxTest. Unfortunately, the code only works if it is executed as part of the testcase. I tried to execute it from a normal activity and get: E/ExtractDecodeEditEncodeMuxTest (18781): java.lang.IllegalStateException: Failed to stop the muxer W/System.err(18781): java.lang.RuntimeException:

Running ExtractDecodeEditEncodeMuxTest outside of testcase on Android

狂风中的少年 提交于 2019-12-02 07:24:25
I am trying to add functionality to extract, decode, edit, encode and mux a video on Android. Therefore, I found some very useful implementation, which is part of the Android CTS ExtractDecodeEditEncodeMuxTest . Unfortunately, the code only works if it is executed as part of the testcase. I tried to execute it from a normal activity and get: E/ExtractDecodeEditEncodeMuxTest (18781): java.lang.IllegalStateException: Failed to stop the muxer W/System.err(18781): java.lang.RuntimeException: Surface frame wait timed out W/System.err(18781): at ...OutputSurface.awaitNewImage(OutputSurface.java:216)

Setting audio file media metadata in Android (ID3)

[亡魂溺海] 提交于 2019-12-02 06:08:15
I am trying to find out if there is a way to set media metadata (mainly ID3 such as artist, album, song, ...) on an anudio file in Android. I have noticed that it is possible to retrieve such information using MediaMetadataRetriever but cannot find out a way to set it. Can you please help? Is it possible? Lukas Knuth You could use the DataStorage to get a File-Object from the MP3-File you want to edit and then use a ID3-Tag Library like Jaudiotagger to edit the ID3-Tags. From the CLI, you can use id3ed . Just build it using Android's NDK, then you can use adb debug bridge to access the shell.

@media min-width not being recognised by firefox 8

这一生的挚爱 提交于 2019-12-02 06:04:23
I have been using media queries for the first time, and things going well, but seem to have encountered a strange problem. here is my css: @media only screen and (min-width:481px) and (max-width:768px) { /* tablet portrait */ css here } @media only screen and (min-width:321px) and (max-width:480px) { /* mobile landscape */ css here } @media only screen and (max-width:320px){ /* mobile portrait */ css here } Everything works fine in Chrome, and the stylesheets are implemented as expected. In firefox, hoever, the last stylesheet (max-width:320px) isn't picked up. I've done alot of searching and