Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Batch If file with filename exist
11 décembre 2013, par neo243The Situation is that i convert m4a to mp3 files with ffmpeg.
now i need a function that checks if file test.mp3 is also in the folder as test.m4a and deletes the test.m4a.
Thank you for your help.
:start for %%a in ("path\*.m4a") do ffmpeg -y -i "%%a" path\converted\%%~na.mp3" timeout /T 10 > nul goto start
-
FFMPEG | Streaming video frames from server
11 décembre 2013, par AqueelI am sending frames of a video in form of JPEG images to my server on RMTP stream. At server side, I want to connect the stream (ip + port) to ffmpeg so that it can grab images from stream and create a video stream from them. Actually my server is listening on an IP and port for incoming frames. This part is done. Where I am stuck is that how to convert these frames to a video stream using FFMPEG. Can anyone please tell me how to achieve this? I know image2pipe is what I should go with but I have not found its syntax and documentation on google. So please help me.
Thanks and best regards
-
ffmpeg capture streams in sync
11 décembre 2013, par MkochI'd like to capture multiple real-time video streams arriving on rtp protocol, using ffmpeg. When I initiate the recording, by issuing the
ffmpeg
command, it always takes a while for the connection to built up and the actual recording to begin. This might be more than 2 seconds in certain cases, which cause a constant time difference at the replay.How can I extract the information containing the time of the first actually recorded frame from ffmpeg? If it's not possible with ffmpeg without editing the source (which I did, and would like to avoid for other reasons), is there any similar multi-platform open-source tool which could be used?
-
Displaying 450 image files from SDCard at 30fps on android
11 décembre 2013, par nikhilkeralaI am trying to develop an app that takes a 15 seconds of video, allows the user to apply different filters, shows the preview of the effect, then allows to save the processed video to sdcard. I use ffmpeg to split the video into JPEG frames, apply the desired filter using GPUImage to all the frames, then use ffmpeg to encode the frames back to a video. Everything works fine except the part where user selects the filter. When user selects a filter, the app is supposed to display the preview of the video with the filter applied. Though 450 frames get the filter applied fairly quick, displaying the images sequentially at 30 fps (to make the user feel the video is being played) is performing poorly. I tried different approaches but the maximum frame rate I could attain even on the fastest devices is 10 to 12 fps.
The AnimationDrawable technique doesn't work in this case because it requires the entire images to be buffered into memory which in this case is huge. App crashes.
The below code is the best performing one so far (10 to 12 fps).
package com.example.animseqvideo; import ...... public class MainActivity extends Activity { Handler handler; Runnable runnable; final int interval = 33; // 30.30 FPS ImageView myImage; int i=0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); myImage = (ImageView) findViewById(R.id.imageView1); handler = new Handler(); runnable = new Runnable(){ public void run() { i++; if(i>450)i=1; File imgFile = new File(Environment.getExternalStorageDirectory().getPath() + "/com.example.animseqvideo/image"+ String.format("%03d", i) +".jpg"); if(imgFile.exists()){ Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath()); myImage.setImageBitmap(myBitmap); } //SOLUTION EDIT - MOVE THE BELOW LINE OF CODE AS THE FIRST LINE OF run() AND FPS=30 !!! handler.postDelayed(runnable, interval); } }; handler.postAtTime(runnable, System.currentTimeMillis()+interval); handler.postDelayed(runnable, interval); } }
I understand that the process of getting an image from SDCard, decoding it, then displaying it onto the screen involves the performance of the SDCard reading, the CPUs performance and graphics performance of the device. But I am wondering if there is a way I could save a few milliseconds in each iteration. Any suggestion would be of great help at this point.
-
ffmpeg/libav Linking issue in Windows
11 décembre 2013, par Dídac PérezI have cross compiled ffmpeg and libav from Linux to Windows (mingw32). So, I've got my .a files and ready to be used for linking in my MSVC2010 project. The thing is that I am getting linking errors and I don't understand why:
1>RTSPCapture.obj : error LNK2019: unresolved external symbol _avformat_free_context referenced in function "public: int __thiscall Imagsa::RTSPCapture::dumpSync(class std::basic_string,class std::allocator
> const &,class std::basic_string,class std::allocator > const &,class std::basic_stringstream,class std::allocator > &,double *,class std::vector > &)" (?dumpSync@RTSPCapture@Imagsa@@QAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0AAV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@4@PANAAV?$vector@VMjpegFrame@Imagsa@@V?$allocator@VMjpegFrame@Imagsa@@@std@@@4@@Z) 1>RTSPCapture.obj : error LNK2019: unresolved external symbol _avio_close referenced in function "public: int __thiscall Imagsa::RTSPCapture::dumpSync(class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &,class std::basic_stringstream,class std::allocator > &,double *,class std::vector > &)" (?dumpSync@RTSPCapture@Imagsa@@QAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0AAV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@4@PANAAV?$vector@VMjpegFrame@Imagsa@@V?$allocator@VMjpegFrame@Imagsa@@@std@@@4@@Z) 1>RTSPCapture.obj : error LNK2019: unresolved external symbol _avcodec_close referenced in function "public: int __thiscall Imagsa::RTSPCapture::dumpSync(class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &,class std::basic_stringstream,class std::allocator > &,double *,class std::vector > &)" (?dumpSync@RTSPCapture@Imagsa@@QAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0AAV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@4@PANAAV?$vector@VMjpegFrame@Imagsa@@V?$allocator@VMjpegFrame@Imagsa@@@std@@@4@@Z) Does anybody know what could happen?