Questions tagged [media]

Media are the storage and transmission channels or tools used to store and deliver information or data.

media
Filter by
Sorted by
Tagged with
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 ...
Hrishikesh Choudhari's user avatar
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: ...
Dan's user avatar
  • 3,111
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 ...
Rahul Patwa's user avatar
  • 2,419
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.
Aditya Gupta's user avatar
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) ...
Maciej S.'s user avatar
  • 1,873
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 ...
ilansas's user avatar
  • 5,999
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 ...
Android Learner's user avatar
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 ...
Michael Stum's user avatar
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.
Sally Gomez's user avatar
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....
Buda Gavril's user avatar
  • 21.5k
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 ...
Francesca's user avatar
  • 27.5k
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; } ...
Colen's user avatar
  • 13.6k
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 ...
Omer 's user avatar
  • 852
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 ...
Josh Smeaton's user avatar
  • 48.4k
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 ...
Cam's user avatar
  • 1,706
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 ...
iva123's user avatar
  • 3,465
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 ...
Adam Allard's user avatar
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 ...
mportuesisf's user avatar
  • 5,607
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[...]...
JohnDoDo's user avatar
  • 4,800
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. ...
TermiT's user avatar
  • 737
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 ...
user avatar
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 ...
Ulrich Scheller's user avatar
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 ...
TomFuertes's user avatar
  • 7,200
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 ...
Neil Coffey's user avatar
  • 21.8k
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 ...
user1853951's user avatar
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 ...
jhie's user avatar
  • 641
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 ...
Mark's user avatar
  • 3,025
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?
CyBer2t's user avatar
  • 524
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. ...
Marin's user avatar
  • 12.7k
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 ...
Michal S's user avatar
  • 1,113
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 ...
Waypoint's user avatar
  • 17.5k
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); ...
David Smith's user avatar
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. ...
YM cho's user avatar
  • 313
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 ...
guest271314's user avatar
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 ...
Miriam Salzer's user avatar
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... ...
JStormThaKid's user avatar
  • 1,804
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)
Silver Dragon's user avatar
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 ...
Adrian Liem's user avatar
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.
MistaGreen's user avatar
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 ...
Naveen Gamage's user avatar
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 ...
Catalin's user avatar
  • 1,861
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"><...
mb-ca's user avatar
  • 499
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(@...
Dima's user avatar
  • 8,596
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 (...
Emre Yazici's user avatar
  • 10.2k
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 ...
Gintas_'s user avatar
  • 5,000
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 ...
bluefoot's user avatar
  • 10.4k
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 ...
user3010445's user avatar
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.
igorpavlov's user avatar
  • 3,586
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 ...
Gary Woods's user avatar
  • 1,011
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( ...
Josh's user avatar
  • 12.5k

1
2 3 4 5
68