Questions tagged [media]
Media are the storage and transmission channels or tools used to store and deliver information or data.
media
3,365
questions
333
votes
15
answers
463k
views
Convert audio files to mp3 using ffmpeg [closed]
I need to convert audio files to mp3 using ffmpeg.
When I write the command as ffmpeg -i audio.ogg -acodec mp3 newfile.mp3, I get the error:
FFmpeg version 0.5.2, Copyright (c) 2000-2009 Fabrice ...
299
votes
17
answers
390k
views
Django MEDIA_URL and MEDIA_ROOT
I'm trying to upload an image via the Django admin and then view that image either in a page on the frontend or just via a URL.
Note this is all on my local machine.
My settings are as follows:
...
106
votes
8
answers
219k
views
Retrieving and Saving media metadata using FFmpeg
I want to read the metadata in media files and then save that metadata in a text/xml file, so that I can later insert that data in my database. I would prefer to use ffmpeg.
Also is the same thing ...
93
votes
2
answers
99k
views
What exactly is Fragmented mp4(fMP4)? How is it different from normal mp4?
Media Source Extension (MSE) needs fragmented mp4 for playback in the browser.
70
votes
4
answers
189k
views
Media queries in Sass
I am wondering if there is a way to write media queries in sass, so I can give a certain style between let's say: 300px to 900px
in css it looks like this
@media only screen and (min-width: 300px) ...
68
votes
11
answers
56k
views
Using cache in ExoPlayer
I'm looking for any example of implementing cache in ExoPlayer.
ExoPlayer has in its library different classes concerning cache and Google explain in this video that we can implement it with the ...
65
votes
2
answers
67k
views
How to record video from background of application : Android
I am developing an application which will be able to record video from background of application by using Service.
Problem description :
In my application recording will be scheduled. If user want ...
64
votes
10
answers
177k
views
Embedding Windows Media Player for all browsers
Edit: This question was written in 2008, which was like 3 internet ages ago. If this question is still relevant to your environment, please accept my condolences. Everyone else should convert into a ...
55
votes
5
answers
94k
views
Play sound using soundpool example
I would like to learn how to use soundpool method. I would like you to show me a very simple example that run 2 sounds.
53
votes
8
answers
120k
views
How do you get/set media volume (not ringtone volume) in Android?
Is there a way to get/set media volume? I have tried the following:
AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
int currentVolume = audio.getStreamVolume(AudioManager....
49
votes
3
answers
166k
views
Div show/hide media query
What code can I use to make a particular div show only if on a mobile width?
I have a 100% width full div at the top of my screen, would like it to only show when the device is specified as a mobile ...
48
votes
5
answers
73k
views
Do iPhone / Android browsers support CSS @media handheld?
I want to change my web page CSS for web browsers running on cell phones, like the iPhone and Android. I've tried something like this in the CSS file:
@media handheld {
body {
color: red;
}
...
47
votes
3
answers
86k
views
android.os.FileUriExposedException: file.jpg exposed beyond app through ClipData.Item.getUri()
I try to do a button that open the camera and take picture. my code is here
//for imports check on bottom of this code block
public class HomeProfileActivity extends AppCompatActivity {
//Button ...
45
votes
7
answers
49k
views
Django: how do you serve media / stylesheets and link to them within templates
Variations of this question have been asked, but I'm still unable to get my stylesheets to load correctly when my templates are rendered.
I'm attempting to serve static media from the Django process ...
41
votes
1
answer
18k
views
Access ordered images and video in same Cursor
I'm using the android.content.CursorLoader class to create two Cursor objects to access media stored on the user of my app's device. I'd like to give the user a grid view of their stored images and ...
38
votes
5
answers
38k
views
How to serve django media files via nginx ?
I'm new at Nginx, I've successfully bound my django project to Nginx. However I can't serve my static files and I guess I set my media folder's location wrongly. Here is my file tree:
root_directory
...
37
votes
3
answers
29k
views
Capturing Video with AVFoundation
I've been looking around on Stack and I have found similar questions to this, but none have worked for me. I am a complete novice to Swift 3.0. Essentially what I'm trying to do is record a video ...
37
votes
2
answers
46k
views
How to query Android MediaStore Content Provider, avoiding orphaned images?
I'm trying to provide an in-app Activity which displays thumbnails of photos in the
device's media store, and allow the user to select one. After the user makes a
selection, the application reads the ...
36
votes
3
answers
19k
views
How to create a custom media type (application/vnd) for a RESTful web service?
I'm playing with REST right now and thought I properly implement HATEOAS just to get all concepts right.
For that I want to create my own media types (application/vnd[...]+xml and application/vnd[...]...
35
votes
1
answer
23k
views
How to split video or audio by silent parts
I need to automatically split video of a speech by words, so every word is a separate video file. Do you know any ways to do this?
My plan was to detect silent parts and use them as words separators. ...
33
votes
2
answers
13k
views
Django upload_to outside of MEDIA_ROOT
My deployment script overwrites the media and source directories which means I have to move the uploads directory out of the media directory, and replace it after the upload has been extracted.
How ...
33
votes
5
answers
31k
views
Where to save pictures on Android?
My application uses quite a lot of pictures that are downloaded from the internet and cached locally on the Android phone. I am wondering, what is the correct way to save those pictures. There are ...
33
votes
4
answers
16k
views
How do you Require Login for Media Files in Django
I'm serving "sensitive" information in downloadable PDF's and Spreadsheets within a user registration section of a site.
Is there a way to allow the django authentication to secure this media without ...
33
votes
5
answers
26k
views
Recommended Java library for creating a video programmatically [closed]
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 ...
32
votes
4
answers
54k
views
List all music in MediaStore with the PATHs
Ok so I've been working on this project for a few days now and most of my time has been working out how to list all the music on a device in a LIST VIEW or something else, I have searched for a few ...
32
votes
7
answers
32k
views
Playing BG Music Across Activities in Android
Hello! First time to ask a question here at stackoverflow. Exciting! Haha.
We're developing an Android game and we play some background music for our intro (we have an Intro Activity) but we want it ...
28
votes
3
answers
13k
views
Pre-Select Images when opening WordPress 3.5 media manager
I've been playing around with the new media manager in WordPress and had some fun with it, but have reached the point where I'm banging my head against a wall.
I have a custom meta box that I'd like ...
27
votes
10
answers
63k
views
Android: save a file from an existing URI
How to save a media file (say .mp3) from an existing URI, which I am getting from an Implicit Intent?
27
votes
1
answer
58k
views
What does -webkit-min-device-pixel-ratio: 2 stand for?
@media only screen and (max-device-width:480px),
only screen and (-webkit-min-device-pixel-ratio: 2)
{ /*iphone css*/ }
max-device width makes sense but pixel ratio doesn't make any sense to me. ...
26
votes
4
answers
37k
views
ckeditor doesn´t read media embed code
I use the media embed plugin for ckeditor. It works fine, the code is correctly saved in the database and youtube, soundcloud etd. players display ok on the page. But when the user goes to his ...
24
votes
9
answers
48k
views
Android - .nomedia not working for images
I have images, which are read from sdcard only by particular application so I want to hide it from image gallery. I have put .nomedia file in it, but this file is ignored, images are still showing in ...
22
votes
3
answers
33k
views
navigator.getUserMedia not working on Android / Chrome
do you have any idea of why the following code doesn't work on Android/Chrome?
It works well on Desktop/Chrome.
function console_log(data) {
console.log(data)
var data_str = String(data);
...
22
votes
1
answer
4k
views
https://www.instagram.com/anyuser/media/ not working anymore [closed]
I have a app use this request url https://www.instagram.com/anyuser/media to get public ig json,
but now it just not working anymore.
I've checked Instagram blog, and no any announcement are found.
...
21
votes
1
answer
14k
views
How to use Blob URL, MediaSource or other methods to play concatenated Blobs of media fragments?
Am attempting to implement, for lack of a different description, an offline media context.
The concept is to create 1 second Blobs of recorded media, with the ability to
Play the 1 second Blobs ...
20
votes
3
answers
40k
views
How to target CSS for iPad but exclude Safari 4 desktop using a media query?
I am trying to use a media rule to target CSS to iPad only. I want to exclude iPhone/iPod and desktop browsers. I would like to to also exclude other mobile devices if possible.
I have used
<style ...
20
votes
2
answers
50k
views
show/hide div based on browser size using ONLY css?
I am a trying to get some divs to show/hide based on browser size, using only css media queries... but nothing seems to be working... please help if you can and let me know what i'm doing wrong... ...
19
votes
6
answers
32k
views
time length of an mp3 file
What is the simplest way to determine the length (in seconds) of a given mp3 file, without using outside libraries? (python source highly appreciated)
19
votes
7
answers
25k
views
Django: serving ADMIN media files
I've been successfully serving media files for the normal MEDIA files, but when I tried serving admin media files, I failed. please kindly help me locating the problem, as I've tried to troubleshoot ...
19
votes
3
answers
33k
views
How to create equalizer for android
I want to create simple equalizer for android. How can I do it?
Try to find some methods in MediaPlayer class. But all my attempts failed.
18
votes
3
answers
33k
views
What is the best way to stream a audio file to website users/listeners [closed]
I'm developing a music site which will stream audio files stored in a server to users, audio files will be played through flash player placed in a webpage..
As I heard I need to use a streaming ...
18
votes
6
answers
42k
views
Android sdk cut/trim video file
Is there any way to cut a video (mp4 or 3gp) on android, like use only the last 5 seconds of the movie... on iphone this is possible using the AVAssetExportSession but on android I haven't found ...
18
votes
3
answers
25k
views
How to resolve iOS 11 Safari getUserMedia "Invalid constraint" issue
I'm attempting to run the following code in Safari in iOS 11. It should prompt the user to give access to their devices camera and then display it in my <video autoplay id="video"><...
18
votes
2
answers
15k
views
Jersey REST support resume/media streaming
I need to support resume on Jersey REST, I'm trying to do it this way:
@Path("/helloworld")
public class RestServer {
@GET
@Path("say")
@Produces("audio/mp3")
public Response getMessage(@...
18
votes
4
answers
32k
views
Media Information Extractor for Java [closed]
I need a media information extraction library (pure Java or JNI wrapper) that can handle common media formats. I primarily use it for video files and I need at least these information:
Video length (...
17
votes
3
answers
11k
views
How to use MediaSessionCompat?
How do I use a MediaSessionCompat? Can someone give a simple working example?
I've found some, but they use:
MediaSessionCompat _mediaSession = new MediaSessionCompat(context, "tag");
This gives ...
17
votes
4
answers
27k
views
print css: fit in one page
In my page there's only one image. Kind of 1500x3000 px.
In the printer, I need that this image's maximum width to be the width of the page, so I did: width 100% in the css, and it works.
But the ...
16
votes
6
answers
70k
views
How to play sounds with JavaFX
I just started working with JavaFX. I know how the basics of it work. I tried to use the media and the mediaplayer classes to play a sound, called "sound.mp3". I am programming in eclipse, and I have ...
16
votes
2
answers
19k
views
Stop / kill WebRTC media stream
How to completely kill the WebRTC media stream?
MediaStream.stop() is not working anymore.
Testing in Chrome 47, Mac OS 10.11.
16
votes
3
answers
8k
views
Wordpress: Remove attachment fields
How do I remove attachment fields, like description and alt in media library of Wordpress attachments?
The following code use to work on old Wordpress versions (pre 3.5):
function ...
16
votes
5
answers
6k
views
Android - Image Picker, Wrong Image
I am starting a request for an image pick:
Intent intent = new Intent();
intent.setType( "image/*" );
intent.setAction( Intent.ACTION_GET_CONTENT );
startActivityForResult( Intent.createChooser( ...