Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg watermark to mp4
20 octobre 2013, par user2899426Trying to add a png graphic as watermark to an existing mp4 video with audio. But each time I produce an ouputfile there is no audio included / encoded ? For testing pupose i only want a small 30 second clip
ffmpeg -t 0:0:30.0 -i 'input.mp4' -i 'logo.png' -filter_complex '[0:v][1:v]overlay[out]' -map '[out]' -b:v 5842k -c:a copy out.mp4
have managed to extract audio to seperate mp3 file to check codec works
FYI built ffmpeg from gitclone Thanks this is driving me nuts.
-
ffmpeg - over 1000 files into a mp4
20 octobre 2013, par FabrizioI am using FreeBSD and ffmpeg and I am trying to convert over 1000 files into an mp4. Keep in mind that I am completely NEW to ffmpeg and that in the future I might have up to 3600 images.
I was thinking that simply executing:
ffmpeg -i /usr/local/www/tmp/phpFa5LT3/*.jpg -r 2 output.mp4
would work, but I keep getting
ffmpeg version 0.7.12, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 9 2013 12:48:13 with gcc 4.2.1 20070831 patched [FreeBSD] configuration: --prefix=/usr/local --mandir=/usr/local/man --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --cc=cc --extra-cflags='-msse -I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-pthread --disable-debug --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libcelt --disable-libdirac --disable-libfaac --enable-libfreetype --enable-frei0r --disable-libgsm --disable-libmp3lame --enable-libopencv --enable-libopenjpeg --disable-librtmp --enable-libschroedinger --disable-ffplay --disable-libspeex --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, image2, from '20131019205500.jpg': Duration: 00:00:00.50, start: 0.000000, bitrate: N/A Stream #0.0: Video: mjpeg, yuvj420p, 320x240 [PAR 96:96 DAR 4:3], 2 tbr, 2 tbn, 2 tbc Too many output files
When I try:
ffmpeg -y -f image2 -r 4 -i /usr/local/www/tmp/phpFa5LT3/%14d.jpg output.mp4
I get:
[same output but last line reads] /usr/local/www/tmp/phpFa5LT3/%12d.jpg: No such file or directory
If I reduce the number of files to just a 100 or so, I can do it without any problems... Do you know what the problem might be ?
#ulimit -a cpu time (seconds, -t) unlimited file size (512-blocks, -f) unlimited data seg size (kbytes, -d) 33554432 stack size (kbytes, -s) 524288 core file size (512-blocks, -c) unlimited max memory size (kbytes, -m) unlimited locked memory (kbytes, -l) unlimited max user processes (-u) 5547 open files (-n) 230400 virtual mem size (kbytes, -v) unlimited swap limit (kbytes, -w) unlimited sbsize (bytes, -b) unlimited pseudo-terminals (-p) unlimited
-
MediaCodec hardware decoder much slower with different server configuration ?
19 octobre 2013, par mathieujofisI've been using the Android
MediaCodec
in order to (hardware) decodeH.264
frames on myGalaxy S4
coming from a Live 555RTSP
live (real-time) stream. After changing my Live 555 server configuration from usingffmpeg
(withx264
) to encode frames, to using strictlyx264
to encode frames, the time to decode frames withMediaCodec
takes much longer. Basically, MediaCodec can't keep up with the stream, and displays the video in slow motion, getting slower and slower as time goes on. Going back toffmpeg
isn't a solution for me, because I need the ability to encode into discreteNAL
units, rather than a whole frame likeffmpeg
does.I was wondering if this was either: A) An issue with the way my server is encoding
NAL
units, or B) An issue with my Android client, specifically the way it is receiving and decodingNAL
units.My encoding configuration with x264 is:
x264_param_default_preset(¶m,"ultrafast", "zerolatency:fastdecode"); param.i_threads = 1; param.i_bframe = 1; param.i_width = image_width; param.i_height = image_height; param.i_fps_num = 60; param.i_fps_den = 1; param.i_keyint_max = 10; param.rc.i_rc_method = X264_RC_ABR; param.rc.i.bitrate = 6000; param.i_sps_id = 7; param.b_repeat_headers = 1; param.b_annexb = 0;
My Android MediaCodec client is set up as follows:
I receive each individual
NAL
unit on a separate Live 555RTSP
client thread. EachNAL
is put into a queue along with its size and presentation time. A separate decoder thread grabsNALs
from this queue, and if there are none available, waits until there are.Some notes:
What I generally see happen is the queue starts filling up with
NALs
, instead of staying close to empty. So, I know that the decoder thread is not working fast enough. I don't think this is an inherent problem with decoding on an Android phone (for example, processing limitations) because it does the same thing for very low bitrates-- also again, it DID work when I was usingffmpeg
to encode. If I omit certainNAL
units, the decoder can start to keep up. Since I'm using Cyanogenmod 10.1, bumping up the minimum CPU frequency helps, too.Edit:
Here is a log of the Android client, as well as a log highlighting the garbage collector specifically--
Entire Logcat:
10-15 16:40:03.955: D/DecodeActivity(18859): INFO_OUTPUT_BUFFERS_CHANGED 10-15 16:40:03.995: E/OMX-VDEC-1080P(288): Sync frame received 10-15 16:40:03.995: E/OMX-VDEC-1080P(288): No color conversion required 10-15 16:40:03.995: E/OMX-VDEC-1080P(288): Get_parameter: OMX_IndexParamPortDefinition: nPortIndex (1), nFrameWidth (1280), nFrameHeight (720), nStride (1280), nSliceHeight (736), nBitrate (-1073741824), xFramerate (0x1e), nBufferSize (1433600), nBufferCountMin (4), nBufferCountActual (8), bBuffersContiguous (1918394328), nBufferAlignment (1075643347), bEnabled (1), bPopulated (1), eCompressionFormat (0x0), eColorFormat (0x7fa30c03) 10-15 16:40:03.995: D/DecodeActivity(18859): New format {height=720, what=1869968451, color-format=2141391875, slice-height=736, crop-left=0, width=1280, crop-bottom=719, crop-top=0, mime=video/raw, stride=1280, crop-right=1279} 10-15 16:40:04.005: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4966) fps(201.369308) 10-15 16:40:04.015: W/IInputConnectionWrapper(1069): showStatusIcon on inactive InputConnection 10-15 16:40:04.025: I/ActivityManager(698): Displayed com.mathieu.alloclient.javadecoder/.MainActivity: +617ms 10-15 16:40:04.025: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4766) fps(209.819550) 10-15 16:40:04.125: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4733) fps(211.282486) 10-15 16:40:04.445: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4711) fps(212.269150) 10-15 16:40:04.495: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4700) fps(212.765961) 10-15 16:40:05.676: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4688) fps(213.310577) 10-15 16:40:06.087: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 1ms 10-15 16:40:06.207: D/dalvikvm(698): GC_EXPLICIT freed 4120K, 39% free 24216K/39664K, paused 7ms+9ms, total 117ms 10-15 16:40:06.537: D/ALSADevice(288): standby: handle 0x40024450 h 0x0 10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _verb value Inactive 10-15 16:40:06.577: D/alsa_ucm(288): Set mixer controls for HiFi Lowlatency enable 0 10-15 16:40:06.577: D/alsa_ucm(288): Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia5, value: 0 10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _disdev value Line 10-15 16:40:06.577: D/alsa_ucm(288): disdev: device Line not enabled, no need to disable 10-15 16:40:06.577: D/alsa_ucm(288): snd_use_case_set(): uc_mgr 0x400fbfb0 identifier _disdev value Speaker 10-15 16:40:06.577: D/alsa_ucm(288): Set mixer controls for Speaker enable 0 10-15 16:40:06.577: D/alsa_ucm(288): Setting mixer control: RX5 MIX1 INP1, value: ZERO 10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: RX5 MIX1 INP2, value: ZERO 10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: LINEOUT2 Volume, value: 0 10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: LINEOUT4 Volume, value: 0 10-15 16:40:06.587: D/alsa_ucm(288): Setting mixer control: RX5 Digital Volume, value: 0 10-15 16:40:06.587: D/AudioUsbALSA(288): exitPlaybackThread, mproxypfdPlayback: -1 10-15 16:40:06.587: D/AudioUsbALSA(288): closeDevice handle 0x0 10-15 16:40:06.587: D/AudioUsbALSA(288): closeDevice handle 0x0 10-15 16:40:17.638: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4677) fps(213.812271) 10-15 16:40:17.698: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4644) fps(215.331604) 10-15 16:40:20.681: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4633) fps(215.842865) 10-15 16:40:21.111: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4611) fps(216.872696) 10-15 16:40:25.746: D/dalvikvm(698): GC_CONCURRENT freed 5829K, 41% free 23778K/39664K, paused 10ms+24ms, total 165ms 10-15 16:40:28.448: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.800000 hotplug_avg_load_dw: 74 10-15 16:40:28.448: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:243.000000 10-15 16:40:30.841: W/SystemClock(698): time going backwards: prev 16555345563411(ioctl) vs now 16555345441341(ioctl), tid=764 10-15 16:40:44.684: D/dalvikvm(698): GC_CONCURRENT freed 5302K, 41% free 23774K/39664K, paused 6ms+9ms, total 107ms 10-15 16:40:57.467: E/OMX-VDEC-1080P(288): set_frame_rate: frm_int(4577) fps(218.483719) 10-15 16:41:14.383: D/dalvikvm(698): GC_CONCURRENT freed 5371K, 41% free 23768K/39664K, paused 7ms+8ms, total 146ms 10-15 16:41:14.403: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.500000 hotplug_avg_load_dw: 89 10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000 10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000 10-15 16:41:14.403: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:922.000000 10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 48 10-15 16:41:27.466: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_HELLO 10-15 16:41:27.466: E/kickstart(862): EVENT: SENDING --> SAHARA_HELLO_RESPONSE 10-15 16:41:27.466: E/kickstart(862): EVENT: sahara_mode = 2 10-15 16:41:27.466: E/kickstart(862): EVENT: m_comm->sahara_hello_packet_rx.mode = 2 10-15 16:41:27.466: E/kickstart(862): EVENT: helloRx.mode = 2 10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 64 10-15 16:41:27.466: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_MEMORY_DEBUG 10-15 16:41:27.466: E/kickstart(862): Total bytes received so far: 116 10-15 16:41:27.466: E/kickstart(862): EVENT: 0x46980000, len=000C0000, "m9kefs1", "" 10-15 16:41:27.466: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_MEMORY_REGION 10-15 16:41:27.466: E/kickstart(862): EVENT: Saving "/dev/block/platform/msm_sdcc.1/by-name/m9kefs1" 10-15 16:41:27.526: E/kickstart(862): Total bytes received so far: 786548 10-15 16:41:27.526: E/kickstart(862): EVENT: Received: 786432 bytes 10-15 16:41:27.526: E/kickstart(862): EVENT: Writing to disk 10-15 16:41:27.526: E/kickstart(862): EVENT: Successfully wrote to disk 10-15 16:41:27.526: E/kickstart(862): Received file "m9kefs1" 10-15 16:41:27.576: E/kickstart(862): Sync finish Received file "m9kefs1" 10-15 16:41:27.576: E/kickstart(862): 786432 bytes transferred in 0.106s (7.10 MBps) 10-15 16:41:27.576: E/kickstart(862): EVENT: num_debug_entries not >=0 10-15 16:41:27.576: E/kickstart(862): Successfully downloaded files from target 10-15 16:41:27.576: E/kickstart(862): EVENT: SENDING --> SAHARA_RESET 10-15 16:41:27.576: E/kickstart(862): Total bytes received so far: 786556 10-15 16:41:27.576: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_RESET_RESP 10-15 16:41:27.576: E/kickstart(862): Sahara protocol completed 10-15 16:41:27.576: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_HELLO 10-15 16:41:27.746: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.100000 hotplug_avg_load_dw: 79 10-15 16:41:27.746: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000 10-15 16:41:49.598: D/dalvikvm(698): GC_CONCURRENT freed 5339K, 41% free 23775K/39664K, paused 10ms+7ms, total 134ms 10-15 16:42:17.225: I/ActivityManager(698): Start proc com.cyanogenmod.lockclock for service com.cyanogenmod.lockclock/.weather.WeatherUpdateService: pid=18954 uid=10028 gids={50028, 3003, 1028} 10-15 16:42:17.865: D/WeatherXmlParser(18954): Weather updated: WeatherInfo for Santa Barbara@ Tue Oct 15 16:42:17 PDT 2013: Fair(34), temperature 29°C, low 11°, high 27°, humidity 14%, wind 11km/h at W 10-15 16:42:17.945: I/ActivityManager(698): No longer want com.google.android.apps.uploader (pid 13565): empty #17 10-15 16:42:24.021: D/dalvikvm(698): GC_CONCURRENT freed 5277K, 41% free 23770K/39664K, paused 8ms+11ms, total 106ms 10-15 16:42:35.983: W/ThrottleService(698): unable to find stats for iface rmnet0 10-15 16:42:59.476: D/dalvikvm(698): GC_CONCURRENT freed 5345K, 41% free 23770K/39664K, paused 6ms+13ms, total 168ms 10-15 16:43:02.098: E/kickstart(862): Total bytes received so far: 48 10-15 16:43:02.098: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_HELLO 10-15 16:43:02.098: E/kickstart(862): EVENT: SENDING --> SAHARA_HELLO_RESPONSE 10-15 16:43:02.098: E/kickstart(862): EVENT: sahara_mode = 2 10-15 16:43:02.098: E/kickstart(862): EVENT: m_comm->sahara_hello_packet_rx.mode = 2 10-15 16:43:02.098: E/kickstart(862): EVENT: helloRx.mode = 2 10-15 16:43:02.098: E/kickstart(862): Total bytes received so far: 64 10-15 16:43:02.098: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_MEMORY_DEBUG 10-15 16:43:02.108: E/kickstart(862): Total bytes received so far: 116 10-15 16:43:02.108: E/kickstart(862): EVENT: 0x46980000, len=000C0000, "m9kefs2", "" 10-15 16:43:02.108: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_MEMORY_REGION 10-15 16:43:02.108: E/kickstart(862): EVENT: Saving "/dev/block/platform/msm_sdcc.1/by-name/m9kefs2" 10-15 16:43:02.158: E/kickstart(862): Total bytes received so far: 786548 10-15 16:43:02.158: E/kickstart(862): EVENT: Received: 786432 bytes 10-15 16:43:02.158: E/kickstart(862): EVENT: Writing to disk 10-15 16:43:02.168: E/kickstart(862): EVENT: Successfully wrote to disk 10-15 16:43:02.168: E/kickstart(862): Received file "m9kefs2" 10-15 16:43:02.218: E/kickstart(862): Sync finish Received file "m9kefs2" 10-15 16:43:02.218: E/kickstart(862): 786432 bytes transferred in 0.113s (6.65 MBps) 10-15 16:43:02.218: E/kickstart(862): EVENT: num_debug_entries not >=0 10-15 16:43:02.218: E/kickstart(862): Successfully downloaded files from target 10-15 16:43:02.218: E/kickstart(862): EVENT: SENDING --> SAHARA_RESET 10-15 16:43:02.218: E/kickstart(862): Total bytes received so far: 786556 10-15 16:43:02.218: E/kickstart(862): EVENT: RECEIVED <-- SAHARA_RESET_RESP 10-15 16:43:02.218: E/kickstart(862): Sahara protocol completed 10-15 16:43:02.218: E/kickstart(862): EVENT: STATE <-- SAHARA_WAIT_HELLO 10-15 16:43:17.563: W/SystemClock(698): time going backwards: prev 16722067121029(ioctl) vs now 16722066968441(ioctl), tid=764 10-15 16:43:34.610: D/dalvikvm(698): GC_CONCURRENT freed 5359K, 41% free 23772K/39664K, paused 9ms+9ms, total 113ms 10-15 16:43:36.452: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.900000 hotplug_avg_load_dw: 100 10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000 10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000 10-15 16:43:36.452: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:194.000000 10-15 16:44:09.965: D/dalvikvm(698): GC_CONCURRENT freed 5369K, 41% free 23779K/39664K, paused 8ms+8ms, total 103ms 10-15 16:44:09.965: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 30ms 10-15 16:44:10.605: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.800000 hotplug_avg_load_dw: 133 10-15 16:44:10.605: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000 10-15 16:44:12.707: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.100000 hotplug_avg_load_dw: 116 10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000 10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000 10-15 16:44:12.707: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000 10-15 16:44:14.008: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:1.700000 hotplug_avg_load_dw: 140 10-15 16:44:14.008: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:240.000000 10-15 16:44:14.759: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:4.900000 hotplug_avg_load_dw: 132 10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000 10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000 10-15 16:44:14.759: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000 10-15 16:44:15.360: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.300000 hotplug_avg_load_dw: 139 10-15 16:44:15.360: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:243.000000 10-15 16:44:15.560: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.900000 hotplug_avg_load_dw: 133 10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000 10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000 10-15 16:44:15.560: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:95.000000 10-15 16:44:16.361: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:2.500000 hotplug_avg_load_dw: 132 10-15 16:44:16.361: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:242.000000 10-15 16:44:16.661: E/MP-Decision(1385): num online cores: 3 reqd : 4 available : 4 rq_depth:3.700000 hotplug_avg_load_dw: 127 10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000 10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000 10-15 16:44:16.661: E/MP-Decision(1385): UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:97.000000 10-15 16:44:20.605: E/MP-Decision(1385): num online cores: 4 reqd : 3 available : 4 rq_depth:1.700000 hotplug_avg_load_dw: 122 10-15 16:44:20.605: E/MP-Decision(1385): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:244.000000 10-15 16:44:20.615: W/ProcessStats(698): Skipping unknown process pid 19038 10-15 16:44:20.615: W/ProcessStats(698): Skipping unknown process pid 19041
Garbage collector entries in Logcat:
10-15 16:40:06.087: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 1ms 10-15 16:40:06.207: D/dalvikvm(698): GC_EXPLICIT freed 4120K, 39% free 24216K/39664K, paused 7ms+9ms, total 117ms 10-15 16:40:25.746: D/dalvikvm(698): GC_CONCURRENT freed 5829K, 41% free 23778K/39664K, paused 10ms+24ms, total 165ms 10-15 16:40:44.684: D/dalvikvm(698): GC_CONCURRENT freed 5302K, 41% free 23774K/39664K, paused 6ms+9ms, total 107ms 10-15 16:41:14.383: D/dalvikvm(698): GC_CONCURRENT freed 5371K, 41% free 23768K/39664K, paused 7ms+8ms, total 146ms 10-15 16:41:49.598: D/dalvikvm(698): GC_CONCURRENT freed 5339K, 41% free 23775K/39664K, paused 10ms+7ms, total 134ms 10-15 16:42:24.021: D/dalvikvm(698): GC_CONCURRENT freed 5277K, 41% free 23770K/39664K, paused 8ms+11ms, total 106ms 10-15 16:42:59.476: D/dalvikvm(698): GC_CONCURRENT freed 5345K, 41% free 23770K/39664K, paused 6ms+13ms, total 168ms 10-15 16:43:34.610: D/dalvikvm(698): GC_CONCURRENT freed 5359K, 41% free 23772K/39664K, paused 9ms+9ms, total 113ms 10-15 16:44:09.965: D/dalvikvm(698): GC_CONCURRENT freed 5369K, 41% free 23779K/39664K, paused 8ms+8ms, total 103ms 10-15 16:44:09.965: D/dalvikvm(698): WAIT_FOR_CONCURRENT_GC blocked 30ms 10-15 16:44:24.389: D/dalvikvm(698): GC_EXPLICIT freed 3618K, 41% free 23768K/39664K, paused 12ms+11ms, total 123ms
-
ffmpeg apply filters without rencoding ?
19 octobre 2013, par nbubisI want to rotate a video using ffmpeg, but I don't want to lose quality by re-encoding.
If I try
ffmpeg -i in.mp4 -vf 'vflip,hflip' -ss 120 -t 200 -c:v copy -c:a copy out.mp4
No rotation gets preformed. If I instead specify the encoding by using, say
-c:v h264
, I'm afraid I'll lose some quality. Is there a "losssless" (relative to the original encoding) way of applying a filter? -
FFMPEG : Change Video during encoding (using mapping)
18 octobre 2013, par TchoupiI'm currently trying to concat several videos using a complex filter:
ffmpeg.exe -threads 8 -i "D:\Temporary0.mp4" -i "D:\Temporary1.mp4" -i "D:\Temporary2.mp4" -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] concat=n=3:v=1:a=1 [v] [a] " -map "[v]" -map "[a]" -vcodec libx264 -b 2500000 -s 1920:1080 -y D:\EditedVideo.mp4
This command work fine. Edit: Here the output of the command:
ffmpeg version N-56297-g7ac6c63 Copyright (c) 2000-2013 the FFmpeg developers built on Sep 15 2013 18:02:28 with gcc 4.7.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu ray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 52. 43.100 / 52. 43.100 libavcodec 55. 31.101 / 55. 31.101 libavformat 55. 16.102 / 55. 16.102 libavdevice 55. 3.100 / 55. 3.100 libavfilter 3. 84.100 / 3. 84.100 libswscale 2. 5.100 / 2. 5.100 libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Temporary0.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf55.16.102 Duration: 00:00:02.91, start: 0.033333, bitrate: 8998 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 8965 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Temporary1.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf55.16.102 Duration: 00:00:05.00, start: 0.023220, bitrate: 846 kb/s Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 835 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #1:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 1 kb/s (default) Metadata: handler_name : SoundHandler Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Temporary2.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf55.16.102 Duration: 00:00:04.35, start: 0.033333, bitrate: 4684 kb/s Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4581 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #2:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler Please use -b:a or -b:v, -b is ambiguous [libx264 @ 04f617e0] using SAR=1/1 [libx264 @ 04f617e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 04f617e0] profile High, level 4.0 [libx264 @ 04f617e0] 264 - core 135 r2345 f0c1c53 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subm e=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 r c=abr mbtree=1 bitrate=2500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'D:\EditedVideo.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf55.16.102 Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 2500 kb/s, 12800 tbn, 25 tbc Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s Stream mapping: Stream #0:0 (h264) -> concat:in0:v0 Stream #0:1 (aac) -> concat:in0:a0 Stream #1:0 (h264) -> concat:in1:v0 Stream #1:1 (aac) -> concat:in1:a0 Stream #2:0 (h264) -> concat:in2:v0 Stream #2:1 (aac) -> concat:in2:a0 concat:out:v0 -> Stream #0:0 (libx264) concat:out:a0 -> Stream #0:1 (libvo_aacenc) Press [q] to stop, [?] for help frame= 306 fps= 43 q=-1.0 Lsize= 3557kB time=00:00:12.29 bitrate=2369.4kbits/s dup=1 drop=0 video:3353kB audio:193kB subtitle:0 global headers:0kB muxing overhead 0.288541% [libx264 @ 04f617e0] frame I:3 Avg QP:21.78 size:173526 [libx264 @ 04f617e0] frame P:112 Avg QP:25.76 size: 17363 [libx264 @ 04f617e0] frame B:191 Avg QP:31.04 size: 5068 [libx264 @ 04f617e0] consecutive B-frames: 11.8% 14.4% 2.0% 71.9% [libx264 @ 04f617e0] mb I I16..4: 14.6% 82.7% 2.6% [libx264 @ 04f617e0] mb P I16..4: 3.5% 8.8% 0.2% P16..4: 30.1% 5.3% 2.6% 0.0% 0.0% skip:49.4% [libx264 @ 04f617e0] mb B I16..4: 0.7% 1.1% 0.0% B16..8: 21.6% 1.2% 0.1% direct: 1.2% skip:74.1% L0:47.0% L1:50.6% BI: 2.4% [libx264 @ 04f617e0] final ratefactor: 25.69 [libx264 @ 04f617e0] 8x8 transform intra:70.8% inter:88.5% [libx264 @ 04f617e0] coded y,uvDC,uvAC intra: 34.3% 50.2% 7.2% inter: 7.3% 13.3% 0.3% [libx264 @ 04f617e0] i16 v,h,dc,p: 22% 33% 7% 37% [libx264 @ 04f617e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 22% 34% 4% 5% 4% 5% 4% 5% [libx264 @ 04f617e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 22% 18% 5% 6% 6% 5% 6% 4% [libx264 @ 04f617e0] i8c dc,h,v,p: 60% 21% 16% 3% [libx264 @ 04f617e0] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 04f617e0] ref P L0: 62.6% 9.1% 19.8% 8.5% [libx264 @ 04f617e0] ref B L0: 85.3% 12.6% 2.1% [libx264 @ 04f617e0] ref B L1: 92.4% 7.6% [libx264 @ 04f617e0] kb/s:2243.97 [libvo_aacenc @ 0420e900] 1 frames left in the queue on closing
I would like to update this command to change volume during concat and encode time:
ffmpeg.exe -threads 8 -i "D:\Temporary0.mp4" -i "D:\Temporary1.mp4" -i "D:\Temporary2.mp4" -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] concat=n=3:v=1:a=1 [v] [a] " -map "[v]" -map "[a]" -vcodec libx264 -b 2500000 -s 1920:1080 -af volume="volume=20dB:precision=double" -y D:\EditedVideo.mp4
This command is executed but the audio stream is not altered with the +20db
PS: If I do a simple encoding command like
ffmpeg.exe -i source -vcodec libx264 -af volume="volume=20dB:precision=double" -y output
Command work fine and audio stream is modified.
So How can I Do to concat my videos and change audio volume at the same time ?
Thanks