w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
ffmpeg convert mp3 to lower bitrate with existing mp3 tags
Use a newer version of ffmpeg. Current versions preserve ID3 tags when converting media files. See the FFmpeg download page for links to builds for Linux, OS X, and Windows, or refer to a FFmpeg compile guide.

Categories : PHP

Android encode video with ffmpeg while it is still recording
Your real time requirement may lead you away from ffmpeg to webrtc and or to html5. some resources; http://dev.w3.org/2011/webrtc/editor/getusermedia.html (section5) https://github.com/lukeweber/webrtc-jingle-client ondello .. they have api rather than going native and trying to get at the video stream or getting at the framebuffer to acquire an xcopy of what is in the video buffer, and to then duplicate the stream an manage a connection (socket or chunked http), you may want to look at api type alternatives....

Categories : Android

Encode Android AudioRecord raw pcm data to other format using ffmpeg
You can create a .wav file with your data in bytes and later convert this audio file with your image directly in a video. 1 image + 1 audio file = 1 video

Categories : Android

Encode x264 video with ffmpeg for Android with starting offset
Upgrading to ffmpeg 1.2.1 fixed the compatibility issue. After that, my Android phone was able to play the videos just fine. The -ss option is trickier than it at first looks. It has a different meaning based on whether it is before or after -i. It turns out, to make it work, you have to use both. You put the main offset before -i, which makes ffmpeg skip to that point in the stream. But, then you also need a small non-zero offset AFTER -i to make it seek to that point within the stream so audio and video will be in sync. For reference, the final working command is: ffmpeg -ss 00:03:52.00 -i in.mp4 -ss 0.1 -t 01:28:33.00 -c:v libx264 -preset medium -crf 20 -maxrate 400k -bufsize 1835k -c:a libvorbis -sn out.mkv

Categories : Android

use ffmpeg api to convert audio files. crash on avcodec_encode_audio2
Meanwhile I have figured this out and written an Android Library Project that does this (for audio files). https://github.com/fscz/FFmpeg-Android See the file /jni/audiodecoder.c for details

Categories : Android

