Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Clang C Compiler 'class' keyword reserved ?
21 septembre 2012, par user1689196Hi I am compiling ffmpeg using xcode, which I believe uses clang for compilation. In ffmpeg there is a struct with a member variable named 'class' I believe this is perfectly fine in C but clang is trying to parse it as a keyword. Any idea how to fix? Basically the following in a cpp file will cause the error:
extern C { typedef struct { int class; } SomeStruct; }
It tries to interpret class as a keyword.
FYI the file that is throwing the error in ffmpeg is libavcodec/mpegvideo.h and I need to include this to have access to the MpegEncContext struct to pull out motion map info.
EDIT
The above code sample was just to demonstrate the error. But perhaps its fixable in another way. In my actual code I have it like this:
#ifdef __cplusplus extern "C" { #endif #include "libavcodec/mpegvideo.h" #include "libavformat/avformat.h" #if __cplusplus } //Extern C #endif
How would I get that to include the two files as C files and not C++?
Thanks
-
ffmpeg how convert audio files in other formats ?
21 septembre 2012, par John SmithI download audio file and me need convert him on formats .mp3,.wav,.ogg.,acc. My script:
if($ext=='wav'){ shell_exec("ffmpeg -i $infile -acodec libmp3lame -ab 320 $outfile_mp3"); shell_exec("ffmpeg -i $infile -acodec libvorbis -ab 320 $outfile_ogg"); shell_exec("ffmpeg -i $infile -acodec libfaac -ab 320 $outfile_aac"); } elseif($ext=='mp3'){ shell_exec("ffmpeg -i $infile -ab 256 $outfile_wav"); shell_exec("ffmpeg -i $infile -ab 256 $outfile_ogg"); shell_exec("ffmpeg -i $infile -ab 256 $outfile_aac"); move_uploaded_file($tmp, $path.$name2.'mp3'); } elseif($ext=='ogg'){ shell_exec("ffmpeg -i $infile -acodec libmp3lame $outfile_mp3"); shell_exec("ffmpeg -i $infile $outfile_wav"); shell_exec("ffmpeg -i $infile -acodec libfaac $outfile_aac"); } elseif($ext=='aac'){ shell_exec("ffmpeg -i $infile -acodec libmp3lame $outfile_mp3"); shell_exec("ffmpeg -i $infile -acodec libvorbis $outfile_ogg"); shell_exec("ffmpeg -i $infile -acodec libmp3lame $outfile_wav"); }
Help me please convert files:
- how convert file in format .mp3 in formats .wav, .ogg, .acc
- how convert file in format .wav in formats .mp3, .wav, .acc
- how convert file in format .ogg in formats .mp3, .ogg, .acc
- how convert file in format .acc in formats .mp3, .ogg, .wav
I want to get good sound quality audio files...
-
Increase the bitrate tolerance of ffmpeg for creating screenshots of a movie
21 septembre 2012, par rekireI'm getting the error
bitrate tolerance too small for bitrate
so far no problem. I know that there are several switches to increase that but nothing works.ffmpeg -y -r 1/30 -b:v 999999k -bt 999999k -maxrate 999999k -i in.flv out%03d.jpg
The source of that commandline is directly from ffmpeg. But that crashes:
ffmpeg version N-44123-g5d55830 Copyright (c) 2000-2012 the FFmpeg developers built on Sep 2 2012 20:23:29 with gcc 4.7.1 (GCC) [...] Input #0, flv, from 'in.flv': Duration: 00:05:00.13, start: 0.000000, bitrate: 259 kb/s Stream #0:0: Video: flv1, yuv420p, 320x240, 1k tbr, 1k tbn, 1k tbc Stream #0:1: Audio: nellymoser, 22050 Hz, mono, s16 [mjpeg @ 04356860] bitrate tolerance too small for bitrate [mjpeg @ 04317540] ff_frame_thread_encoder_init failed Output #0, image2, to 'out%03d.jpg': Stream #0:0: Video: mjpeg, yuvj420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 0.03 tbc Stream mapping: Stream #0:0 -> #0:0 (flv -> mjpeg) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Some ideas what I'm doing wrong?
-
Cannot stream webcam using ffserver because of malloc error [migrated]
21 septembre 2012, par user1509326I was following this tutorial RaspBerry Pi webcam and when I run the following command from root:
$ ffserver -f /root/ffserver.conf & ffmpeg -v 2 -r 5 -s 640x480 -f video4linux2 -i /dev/video1` http://localhost:8090/webcam.ffm
The camera is turned on and everything is fine, except it does not stream. I checked the terminal. From video 1, I get the following error:
bind(port 8090): Address already in use *** glibc detected *** ffmpeg: malloc(): smallbin double linked list corrupted: 0x0000000000e5ac00 **
When I use another port like 5000, I get the same result:
$ ffserver -f /root/ffserver.conf & ffmpeg -v 2 -r 5 -s 640x480 -f video4linux2 -i /dev/video1 http://localhost:8090/webcam.ffm [2] 3795 avserver version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers built on Jun 12 2012 16:52:09 with gcc 4.6.3 *** glibc detected *** ffmpeg: malloc(): smallbin double linked list corrupted: 0x0000000000b77c00 ***
-
H264 HW Decoding on Android Using FFmpeg-10
21 septembre 2012, par limitfanI've noticed that ffmpeg has already included (libavcodec/libstagefright.cpp) and claimed to support H264's hardware decoding through StageFright framework. I've build the shared library according to (tools/build_libstagefright). But when doing real H264 frame decoding, it seems to be failed at Stagefright_init(). Does anybody succeed to use this new feature? Thank you in advance.