Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg fastest way to convert videos avi to mp4 [migrated]
5 novembre 2013, par user2938660I have server which has:
- 8x3,4 (sandy bridge cpu)
- 10gb ram
i tried different combinations to convert vvideos i mean avi to mp4 but it takes so long: - ~20mins=~200mb
maybe there is some ffmpeg command which does this much faster?
EDIT WITH ULTRAFAST:
root@1tb:~/test# ffmpeg -i video.avi -c:v libx264 -preset ultrafast out.mp4 ffmpeg version git-2013-10-28-f1f0b01 Copyright (c) 2000-2013 the FFmpeg developers built on Oct 29 2013 02:05:45 with gcc 4.4.5 (Debian 4.4.5-8) configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab libavutil 52. 48.100 / 52. 48.100 libavcodec 55. 39.100 / 55. 39.100 libavformat 55. 19.104 / 55. 19.104 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 90.100 / 3. 90.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Input #0, avi, from 'video.avi': Duration: 00:29:00.28, start: 0.000000, bitrate: 1120 kb/s Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s Metadata: title : Hello.Ladies.S01E06.HDTV.XviD-AFG_360p.audio [libx264 @ 0x2e08e40] using SAR=1/1 [libx264 @ 0x2e08e40] using cpu capabilities: none! [libx264 @ 0x2e08e40] profile Constrained Baseline, level 3.0 [libx264 @ 0x2e08e40] 264 - core 138 r2358 9e941d1 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=23 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 Output #0, mp4, to 'out.mp4': Metadata: encoder : Lavf55.19.104 Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 10000k tbn, 23.98 tbc Stream #0:1: Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s Metadata: title : Hello.Ladies.S01E06.HDTV.XviD-AFG_360p.audio Stream mapping: Stream #0:0 -> #0:0 (mpeg4 -> libx264) Stream #0:1 -> #0:1 (mp3 -> libfaac) Press [q] to stop, [?] for help frame=41726 fps=326 q=-1.0 Lsize= 312916kB time=00:29:00.32 bitrate=1473.0kbits/s dup=1 drop=0 video:284876kB audio:27186kB subtitle:0 global headers:0kB muxing overhead 0.273494% [libx264 @ 0x2e08e40] frame I:167 Avg QP:18.69 size: 30492 [libx264 @ 0x2e08e40] frame P:41559 Avg QP:21.68 size: 6897 [libx264 @ 0x2e08e40] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x2e08e40] mb P I16..4: 6.3% 0.0% 0.0% P16..4: 51.2% 0.0% 0.0% 0.0% 0.0% skip:42.5% [libx264 @ 0x2e08e40] coded y,uvDC,uvAC intra: 44.9% 54.5% 19.0% inter: 28.1% 20.3% 2.2% [libx264 @ 0x2e08e40] i16 v,h,dc,p: 43% 23% 21% 13% [libx264 @ 0x2e08e40] i8c dc,h,v,p: 36% 22% 32% 11% [libx264 @ 0x2e08e40] kb/s:1340.96 root@1tb:~/test# qt-faststart out.mp4 labas1.mp4 ftyp 0 32 free 32 8 mdat 40 319552104 moov 319552144 873943 patching stco atom... patching stco atom... writing ftyp atom... writing moov atom... copying rest of file... root@1tb:~/test#
-
FFmpeg detecting the first frame after a commercial
5 novembre 2013, par William Joe BaldwinI've been searching for a way to detect the very first frame after a commercial in FFmpeg. My recorder records TV shows, approximately 1 second before the sequence. Therefore the video file starts with few frames of the commercial.
By checking the page below, it seems there is a way to detect scene changes:
Extract Thumbnails of Every Camera Change on a Video File
Does anyone know a way to rewrite the code from the link to get the first scene change as frame count?
Thanks!
-
x264 parameters configuration
5 novembre 2013, par user1558688I need to configure x264 to reproduce the below parameters.
The configuration was extracted using Elecard Stream Analyzer from the first keyframe received from a legacy SIP phone h264 encoder. It is mission critical to reproduce it in software to keep compatibility with other sip clients.
All the information I have are the parameters below.
Is it possible at least to get close to the original ?
Thanks a lot.
0x00000000 H264 Sequence Parameter Set profile_idc = 66 (PROFILE_IDC_Baseline) constraint_set0_flag = 1 constraint_set1_flag = 0 constraint_set2_flag = 0 constraint_set3_flag = 0 constraint_set4_flag = 0 constraint_set5_flag = 0 reserved_zero_2bits = 0 level_idc = 12 seq_parameter_set_id = 4 log2_max_frame_num_minus4 = 4 pic_order_cnt_type = 2 num_ref_frames = 1 gaps_in_frame_num_value_allowed_flag = 0 pic_width_in_mbs_minus1 = 19 (320) pic_height_in_map_units_minus1 = 14 (240) frame_mbs_only_flag = 1 direct_8x8_inference_flag = 1 frame_cropping_flag = 0 vui_parameters_present_flag = 0 0x0000000C H264 Picture Parameter Set pic_parameter_set_id = 4 seq_parameter_set_id = 4 entropy_coding_mode_flag = 0 pic_order_present_flag = 0 num_slice_groups_minus1 = 0 num_ref_idx_L0_active_minus1 = 0 num_ref_idx_L1_active_minus1 = 0 weighted_pred_flag = 0 weighted_bipred_idc = 0 pic_init_qp_minus26 = 2 pic_init_qs_minus26 = 0 chroma_qp_index_offset = 0 deblocking_filter_control_present_flag = 1 constrained_intra_pred_flag = 0 redundant_pic_cnt_present_flag = 0 0x00000014 H264 I slice #1 { frame_num = 0 } first_mb_in_slice = 0 slice_type = 2 pic_parameter_set_id = 4 frame_num = 0 idr_pic_id = 4 dec_ref_pic_marking(): if(IdrPicFlag) no_output_of_prior_pics_flag = 0 long_term_reference_flag = 0 slice_qp_delta = 0 disable_deblocking_filter_idc = 0 slice_alpha_c0_offset_div2 = 0 slice_beta_offset_div2 = 0 0x00000591 H264 I slice #1 { frame_num = 0 } first_mb_in_slice = 126 slice_type = 2 pic_parameter_set_id = 4 frame_num = 0 idr_pic_id = 4 dec_ref_pic_marking(): if(IdrPicFlag) no_output_of_prior_pics_flag = 0 long_term_reference_flag = 0 slice_qp_delta = 0 disable_deblocking_filter_idc = 0 slice_alpha_c0_offset_div2 = 0 slice_beta_offset_div2 = 0 0x00000B34 H264 I slice #1 { frame_num = 0 } first_mb_in_slice = 201 slice_type = 2 pic_parameter_set_id = 4 frame_num = 0 idr_pic_id = 4 dec_ref_pic_marking(): if(IdrPicFlag) no_output_of_prior_pics_flag = 0 long_term_reference_flag = 0 slice_qp_delta = 0 disable_deblocking_filter_idc = 0 slice_alpha_c0_offset_div2 = 0 slice_beta_offset_div2 = 0
-
FFmpeg capabillities when compiled in LGPL mode
4 novembre 2013, par powerXI'm searching all over the web to find out what capabillities of the FFmpeg library one loses when he compiles is under the LGPL license. I went deeper on that question, downloaded and checked the license of every library inside FFmpeg and receive that the following internal libs are under the GPL license:
frei0r,gnutls,lame,libass,libiconv,rtmpdump,schroedinger,vid.stab,x264,xavs,xvid
and the following are under the LGPL license:
bzip2,fontconfig,libbluray,libgsm,libtheora,libvorbis,libvpx,opus,soxr,twolame
Now, I can go and read the documentation(if any) of those libraries(and I did) but it still vague about what capabillities are lost when using it under the LGPL license.
-
FFMPEG Invalid value '1' for option 'loop'
4 novembre 2013, par helloworldI am trying to run this code (It did work on my previously server, but now i keep getting this annoying error):
ffmpeg -loop 1 -r 25 -t 322 -i /home/kampmann/public_html/m/xxx/movie_10262.jpg -q:v 1 -an /home/kampmann/public_html/m/xxxs/573240.mp4 2>&1
Error: Invalid value '1' for option 'loop'
Here is my 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 Invalid value '1' for option 'loop'