encode binary to audio python or C
So you want to transmit digital information using audio? Basically you want to implement a MODEM in software (no matter if it is pure software, it's still called modem). A modem (MOdulator-DEModulator) is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data. Modems can be used over any means of transmitting analog signals, from light emitting diodes to radio. [wikipedia] There are modems everywhere you need to transmit data over an analog media, be it sound, light or radio waves. Your TV remote probably is an infrared modem. Modems implemented in pure software a

Categories : Python

How to copy audio stream using FFMpeg API ( not a command line tool )
Your question is vague without some kind of code to go along with it, as trust me there are a lot of things that can go wrong when using ffmpeg's libraries directly (and on Windows there is no debuging). Unfortunately ffmpeg's libraries are not well documented so it is generally best to read the source code for ffmpeg in order to use its libraries. Find the equivalent command line options to perform what you want and track that through ffmpeg's source to see the library calls.

Categories : Opencv

Android FFMPEG: Could not execute the ffmpeg from Java code
Do you have root on the device? Mount '/data' and then enter your same 'ffmpeg' command in the shell and see whether the error is the same. Try using the shell to test out different command expressions. Try 'ffmpeg' alone and with just one input file. See whether those commands produce expected output. My wild guess would be that there is an issue with calling 'ffmpeg.main()' that relates to the details of your build.

Categories : Android

How to base64 encode/decode a variable with string type in Python 3?
You need to encode the unicode string. If it's just normal characters, you can use ASCII. If it might have other characters in it, or just for general safety, you probably want utf-8. >>> import base64 >>> s = "12345" >>> s2 = base64.b64encode(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> File ". . . /lib/python3.3/base64.py", line 58, in b64encode raise TypeError("expected bytes, not %s" % s.__class__.__name__) TypeError: expected bytes, not str >>> s2 = base64.b64encode(s.encode('ascii')) >>> print(s2) b'MTIzNDU=' >>>

Categories : Python

How to open my apps audio player to play audio after clicking an audio link which is present in email?
Well you will need to register your own URL scheme for your app. Read Apples Implementing Custom URL Schemes on how to do this. But you can not make iOS prompt to install you app, since the OS does not know about you app. What you could do is always open a website which will try to open your by its URL sheme and it this fails present the use a webpage that offers them to download it.

Categories : Iphone

Audio.js audio player how to stop downloading audio file when started
To prevent an <audio> element from downloading on page load just set the preload attribute to "none". As for stopping the download after it has begun, you should be able to do that by simply removing the <audio> element from the page. The plugin you mentioned may also require you to run an additional command to clean up anything it added to the page.

Categories : HTML

iOS: lowering bitrate of MPMediaItem containing an iPod music
I finally got it, this is the code I use: static NSString * const kWriterInputIsReadyForMoreData = @"readyForMoreMediaData"; #import <AVFoundation/AVFoundation.h> @implementation AudioUtil { AVAssetReader *_assetReader; AVAssetWriter *_assetWriter; AVAssetWriterInput *_assetWriterInput; AVAssetReaderTrackOutput *_readerOutput; void (^_callback)(BOOL); CMSampleBufferRef _sampleBufferToAppend; } -(void)downSamplingAudioWithSourceURL:(NSURL *)sourceURL destinationURL:(NSURL *)destURL timeRange:(CMTimeRange)timeRange callBack:(void (^)(BOOL))callback { NSError *error = nil; _callback = callback; [[NSFileManager defaultManager] removeItemAtURL:destURL error:nil]; //initialize reader AVURLAsset *inputAsset = [AVURLAsset assetWithURL:sourceURL]; _as

Categories : Iphone

Flowplayer Multiple Bitrate Streaming Error
First, you getting error because you dont have RTMP Server, try using lighttpd. Try the below code, flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", { clip: { autoPlay: true, provider: 'lighttpd', // urlResolvers is needed here to point to the bitrate select plugin urlResolvers: 'brselect', bitrates: [ { url: "http://localhost/flowplayer/example/gangnam.flv", bitrate: 885, isDefault: true,label: "1080 k"}, { url: "http://localhost/flowplayer/example/gangnam_1080.flv", bitrate: 885, label: "320 k" } ] }, plugins: { menu: { url: "http://releases.flowplayer.org/swf/flowplayer.menu-3.2.12.swf", items: [ { label: "select bitrat

Categories : Javascript

I'm trying to create a script that'll delete all files which have a bitrate less than 130 kbps
I think IFS is set to a value with ".". Also, to compare integers, use [[ ]]: #!/bin/bash find ./ -name '*.mp3' | while IFS='' read -r i; do echo "----------------------------------------" if [[ $(mp3info -x "$i" | grep Audio | awk '{print $2}') -lt 130 ]]; then read -p "Delete? " -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then rm -f "$i" && echo "$i succesfully deleted!" fi fi echo "----------------------------------------" done Btw I think you have to add your file to the question: read -p "Delete $i? " -n 1 -r

Categories : Bash

body=body.encode('ascii','ignore')AttributeError: 'list' object has no attribute 'encode'
You're trying to encode a list (the result of findAll is the list of occurences). What you need to do is iterate through the list, get the text that you want and encode this. body = soup.findAll('p') for i in body: print i.text.encode('ascii','ignore')

Categories : Python

Convert audio Linear pcm to mp3 ( using LAME ) Low ,Medium,High audio Quality setting
Try this, Low quality: AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication]delegate]; NSMutableDictionary *dictAudioQuality =[[NSMutableDictionary alloc]init]; [dictAudioQuality setValue:@"Low" forKey:@"audioquality"]; [dictAudioQuality setValue:@"11025" forKey:@"samplerate"]; [dictAudioQuality setValue:@"16" forKey:@"bitdepth"]; [dictAudioQuality setValue:@"120" forKey:@"bitrate"]; [dictAudioQuality setValue:@"1" forKey:@"channel"]; Medium Quality: AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication]delegate]; NSMutableDictionary *dictAudioQuality =[[NSMutableDictionary alloc]init]; [dictAudioQuality setValue:@"Medium" forKey:@"audioquality"]; [dictAudioQuality set

Categories : Iphone

Javascript/html5 play multiple audio files or overlap audio
Howler.js provides a good library for firing off cross-browser sound sprites for games, should do the trick!

Categories : Javascript

Program only runs audio from desktop and not audio in a package on netbeans?
You need to invoke a classloader in order to access files in your package. See here for API description. This is how it works: InputStream inaudio = getClass().getResourceAsStream("/audio/retrolevel.wav"); Clip clip = null; try { clip = AudioSystem.getClip(); clip.open(AudioSystem.getAudioInputStream(inaudio)); } catch (IOException | LineUnavailableException | UnsupportedAudioFileException e1) { e1.printStackTrace(); } clip.start();

Categories : Java

CoreAudio Audio Unit plays only one channel of stereo audio
Ok. So I've check my code and spotted that I use VoiceProcessingIO audio unit (instead of RemoteIO which is in the question) which is basically correct for my app since documentation says "The Voice-Processing I/O unit (subtype kAudioUnitSubType_VoiceProcessingIO) has the characteristics of the Remote I/O unit and adds echo suppression for two-way duplex communication. It also adds automatic gain correction, adjustment of voice-processing quality, and muting" When I changed audio unit type to RemoteIO I've immediately got the stereo playback. I didn't have to change stream properties. Basically VoiceProcessingIO audio unit downfalls to mono and disregards stream properties. I've posted a question on Apple Developer forum regarding stereo output using VoiceProcessingIO audio unit but ha

Categories : Iphone

Knowing with PHP if the browser can play audio file with html5 audio tag
The only way to reliably detect HTML5 audio (and subsequently codec support) is to do so client-side. The only capability available to you with PHP (or anything server-side) is to do user-agent sniffing, which is notoriously unreliable.

Categories : PHP

Outputting audio (Windows Audio API) - low frequencies quiet
The most likely answer is that the speakers you are playing the sound through aren't good at reproducing wavelengths that low. Desktop computer speakers, for example, often won't produce sounds below 50Hz. If you have a subwoofer or really high-quality speakers, of course, you'll do better. The other possibility is of course that something is wrong with the sine wave you are generating... but in general that would be obvious in Audacity if you zoomed in closely enough to see the individual samples. That is, if the visual looks like a proper sine wave, then it very likely is a proper sine wave. (and if it's not, e.g. if there are any sudden discontinuities, you will hear very obvious noise in the audio as it plays back!) One final note: Assuming your PCM format is using signed sampl

