Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg .iff image sequence to video
3 septembre 2013, par rajatI have a file sequence of format test2#.iff, and i want to convert this sequence to a video, i have tried following commands:
ffmpeg -f IFF -r 25 -start_number 75 -i "test2%d.iff" -vcodec libx264 test2.mp4 Error: test2%d.iff: No such file or directory ffmpeg -f image2 -r 25 -start_number 75 -i "test2%d.iff" -vcodec libx264 test2.mp4 Error: [image2 @ 00000000002ee220] Could not find codec parameters for stream 0 (Video: none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options test2%d.iff: could not find codec parameters
I also have tried various codecs but it gives me same errors, can any of you please shed some light on what might be wrong?
-
How to concat two/many mp4 files(Mac OS X Lion 10.7.5) with different resolution, bit rate [on hold]
3 septembre 2013, par praveenI have to concat different mp4 files into single mp4 file. i am using following ffmpeg command but this command is only working if both file is same(copy, or if all video property is same(codec, resolution,bitrate....) ) other wise result is unexpected video. (I am working on Mac OS X Lion 10.7.5)
ffmpeg commad:
ffmpeg -i images/1/output.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts ffmpeg -i images/1/Video2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output2.mp4
console output:
[mpegts @ 0x7f8c6c03d800] max_analyze_duration 5000000 reached at 5000000 microseconds Input #0, mpegts, from 'concat:intermediate1.ts|intermediate2.ts': Duration: 00:00:16.52, start: 1.400000, bitrate: 1342 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1024x768 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x101](und): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 101 kb/s Output #0, mp4, to 'output2.mp4': Metadata: encoder : Lavf54.63.104 Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1024x768 [SAR 1:1 DAR 4:3], q=2-31, 25 fps, 90k tbn, 90k tbc Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 101 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 586 fps=0.0 q=-1.0 Lsize= 2449kB time=00:00:20.11 bitrate= 997.4kbits/s video:2210kB audio:225kB subtitle:0 global headers:0kB muxing overhead 0.578335%
Please help
-
Compile FFMPEG Using Eclipse Android
3 septembre 2013, par IveliusNDK experts , I need your help...
My goal is to easily compile ffmpeg library using android NDK and eclipse.
What I usally do when I want to develop using NDK , is right click on android project in eclipse ->Android Tools -> Add Native support. And Everything works and compiles. Every time I want to build my project , I just hit "Build" button (with a hammer icon on it).
Now I just need to add all ffmpeg libraries and run a simple program like this. I downloaded latest ffmpeg libraries from official website.I've extracted downloaded content into JNI library . And when I try to build , I get countless errors. Something like "fatal error: libavutil/avconfig.h: No such file or directory" ...
My Android.mk file looks like this :
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) include $(call all-subdir-makefiles) LOCAL_MODULE := HELLONDK LOCAL_SRC_FILES := hello-ndk.cpp include $(BUILD_SHARED_LIBRARY)
EDIT : I've been looking for a solution for a few days before posting this question.
-
ffmpeg time unit explanation and av_seek_frame method
3 septembre 2013, par user325320What does
time_base
mean in ffmpeg? document(here) says it is "frames per second". and I see in a real example that:AVFormatContext->streams[video_index]->time_base
== 1 / 30000But video's
AVCodecContext->time_base
== 1001 / 60000This makes me quite confused, and I don't understand them.
The second question is about av_seek_frame method. If seeking via time stamp (last parameter is AVSEEK_FLAG_BACKWARD or 0), the seek is started from current position read by av_seek_frame? or from the start of the file? or from the start position of decoding after last av_seek_frame call ?
-
ffmpeg + play video loop
3 septembre 2013, par Javier RamírezDoes anyone know how to make a video using ffmpeg + Opengl play continuously?. Because this is only played once
tiempo = glfwGetTime(); duracion = 1.0/25.0; // 1 second / 25 fps while(1){ ... if(glfwGetTime() > tiempo + duracion){ if(av_read_frame(pFormatCtx,&packet) >= 0){ if(packet.stream_index == 0){ avcodec_decode_video2(pCodecCtx,pFrame,&frameFin,&packet); if(frameFin)sws_scale(img_convert_ctx,pFrame->data,pFrame->linesize,0,pCodecCtx->height,pFrameRGB->data,pFrameRGB->linesize); } av_free_packet(&packet); } tiempo += duracion; } ... }
I know av_read_frame function (...) returns 0 if the end of file. But how do I make the function again returns a value other than zero? o How I can I make the video is constantly repeated?