Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Mpeg 4 and H264 encoder/decoder on Android ? [closed]
8 octobre 2012, par Levanphong7887Possible Duplicate:
FFMPEG on AndroidI'm writing Android app using Java on Eclipse.
I'm finding lib for encoding ad decoding Mpeg-4 and H264.
I have searched and I always see people suggest use FFMPEG, but FFMPEG is writing by C++ not Java.
I wonder the android java code can using ffmpeg?
If it can, please show me how to use it. And if it can not, please suggest me another lib to do that.
Thank you,
Phong Le
-
How to pass options to ffmpeg from SoX ?
8 octobre 2012, par beardedlinuxgeekI'm trying to combine and encode some files from wav to m4a. I installed both ffmpeg and sox from source to make sure nothing was disabled. When I do the conversion with ffmpeg
ffmpeg -i input.wav -acodec aac -strict experimental output.m4a
it works fine. When I use SoX
sox input.wav output.m4a
I get the error
[NULL @ 0x251b4e0] Codec is experimental but experimental codecs are not enabled, see -strict -2 sox FAIL ffmpeg: ffmpeg could not open CODEC sox FAIL formats: can't open output file `output.m4a':
I need to way to get SoX to tell ffmpeg that its ok to use the experimental codecs.
Also I already tried using this guide http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide to install the fdk-acc encoder, but it didn't work. The experimental one works fine so I'd rather just use that.
-
VP8 and WebM, not working in ffmpeg-php [migrated]
6 octobre 2012, par Olaf ErlandsenI need a help with ffmpeg-php and Ffmpeg.
Ffmpeg:
ffmpeg version 1.0.git built on Oct 6 2012 01:54:50 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4) configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3 libavutil 51. 73.102 / 51. 73.102 libavcodec 54. 63.100 / 54. 63.100 libavformat 54. 29.105 / 54. 29.105 libavdevice 54. 3.100 / 54. 3.100 libavfilter 3. 19.102 / 3. 19.102 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 16.100 / 0. 16.100 libpostproc 52. 1.100 / 52. 1.100
Ffmpeg-PHP
FFmpeg 0.6.5 libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0
FFMPEG-PHP Command:
ffmpeg -y -i /f1ccd3a27d36270492ce660da358b436.mp4 -t 99 -f webm /f1ccd3a27d36270492ce660da358b436.webm
FFMPEG(SSH) Command:
ffmpeg -y -i /f1ccd3a27d36270492ce660da358b436.mp4 -t 99 -f webm /f1ccd3a27d36270492ce660da358b436.webm
FFMPEG-PHP Output:
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 1 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (30000/1001) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/f1ccd3a27d36270492ce660da358b436.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 Duration: 00:04:16.32, start: 0.000000, bitrate: 650 kb/s Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 108 kb/s Stream #0.1(und): Video: h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 539 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc Output #0, webm, to '/f1ccd3a27d36270492ce660da358b436.webm': Stream #0.0(und): Video: 0x0000, yuv420p, 480x360 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc Stream #0.1(und): Audio: 0x0000, 44100 Hz, stereo, s16, 64 kb/s Stream mapping: Stream #0.1 -> #0.0 Stream #0.0 -> #0.1 Encoder (codec id 146) not found for output stream #0.0
FFMPEG(SSH) Output:
ffmpeg version 1.0.git Copyright (c) 2000-2012 the FFmpeg developers built on Oct 6 2012 01:54:50 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4) configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3 libavutil 51. 73.102 / 51. 73.102 libavcodec 54. 63.100 / 54. 63.100 libavformat 54. 29.105 / 54. 29.105 libavdevice 54. 3.100 / 54. 3.100 libavfilter 3. 19.102 / 3. 19.102 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 16.100 / 0. 16.100 libpostproc 52. 1.100 / 52. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/f1ccd3a27d36270492ce660da358b436.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 creation_time : 2009-12-23 02:00:55 Duration: 00:04:16.32, start: 0.000000, bitrate: 650 kb/s Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 108 kb/s Metadata: creation_time : 2009-12-23 02:00:55 handler_name : (C) 2007 Google Inc. v08.13.2007. Stream #0:1(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 539 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc Metadata: creation_time : 2009-12-23 02:00:55 handler_name : (C) 2007 Google Inc. v08.13.2007. [libvpx @ 0x2166e00] v1.1.0 Output #0, webm, to '/f1ccd3a27d36270492ce660da358b436.webm': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 encoder : Lavf54.29.105 Stream #0:0(und): Video: vp8, yuv420p, 480x360 [SAR 1:1 DAR 4:3], q=-1--1, 200 kb/s, 1k tbn, 29.97 tbc Metadata: creation_time : 2009-12-23 02:00:55 handler_name : (C) 2007 Google Inc. v08.13.2007. Stream #0:1(und): Audio: vorbis, 44100 Hz, stereo, flt Metadata: creation_time : 2009-12-23 02:00:55 handler_name : (C) 2007 Google Inc. v08.13.2007. Stream mapping: Stream #0:1 -> #0:0 (h264 -> libvpx) Stream #0:0 -> #0:1 (aac -> libvorbis) Press [q] to stop, [?] for help [libvorbis @ 0x2167340] Que input is backward in time frame= 2968 fps= 61 q=0.0 Lsize= 4464kB time=00:01:39.03 bitrate= 369.3kbits/s video:3068kB audio:1319kB subtitle:0 global headers:4kB muxing overhead 1.662821%
Error:
Encoder (codec id 146) not found for output stream #0.0
-
How to sync between recording and input live video stream ?
6 octobre 2012, par Abhishek BansalI am working on a project in which I am receiving raw frames from some input video devices. I am trying to write those frames in a video files using FFMPEG library. I have no control over the frame rate i am getting from my input sources. This frame rate varies in run-time also. Now my problem is how do i sync between recorded video and coming video. Depending upon frame-rate i set in FFMPEG and actual frame rate that i am receiving playback of recorded video is either fast or slow than input video. I tried to add timestamps (as numOfFrames) in encoded video as per following link but that didn't help.
Please tell me a way to synchronize both. This is my first time with FFMPEG or any multimedia libraries so any examples will be highly appreciated.
I am using directshow ISampleGrabber interface to capture those frames. Thank You
-
Something wrong with my m3u8 bandwidth value
6 octobre 2012, par Jason
I use ffmpeg to encode my sample videos following the recommanded bitrates in Technical Note TN2224, then use HLS tools to segment it and create playlists, finally create the variant plist file "all.m3u8"
I used the validation tool to validate my HLS content, it ended up showing except for the 64k audio only bandwidth is low, others are stay in the same bandwidth, I opened "all.m3u8" using text editor and seeing that all other bitrate contents are using the same bandwidth. No matter how I change parameters in the ffmpeg command, I still can't correct them. The following command is the one I used to encode contents:
ffmpeg -i input.m4v -acodec libfaac -vcodec libx264 -s 480x360 -b 350k -r 29.97 -vpre medium output.mp4
The following command is for generating the segments and plists:mediafilesegmenter -b http://www.example.com/stream/ -I -f ~/Documents/sample/ output.mp4
The following command is for generating the all.m3u8:variantplaylistcreator -o all.m3u8 http://www.example.com/stream/110/prog_index.m3u8 ~/Documents/sample/110/prog_index.m3u8 -iframe-url http://www.freeyourteam.com/stream/110/iframe_index.m3u8 http://www.example.com/stream/200/prog_index.m3u8 ~/Documents/sample/200/prog_index.m3u8 -iframe-url http://www.freeyourteam.com/stream/200/iframe_index.m3u8 http://www.example.com/stream/350/prog_index.m3u8 ~/Documents/sample/350/prog_index.m3u8 -iframe-url http://www.freeyourteam.com/stream/350/iframe_index.m3u8 http://www.example.com/stream/550/prog_index.m3u8 ~/Documents/sample/550/prog_index.m3u8 -iframe-url http://www.freeyourteam.com/stream/550/iframe_index.m3u8 http://www.example.com/stream/64/prog_index.m3u8 ~/Documents/sample/64/prog_index.m3u8
and in my "all.m3u8", the bandwidths are all 523894:Please allow me to ask two more basic questions:
In the tech note, recommanded bitrates are 64 Kbps, 110 Kbps, 200 Kbps, 350 Kbps, 550 Kbps, I wonder if this value includes the audio bitrate or exclude the audio. How do you insert keyframe to segment? Because in the document it says:"You must include at least one keyframe per segment, preferably more. If you only include one, put it at the beginning of the segment." I don't quite get how you can do it.
Thank you very much for your help and I do appreciate your time.