Categories : C++

IOS: Run application audio and phone music audio together in background
Here you can find a related question about it. How to handle background audio playing while iOS device is locked or on another application? I would suggest you to take a look a this tutorial: http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_background-audio/ It explains all the different steps to follow.

Categories : Iphone

Playing and recording audio in sync with getUserMedia/Web Audio API
I'm trying to do the same thing - HTML5 multitrack recorder. The webkit enabled stuff is just not ready for prime time. Recorder.js is very promising. http://carolwith.me is a flash based multitrack recorder that does exactly what I want (except I too want HTML5 not Flash). Have a look - it's unbelievably goofy! If you play with it it doesn't really sync either. An Algorithm setup to do a count-in (pre-roll) and then set the subsequently recorded tracks against it was also sought by me. I found a guy who had a possible solution but he abandoned it and then took his site down. Lets keep trying! Been at it since 2010 and I'm sure the hardest part (getusermedia) will become a standard.

Categories : HTML

How to record or get the audio while the audio is playing in windows phone 8?
This is the Microphone class link which can be used to capture audi. Give a try and let me know Microphone to capture audio also go nthrough this link capturing and playing audio

Categories : Windows

Android playing audio and recordning audio at the same time
You can use following custom class:- package com.app.controller; import android.content.Context; import android.media.MediaPlayer; import android.media.MediaPlayer.OnPreparedListener; import android.net.Uri; import android.provider.SyncStateContract.Constants; import android.widget.Toast; public class MediaController implements OnPreparedListener{ public MediaController() { // TODO Auto-generated constructor stub } public MediaPlayer mp; public void getMediaPlayObject() { try { System.out.println("00000000000000"); mp = new MediaPlayer(); System.out.println("2222222222"); } catch (Exception e) { // TODO: handle exception System.out.println("exception in audia player====" + e.toString()); } } public void onPrepared(MediaPlaye

Categories : Android

How to detect if html audio tag can't play audio file
You can use the audio element's canplaytype method to detect whether or not the current browser can play a specific codec. Example from diveintohtml5 function canPlay (codec) { var a = document.createElement('audio'); return !!(a.canPlayType && a.canPlayType(codec).replace(/no/, '')); } canPlay('audio/ogg; codecs="vorbis"'); // true or false

Categories : HTML

saved Recorded Audio Using Audio intent cannot be played
There are some limitations regarding RECORD_SOUND_ACTION intent that it is not supported to specify a file path to save the audio recording. The application shall save the audio in default location. You cannot use MediaStore.EXTRA_OUTPUT as extra because in document of MediaStore it is written under constant EXTRA_OUTPUT that it only use for image and video. The name of the Intent-extra used to indicate a content resolver Uri to be used to store the requested image or video. A solution to this cause is bit tricky. You can let the application save the audio to default but after you can cut, paste and rename your audio to your required location. I found two answers who claims that they found a way to cut paste. Solution A Solution B Accept this answer or +1 if you find it useful.

Categories : Android

aLaw audio format is not supported by HTML5 audio tag
You can use an excellent solution on joomlavision to trigger webkitAudioAPI for aLaw WAVs http://www.joomlavision.com/play-html5-audio-browser/

Categories : HTML

iOS - how can I add audio files into another audio file?
Audio mixing can be really challenging. You need to mix the two waveforms-- combine the data programatically. Here is a nice little demo showing one way to do so. And here is another answer with some ideas. and another sample. Sorry for all the links, but this is a pretty complicated question.

Categories : IOS

Using
Nice question! The simplest solution would be storing the decoded content in a Blob. That would allow you to set the src attribute. var blob = new Blob(decodedData, {type: "correct-mimetype/here"}); var url = URL.createObjectURL(blob); audio.src = url;

Categories : Javascript

Getting audio visualization using Web Audio API to work on iOS
Unfortunately Safari doesn't properly support MediaElementSource. It's a bug: Why isn't Safari able to process audio from a MediaElementSourceNode?

Categories : IOS

stop audio tag when next audio tag starts
I don't see the need for data. Here's what I suggest: $(document).ready(function(){ var aud = $('audio'), itog = 0; $('.sample').each(function(i){ $(this).click(function(){ var au = aud[i]; au.toggle(2000, function(){ if(itog === 0){ au.animate({top: '50%', left: '50%', marginTop: '-35px', marginLeft: '-175px'}, 2000); itog = 1; } else{ au.pause(); au.animate({top:0, left:'2000px'}, 2000); itog = 0; } }); }); }); });

Categories : Javascript

jQuery audio fade out and pause, onclick fade in audio and resume
You are adding two click handlers to same jQuery element, so on a single click two handlers will be called. You have to add an if that verify if the sound was muted. When you will click on the button the sound will be muted or un-muted with fadeIn. HTML <div style="bottom:0; position:absolute; height:32px; width:100%;"> <button id="mute">Mute sound</button> <audio id="background_audio" src="http://www.noiseaddicts.com/samples/2541.mp3" autoplay="autoplay"></audio> </div> Javascript $(document).ready(function(){ var backAudio = $('#background_audio'); var muted = false; $('#mute').click(function(){ var button = $(this); if (!muted) { button.attr("disabled", ""); backAudio.animate({volum

Categories : Jquery

Set activity audio stream to android home audio stream
If you mean which volume it is that gets adjusted when you press the volume keys while at the home screen, then it's most likely the ring volume (i.e. STREAM_RING).

Categories : Java

Amplify audio with Web Audio API
I'm not aware of an implementation that doesn't increase the gain above 1. That's what I've been using in all of my projects, and haven't run into any issues. If you're super concerned about it, I guess you could use a ScriptProcessorNode and basically just multiply all your samples by whatever scaling value you want, but the performance will be quite a bit worse than you'd get with a gain node. And, also, that would just be flat out kind of ridiculous. The way I read the spec doesn't really give me any reason to believe values greater than 1 will be ignored for the GainNode's gain parameter. It's basically just saying 1 is the nominal value. In other words, if you want your audio to pass through unaffected, set the value to 1. Otherwise, you'll get attenuation or amplification.

Categories : HTML

FFmpeg package for php
Yes simple ffmpeg does work through PHP exec if you have necessary permissions. Sample command <?php /*** convert video to flash ***/ exec("ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320x240 video.flv"); ?> Source

Categories : PHP

Keep timecode in ffmpeg?
from man page: http://ffmpeg.org/ffmpeg.html ‘-copyts’ Do not process input timestamps, but keep their values without trying to sanitize them. In particular, do not remove the initial start time offset value. Note that, depending on the ‘vsync’ option or on specific muxer processing (e.g. in case the format option ‘avoid_negative_ts’ is enabled) the output timestamps may mismatch with the input timestamps even when this option is selected. ‘-copytb mode’ Specify how to set the encoder timebase when stream copying. mode is an integer numeric value, and can assume one of the following values: ‘1’ Use the demuxer timebase. The time base is copied to the output encoder from the corresponding input demuxer. This is sometimes required to avoid non monotonically increasin

Categories : Osx

How to add album art with ffmpeg?
With Recent version, ffmpeg -i out.mp3 -i test.png -map 0:0 -map 1:0 -c copy -id3v2_version 3 metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3 Use -map to associate input stream to the output Use -c copy to directly demux/remux The -id3v2_version 3 is what is missing in your command line. Note that that wil write an IDV2.3 but you can ask for a 2.4 (-id3v2_version 4) with the -id3v2_version 3 option the -metadataoption will be well interpreted

Categories : PHP

How to decode mp3 to pcm by ffmpeg
One way to do this is to call the executable in the code: system("ffmpeg -i input.mp3 output.wav"); //assuming the executable name is ffmpeg and its location is in PATH environment variable Another way is to use the API. Example here, see the audio_decode_example() function in that file. Some tutorials: Linuxers' Tutorial "For Beginners": http://linuxers.org/tutorial/ffmpeg-tutorial-beginners Dranger: http://dranger.com/ffmpeg/ (slightly out of date) CodeProject: http://www.codeproject.com/Tips/111468/FFmpeg-Tutorial Mathew Bajoras's Tutorial: http://www.personal.psu.edu/mrb5282/tutorials/video_ffmpeg/

Categories : C

Remuxing mp4 on the fly with FFmpeg API
OK, another question researched and answered by self... Turns out, as I theorized in the question, mp4 file is not fully written until the end. During a direct disk write to a file, the producer would seek back to the start of the video and update all the pointers to various atoms. That is, the general structure of mp4 is ftyp -> mdat -> moov. Where moov contains all the meta about the contained tracks. Unfortunately, it is written last. However, its location is located in the header. That is why the seek is required: mdat is of varied length (because it contains raw encoded frames, there can be x number of them). Thus, the moov atom is offset by the length of mdat. When producer finishes writing the file, it will update the header with the proper location of moov. For additional referen

Categories : C



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.