Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How can i decode an mp3 and encode it as aac with ezstream
8 avril 2015, par Roberto ArosemenaThis is my current ezstream config
http://localhost:8000/test password MP3 playlist.m3u 1 MP3 .mp3 madplay -b 16 -R 44100 -S -o raw:- "@T@" lame --preset cbr 32 -r -s 44.1 --bitwidth 16 - - It's mounting to an icecast server, its decoding and encoding mp3 to a lower bitrate, I'm trying to encode it to aac instead of mp3 in hopes that the quality improves as i heard that aac is better than mp3 for lower bitrates.
What i would like to know is if i can use an aac encoder such as FFmpeg instead of the lame mp3 encoder and get an aac to the end user instead of mp3, if so what parameters should i pass to FFmpeg so that it works with my current config.
-
how to distinguish between identical cameras in Libav/ffmpeg ?
8 avril 2015, par user1810087i have two identical cameras connected to my pc. the cameras are videology 21K355usb (if someone need this information). i'm using Libav or ffmpeg (tested with both libs) to grab the cameras. my options in my c++ program are simply:
format = "dshow" input = "video=Videology USB-C Camera"
but i cannot distinguish between them. if i try to print out the list of devices, i get the following:
$> ffmpeg -list_devices true -f dshow -i dummy [dshow @ 02597f60] DirectShow video devices [dshow @ 02597f60] "Integrated Camera" [dshow @ 02597f60] "Videology USB-C Camera" Last message repeated 1 times [dshow @ 02597f60] DirectShow audio devices [dshow @ 02597f60] "Microphone (Realtek High Defini"
as you can see, my videology camera appears as the same device, twice. the only thing i see so far, is the usb-port differse in the os-hardware properties. is it anyhow possible to destiguish between them?
-
How to use ffmpeg command for Android
8 avril 2015, par ManojI would like to separate
audio
andvideo
from giveninput video file
.I have buildffmpeg
sos for Android using http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/ this link.generated SOS
libavcodec-56.so,libavfilter-5.so,libavformat-56.so,libavutil-54.so,libswscale-3.so
ffmpeg command for separate
video file(doesn't contain audio)
from input video fileffmpeg -i input.mkv -map 0:v -codec copy output.mkv
I know the
command
which we have used incommand prompt
to get the desired outputI dont know how to call the ffmpeg command from Android Java Native method.and also dont know about write a JNI wrapper for this command.
-
Android ffmpeg unable to merge audio(.wav file) with video(.mp4 file)
8 avril 2015, par navyai am working on FFMPEG library,in which i am merging audio (.wav file) with video (.mp4 file) , for that iam using following command here:
*String commandStr= "ffmpeg,-y,-i,mnt/sdcard/Scatta/Scattatemp.mp4,-i,/storage/emulated/0/MicDroid/recordings/video.wav ,-strict,experimental,-map,0:0,-map,1:0,-vcodec,mpeg4,-vb,15496k,-ab,128k,-ac,2,-ar,22050,-shortest,mnt/sdcard/Scatta/mergedFile.mp4";
for that i am using following code,but my command is not working, i am getting Commandvalidation failed exception
GeneralUtils.deleteFileUtil(workFolder + "/vk.log"); PowerManager powerManager = (PowerManager)_act.getSystemService(Activity.POWER_SERVICE); WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "VK_LOCK"); Log.d("Prefs.TAG", "Acquire wake lock"); wakeLock.acquire(); String commandStr= "ffmpeg,-y,-i,mnt/sdcard/Scatta/Scattatemp.mp4,-i,/storage/emulated/0/MicDroid/recordings/video.wav ,-strict,experimental,-map,0:0,-map,1:0,-vcodec,mpeg4,-vb,15496k,-ab,128k,-ac,2,-ar,22050,-shortest,mnt/sdcard/Scatta/mergedFile.mp4" ; LoadJNI vk = new LoadJNI(); try { vk.run(GeneralUtils.utilConvertToComplex(commandStr), workFolder, getApplicationContext()); GeneralUtils.copyFileToFolder(vkLogPath, demoVideoFolder); } catch (CommandValidationException e) { Log.e("Prefs.TAG", "vk run exeption.", e); commandValidationFailedFlag = true; } catch (Throwable e) { Log.e("Prefs.TAG", "vk run exeption.", e); } finally { if (wakeLock.isHeld()) wakeLock.release(); else{ Log.i("Prefs.TAG", "Wake lock is already released, doing nothing"); } } Log.i("Prefs.TAG", "doInBackground finished"); } catch(Exception e){ e.printStackTrace(); System.out.println(".exception"+e.toString()); }
i am getting following exception
04-08 10:00:38.891: D/ffmpeg4android(7781): deleteing: /data/data/org.scatta.androidclient/files//vk.log isdeleted: false 04-08 10:00:38.891: D/Prefs.TAG(7781): Acquire wake lock 04-08 10:00:38.896: I/System.out(7781): <--- command strffmpeg -i mnt/sdcard/Scatta/Scattatemp.mp4 -i /storage/emulated/0/MicDroid/recordings/video.wav -acodec copy mnt/sdcard/Scatta/mergedFile.mp4 04-08 10:00:38.896: E/ffmpeg4android(7781): Command validation failed. 04-08 10:00:38.896: E/ffmpeg4android(7781): Check if input file exists: /storage/emulated/0/MicDroid/recordings/video.wav 04-08 10:00:38.896: E/Prefs.TAG(7781): vk run exeption. 04-08 10:00:38.896: E/Prefs.TAG(7781): com.netcompss.ffmpeg4android.CommandValidationException 04-08 10:00:38.896: E/Prefs.TAG(7781): at com.netcompss.loader.LoadJNI.run(LoadJNI.java:26) 04-08 10:00:38.896: E/Prefs.TAG(7781): at com.scatta.androidclient.ui.PlaybackScreen$TranscdingBackground.doInBackground(PlaybackScreen.java:159) 04-08 10:00:38.896: E/Prefs.TAG(7781): at com.scatta.androidclient.ui.PlaybackScreen$TranscdingBackground.doInBackground(PlaybackScreen.java:1) 04-08 10:00:38.896: E/Prefs.TAG(7781): at android.os.AsyncTask$2.call(AsyncTask.java:287) 04-08 10:00:38.896: E/Prefs.TAG(7781): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) 04-08 10:00:38.896: E/Prefs.TAG(7781): at java.util.concurrent.FutureTask.run(FutureTask.java:137) 04-08 10:00:38.896: E/Prefs.TAG(7781): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 04-08 10:00:38.896: E/Prefs.TAG(7781): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) 04-08 10:00:38.896: E/Prefs.TAG(7781): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 04-08 10:00:38.896: E/Prefs.TAG(7781): at java.lang.Thread.run(Thread.java:856)
-
How to add text to video using FFMPEG with Fast speed rotation ?
8 avril 2015, par vijay shegokarI am using the FFMPEG library in my project to work on video encoding.
I am using the below command to add text to video at bottom of video, which is working fine. The only problem is that text moves very slow here in video. I want to speed up the text rotation in video.
Add Text to Video FFMPEG Command
D:/video/res/ffmpeg -y -i "D:/video/input.mp4" -filter_complex "drawtext=text='Cricket, Football, Tennis, Hockey, Chess, Carrom, Polo, Table Tennis':fontfile=\'D:/video/res/arial.ttf\':y=h-line_h:x=h-(2*lh)-n:fontcolor=white:fontsize=24:box=0" -codec:v libx264 -codec:a copy "D:/video/text_added_video.mp4"
Please help me on this topic.
Above code is useful for those who just want to add text to video at bottom of video with rotation from right to left. And doesn't bother about the speed of text rotation.