Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to show audio bitrate information
25 février 2014, par pocThe ffmpeg only shows the video bitrate.How can I show the
audio bitrate
when I dump a streaming to fileffmpeg -i rtsp://172.19.1.40/live.sdp -acodec copy -vcodec copy export.avi
-
How to get current frame number using ffmpeg c++
25 février 2014, par John SimpsonUsually, I use the below code to get the current frame number when decoding a video.
while(av_read_frame(pFormatCtx, &packet)>=0) { if(packet.stream_index==videoStream) { // Decode video frame avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); // Did we get a video frame? if(frameFinished) { int currentFrameNumber = pFrame->coded_picture_number; } /* Free the packet that was allocated by av_read_frame*/ av_free_packet(&packet); }
Then, when I implemented seeking feature, I add av_seek_frame to seek to a desired position like this:
if(av_seek_frame(pFormatCtx, -1, seekTarget, 0 )<0){ LOG("log","error when seeking"); } while(av_read_frame(pFormatCtx, &packet)>=0) { if(packet.stream_index==videoStream) { // Decode video frame avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); // Did we get a video frame? if(frameFinished) { int currentFrameNumber = pFrame->coded_picture_number; } /* Free the packet that was allocated by av_read_frame*/ av_free_packet(&packet); }
This is when the problem arises. pFrame->coded_picture_number returns incorrect value. My question is how I cam get the current frame given I have a decoded frame pFrame ?
-
How to capture the commadline output from an app
25 février 2014, par pocWhen I ran the command
ffmpeg -i rtsp://172.19.1.40/live.sdp -acodec copy -vcodec copy lala.avi
The ffmpeg will be continuously printing(refresh) the information
fps
andbitrate
everyone second.How could I save those information using Python?
-
How to sample `audio/video bit rate and fps ` every second on ffmepg or vlc
25 février 2014, par pocI can dump the rtsp streaming into video file by
ffmpeg -y -t 5 -i rtsp://172.19.1.42/live.sdp -acodec copy -vcodec copy lala.avi
Now, I wanna sample the streaming's
audio/video bit rate and fps
every second and dumpinto a text file,I can write a script for helping the work ,How could I get it?
-
ffmpeg watermarking processing is very slow
25 février 2014, par Hitesh RohillaI am working on a video processing project and using ffmpeg for watermarking. I achieve exactly what i want but the problem is that the process is very very slow.
I am using a Intel Smart 2nd gen family Core-i5 Processor with 4GB RAM on a 32 bit operating system Microsoft Windows-8 on a 64-bit CPU.
I tried watermarking a video [mp4] of length 1:30 Min. size of file is 1.5GB
Whole process accomplish in 3 Hrs to watermark my video file and what i noticed while process is that ffmpeg was processing 28 frames per sec first and then later it slow down up to 20 frames per second. a normal human watch video with frame rate of 30 frame per second and process was even slower then this that's why it took more time [3 Hrs] then the actual length of video itself [1:33]
What i think to make process efficient is to use ffmpeg Watermarking Source Code and modify it somewhat...
I want to ask if someone have achieve fast watermarking before by any other way or have modified this code to achieve faster process in order to save my time...