
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (48)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (11558)
-
keepalive type and frequency in ffmpeg [on hold]
19 novembre 2013, par Jack SimthMy company has a bunch of IP cameras that we distribute - specifically Grandstream - and the manufacturer has changed their firmware. The normal keepalive that ffmpeg uses for the rtsp streams ( either ff_rtsp_send_cmd_async(s, "GET_PARAMETER", rt->control_uri, NULL) ; or ff_rtsp_send_cmd_async(s, "OPTIONS", "*", NULL) ; both in in libavformat/rtspdec.c) is no longer working, for two reasons :
1) The new Grandstream firmware is now checking for a receiver report to determine whether or not the program reading the stream is live, not just anything.
2) The new Grandstream firmware requires that the receiver report to keep the connection alive happen at least once every 25 seconds, and on the audio stream it is currently only happening about every 30 seconds or so (video is getting it every 7 seconds or so).
So after about a minute with ffmpeg connected, the camera stops sending the audio stream, the audio stream on ffmpeg reads end-of-file, and then ffmpeg shuts everything down.
As I can't change the firmware, I'm trying to dig through the ffmpeg code to make it send the appropriate receiver report for the keep alive... but I am getting nowhere. I've added a little snippet of code into the receiver reports so I know when they're running when I call ffmpeg on debug, but... well, it's not going well.
Test command :
ffmpeg -loglevel debug -i rtsp ://admin:admin@192.168.4.3:554/0 -acodec libmp3lame -ar 22050 -vcodec copy -y -f flv /dev/null &> test.txtTest output :
`[root@localhost ffmpeg]# cat test.txt
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 21 2013 14:24:28 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --datadir=/usr/share/ffmpeg --bindir=/usr/local/bin --libdir=/usr/local/lib --incdir=/usr/local/include --shlibdir=/usr/lib --mandir=/usr/share/man --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-libx264 --enable-gpl --enable-version3 --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-x11grab --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-static --enable-libgsm --enable-libxvid --enable-libvpx --enable-libvorbis --enable-libvo-aacenc --enable-libmp3lame
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'rtsp://admin:admin@192.168.4.3:554/0'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'libmp3lame'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '22050'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'flv'.
Reading option '/dev/null' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file rtsp://admin:admin@192.168.4.3:554/0.
Successfully parsed a group of options.
Opening an input file: rtsp://admin:admin@192.168.4.3:554/0.
[rtsp @ 0x9d9ccc0] SDP:
v=0
o=StreamingServer 3331435948 1116907222000 IN IP4 192.168.4.3
s=h264.mp4
c=IN IP4 0.0.0.0
t=0 0
a=control:*
m=video 0 RTP/AVP 96
a=control:trackID=0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LgHtoCgPRA,aM4wpIA=
m=audio 0 RTP/AVP 0
a=control:trackID=1
a=rtpmap:0 PCMU/8000
a=ptime:20
m=application 0 RTP/AVP 107
a=control:trackID=2
a=rtpmap:107 vnd.onvif.metadata/90000
[rtsp @ 0x9d9ccc0] video codec set to: h264
[NULL @ 0x9d9f400] RTP Packetization Mode: 1
[NULL @ 0x9d9f400] Extradata set to 0x9d9f900 (size: 22)!
[rtsp @ 0x9d9ccc0] audio codec set to: pcm_mulaw
[rtsp @ 0x9d9ccc0] audio samplerate set to: 8000
[rtsp @ 0x9d9ccc0] audio channels set to: 1
[rtsp @ 0x9d9ccc0] hello state=0
[h264 @ 0x9d9f400] Current profile doesn't provide more RBSP data in PPS, skipping
Last message repeated 1 times
[rtsp @ 0x9d9ccc0] All info found
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://admin:admin@192.168.4.3:554/0':
Metadata:
title : h264.mp4
Duration: N/A, start: 0.000000, bitrate: 64 kb/s
Stream #0:0, 28, 1/90000: Video: h264 (Constrained Baseline), yuv420p, 640x480, 1/180000, 10 tbr, 90k tbn, 180k tbc
Stream #0:1, 156, 1/8000: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Successfully opened the file.
Parsing a group of options: output file /dev/null.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument libmp3lame.
Applying option ar (set audio sampling rate (in Hz)) with argument 22050.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: /dev/null.
Successfully opened the file.
detected 2 logical cores
[graph 0 input from stream 0:1 @ 0x9f15380] Setting 'time_base' to value '1/8000'
[graph 0 input from stream 0:1 @ 0x9f15380] Setting 'sample_rate' to value '8000'
[graph 0 input from stream 0:1 @ 0x9f15380] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 0:1 @ 0x9f15380] Setting 'channel_layout' to value '0x4'
[graph 0 input from stream 0:1 @ 0x9f15380] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4
[audio format for output stream 0:1 @ 0x9efa7c0] Setting 'sample_fmts' to value 's32p|fltp|s16p'
[audio format for output stream 0:1 @ 0x9efa7c0] Setting 'sample_rates' to value '22050'
[audio format for output stream 0:1 @ 0x9efa7c0] Setting 'channel_layouts' to value '0x4|0x3'
[audio format for output stream 0:1 @ 0x9efa7c0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[AVFilterGraph @ 0x9f15980] query_formats: 4 queried, 9 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0x9dfada0] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:s16p r:22050Hz
Output #0, flv, to '/dev/null':
Metadata:
title : h264.mp4
encoder : Lavf55.12.100
Stream #0:0, 0, 1/1000: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 640x480, 1/90000, q=2-31, 1k tbn, 90k tbc
Stream #0:1, 0, 1/1000: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 22050 Hz, mono, s16p
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (pcm_mulaw -> libmp3lame)
Press [q] to stop, [?] for help
Current profile doesn't provide more RBSP data in PPS, skippingrate= 135.4kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 134.4kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 135.0kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 135.5kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 136.9kbits/s
Queue input is backward in time= 233kB time=00:00:13.69 bitrate= 139.4kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 136.3kbits/s
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 13926; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 13952; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 13979; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14005; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14031; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14057; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14083; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14109; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14135; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14161; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14188; changing to 14239. This may result in incorrect timestamps in the output file.
[flv @ 0x9de1200] Non-monotonous DTS in output stream 0:1; previous: 14239, current: 14214; changing to 14239. This may result in incorrect timestamps in the output file.
Current profile doesn't provide more RBSP data in PPS, skippingrate= 141.5kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 142.0kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 142.5kbits/s
Receiver Report delay: 469789, gettime: -1527669086, last_recep: 322446, timebase: -1534837492
Current profile doesn't provide more RBSP data in PPS, skippingrate= 141.5kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 141.7kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 141.1kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 140.6kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 140.7kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.9kbits/s
Receiver Report delay: 132993, gettime: -1516538925, last_recep: 322446, timebase: -1518568234
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.6kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.6kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.7kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.4kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 140.0kbits/s
Receiver Report delay: 897727, gettime: -1504870331, last_recep: 322446, timebase: -1518568552
[NULL @ 0x9d9f400] Current profile doesn't provide more RBSP data in PPS, skipping
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.4kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.1kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.0kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 139.0kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 138.6kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 138.5kbits/s
Current profile doesn't provide more RBSP data in PPS, skippingrate= 138.2kbits/s
EOF on sink link output stream 0:1:default.time=00:00:58.40 bitrate= 139.6kbits/s
No more output streams to write to, finishing.
[libmp3lame @ 0x9dfa580] Trying to remove 344 more samples than there are in the queue
frame= 589 fps= 11 q=-1.0 Lsize= 1003kB time=00:00:58.85 bitrate= 139.5kbits/s
video:724kB audio:231kB subtitle:0 global headers:0kB muxing overhead 4.955356%
2959 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x9e021c0] Statistics: 3 seeks, 2860 writeouts
[root@localhost ffmpeg]# -
Unable to transcode video using ffmpeg transcoder
28 octobre 2014, par user1843970This question may be asked in different forums but still answer is not discovered yet.
I am trying to play *.flv using Video Module and FFMPEG Converter.
Whenever I upload any flv Video , I get the following message :-PHPVideoToolkit error : Execute error. It was not possible to encode "C :\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_3.flv" as FFmpeg returned an error. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".
Installed Modules are :-
Video - 7.x-2.9
Video.js - 7.x-2.3 - Version : 4.0.3
Video transcoder : FFmpeg / avconv : git : c2dd5a1
JW Player
All above are installed correctly.
Configuration of Video Module :-
Inside Player Tab of Video(admin/config/media/video/players), following has been configured :-
A New FLV Preset has been created and added under Preset Tab of Video(admin/config/media/video/presets). Details are as Follows :-
Preset name :- FLV Preset
Video output extension :- FLV Flash Video
Video codec :- H 263/H263-1996,H263+/H0-º1998/H263 Version 2(Not sure about Video Codec)
FFmpeg video preset :- None
Video quality :-None
Video speed :- None
Dimensions :- 640 X 360
Aspect mode :- Preserve Aspect Ratio
When I am uploading the video from content type then it extract the thumbnail as follows :-
After saving the video it shows the following Mesage :-
My gut feeling is that I am setting up wrong preset but I am not able to solve this problem out. Please help me as I am very close to my completion of project which would have been waste without solving the problem.
Updated :-
The Console message is as follows :-
Reported errors
PHPVideoToolkit error : Execute error. It was not possible to encode "C :\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_19.flv" as FFmpeg returned an error. Note, however the error was encountered on the second pass of the encoding process and the first pass appear to go fine. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".
Executed commands and output
/ffmpeg/ffmpeg.exe -i "C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv" -strict experimental -vcodec "h264" -s "320x180" -acodec "aac" -ac "2" -pass "1" -passlogfile "C:\xampp\tmp/1384191046-5281144682cfc-multipass" -y C:\xampp\tmp/1384191046-5281144681e51.flv
ffmpeg version N-49610-gc2dd5a1 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 5 2013 13:26:02 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.100 / 54. 91.100
libavformat 54. 61.104 / 54. 61.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 35.101 / 3. 35.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[flv @ 00000000002fb860] max_analyze_duration 5000000 reached at 5018000 microseconds
Input #0, flv, from 'C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv':
Metadata:
audiodelay : 0
canSeekToEnd : true
Duration: 00:00:06.00, start: 0.000000, bitrate: 118 kb/s
Stream #0:0: Video: vp6f, yuv420p, 360x288, 409 kb/s, 1k tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 96 kb/s
[libx264 @ 0000000002457340] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0000000002457340] profile Main, level 4.0
[libx264 @ 0000000002457340] 264 - core 129 r2245 bc13772 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 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=6 lookahead_threads=1 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 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'C:\xampp\tmp/1384191046-5281144681e51.flv':
Metadata:
audiodelay : 0
canSeekToEnd : true
encoder : Lavf54.61.104
Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 320x180, q=-1--1, pass 1, 1k tbn, 1k tbc
Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (vp6f -> libx264)
Stream #0:1 -> #0:1 (mp3 -> aac)
Press [q] to stop, [?] for help
frame= 2 fps=0.0 q=-1.0 Lsize= 102kB time=00:00:06.10 bitrate= 136.7kbits/s
video:2kB audio:95kB subtitle:0 global headers:0kB muxing overhead 4.978013%
[libx264 @ 0000000002457340] frame I:1 Avg QP:11.95 size: 1595
[libx264 @ 0000000002457340] frame P:1 Avg QP: 2.00 size: 21
[libx264 @ 0000000002457340] mb I I16..4: 86.3% 0.0% 13.8%
[libx264 @ 0000000002457340] mb P I16..4: 0.4% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:99.6%
[libx264 @ 0000000002457340] coded y,uvDC,uvAC intra: 13.8% 40.7% 32.8% inter: 0.0% 0.0% 0.0%
[libx264 @ 0000000002457340] i16 v,h,dc,p: 80% 15% 4% 0%
[libx264 @ 0000000002457340] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 42% 21% 0% 0% 0% 0% 0% 0%
[libx264 @ 0000000002457340] i8c dc,h,v,p: 45% 24% 31% 0%
[libx264 @ 0000000002457340] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000002457340] kb/s:1.08
/ffmpeg/ffmpeg.exe -i "C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv" -strict experimental -vcodec "h264" -s "320x180" -acodec "aac" -ac "2" -pass "2" -passlogfile "C:\xampp\tmp/1384191046-5281144682cfc-multipass" -y C:\xampp\tmp/1384191046-5281144681e51.flv
ffmpeg version N-49610-gc2dd5a1 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 5 2013 13:26:02 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.100 / 54. 91.100
libavformat 54. 61.104 / 54. 61.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 35.101 / 3. 35.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[flv @ 00000000002fb860] max_analyze_duration 5000000 reached at 5018000 microseconds
Input #0, flv, from 'C:\xampp\htdocs\Resonance\sites\default\files\videos\original\barsandtone_7.flv':
Metadata:
audiodelay : 0
canSeekToEnd : true
Duration: 00:00:06.00, start: 0.000000, bitrate: 118 kb/s
Stream #0:0: Video: vp6f, yuv420p, 360x288, 409 kb/s, 1k tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 96 kb/s
[libx264 @ 00000000024e7340] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 00000000024e7340] constant rate-factor is incompatible with 2pass.
Output #0, flv, to 'C:\xampp\tmp/1384191046-5281144681e51.flv':
Metadata:
audiodelay : 0
canSeekToEnd : true
Stream #0:0: Video: h264, yuv420p, 320x180, q=-1--1, pass 2, 90k tbn, 1k tbc
Stream #0:1: Audio: none, 44100 Hz, stereo, fltp, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (vp6f -> libx264)
Stream #0:1 -> #0:1 (mp3 -> aac)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or heightI am not Unix Wizard to get the things out of this. Please help me in suggesting the right path.
-
Re-creating/matching ffmpeg settings
8 novembre 2013, par Pete HelgrenI have an MP4 file that plays pretty much on every browser using either HTML5 or flash fallback (using mediaelement.js). I also have a series of additional video files that I would like to have "match" the one file that does play consistently but I haven't been able to match the ffmpeg settings so it produces a like file. I used ffprobe and got the following results on the file that plays successfully :
ffprobe version N-53616-g7a2edcf Copyright (c) 2007-2013 the FFmpeg developers
built on May 29 2013 01:21:08 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
libavutil 52. 34.100 / 52. 34.100
libavcodec 55. 12.102 / 55. 12.102
libavformat 55. 7.100 / 55. 7.100
libavdevice 55. 1.101 / 55. 1.101
libavfilter 3. 72.100 / 3. 72.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MyFile.mp4':
Metadata:
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
creation_time : 2013-05-29 16:08:29
Duration: 00:01:58.10, start: 0.000000, bitrate: 1155 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 995 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
Metadata:
creation_time : 2013-05-29 16:08:29
handler_name : Mainconcept MP4 Video Media Handler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 157 kb/s
Metadata:
creation_time : 2013-05-29 16:08:29
handler_name : Mainconcept MP4 Sound Media HandlerFollowing a few guides I found online, I am using the following ffmpeg settings :
ffmpeg -i {input file name} -y -acodec aac -ac 2 -strict experimental -ab 64k -s 320x240 -vcodec libx264 -pix_fmt yuv420p -preset slow -profile:v baseline -level 30 -maxrate 300k -bufsize 600k -b:v 300k -f mp4 -threads 0 -movflags +faststart {output file name}
That command produces the following output :
ffmpeg -i "testin.mp4" -y -acodec aac -ac 2 -strict experimental -ab 64k -s 320x240 -vcodec libx264 -pix_fmt yuv420p -preset slow-profile:v baseline -level 30 -maxrate 300k -bufsize 600k -b:v 300k -f mp4 -threads 0 -movflags +faststart testout.mp4
ffmpeg version N-53616-g7a2edcf Copyright (c) 2000-2013 the FFmpeg developers built on May 29 2013 01:21:08 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-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 34.100 / 52. 34.100
libavcodec 55. 12.102 / 55. 12.102
libavformat 55. 7.100 / 55. 7.100
libavdevice 55. 1.101 / 55. 1.101
libavfilter 3. 72.100 / 3. 72.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testin.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2013-10-01 17:11:42
Duration: 00:04:33.75, start: 0.000000, bitrate: 725 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 596 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
Metadata:
creation_time : 2013-10-01 17:11:42
handler_name : ?Mainconcept Video Media Handler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s
Metadata:
creation_time : 2013-10-01 17:11:42
handler_name : #Mainconcept MP4 Sound Media Handler
[libx264 @ 0000000000358160] using SAR=1/1
[libx264 @ 0000000000358160] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2AVX
[libx264 @ 0000000000358160] profile Constrained Baseline, level 3.0
[libx264 @ 0000000000358160] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=cbr mbtree=1 bitrate=300 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=300 vbv_bufsize=600 nal_hrd=none ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'testout.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
encoder : Lavf55.7.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 300 kb/s, 30k tbn, 29.97 tbc
Metadata:
creation_time : 2013-10-01 17:11:42
handler_name : ?Mainconcept Video Media Handler
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 64 kb/s
Metadata:
creation_time : 2013-10-01 17:11:42
handler_name : #Mainconcept MP4 Sound Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> aac)
Press [q] to stop, [?] for help
frame= 283 fps=0.0 q=21.0 size= 329kB time=00:00:09.30 bitrate= 289.9kbits/
frame= 565 fps=564 q=20.0 size= 760kB time=00:00:18.64 bitrate= 333.7kbits/
frame= 846 fps=564 q=21.0 size= 1179kB time=00:00:28.20 bitrate= 342.5kbits/
frame= 1123 fps=561 q=22.0 size= 1603kB time=00:00:37.33 bitrate= 351.7kbits/
frame= 1376 fps=550 q=25.0 size= 1986kB time=00:00:45.69 bitrate= 356.1kbits/
frame= 1651 fps=550 q=22.0 size= 2377kB time=00:00:55.01 bitrate= 353.9kbits/
frame= 1914 fps=546 q=24.0 size= 2776kB time=00:01:03.70 bitrate= 357.0kbits/
frame= 2181 fps=545 q=24.0 size= 3163kB time=00:01:12.70 bitrate= 356.4kbits/
frame= 2443 fps=543 q=24.0 size= 3566kB time=00:01:21.38 bitrate= 358.9kbits/
frame= 2702 fps=540 q=24.0 size= 3939kB time=00:01:30.04 bitrate= 358.4kbits/
frame= 2965 fps=539 q=24.0 size= 4338kB time=00:01:38.73 bitrate= 359.9kbits/
frame= 3236 fps=539 q=23.0 size= 4731kB time=00:01:48.03 bitrate= 358.7kbits/
frame= 3505 fps=539 q=24.0 size= 5130kB time=00:01:56.75 bitrate= 360.0kbits/
frame= 3765 fps=537 q=26.0 size= 5521kB time=00:02:05.41 bitrate= 360.6kbits/
frame= 4036 fps=538 q=24.0 size= 5905kB time=00:02:14.59 bitrate= 359.4kbits/
frame= 4326 fps=540 q=24.0 size= 6343kB time=00:02:24.10 bitrate= 360.6kbits/
frame= 4606 fps=542 q=27.0 size= 6783kB time=00:02:33.49 bitrate= 362.0kbits/
frame= 4886 fps=543 q=24.0 size= 7168kB time=00:02:42.81 bitrate= 360.7kbits/
frame= 5166 fps=544 q=27.0 size= 7616kB time=00:02:52.13 bitrate= 362.5kbits/
frame= 5456 fps=545 q=24.0 size= 8020kB time=00:03:01.84 bitrate= 361.3kbits/
frame= 5736 fps=546 q=27.0 size= 8458kB time=00:03:11.18 bitrate= 362.4kbits/
frame= 6001 fps=545 q=30.0 size= 8849kB time=00:03:20.17 bitrate= 362.1kbits/
frame= 6264 fps=544 q=27.0 size= 9233kB time=00:03:28.85 bitrate= 362.2kbits/
frame= 6526 fps=544 q=26.0 size= 9611kB time=00:03:37.55 bitrate= 361.9kbits/
frame= 6793 fps=543 q=26.0 size= 10006kB time=00:03:46.51 bitrate= 361.9kbits/
frame= 7076 fps=544 q=24.0 size= 10410kB time=00:03:55.86 bitrate= 361.6kbits/
frame= 7355 fps=544 q=25.0 size= 10835kB time=00:04:05.20 bitrate= 362.0kbits/
frame= 7615 fps=543 q=27.0 size= 11236kB time=00:04:13.88 bitrate= 362.5kbits/
frame= 7883 fps=543 q=25.0 size= 11625kB time=00:04:22.89 bitrate= 362.3kbits/
frame= 8166 fps=544 q=21.0 size= 12040kB time=00:04:32.31 bitrate= 362.2kbits/
Starting second pass: moving header on top of the file
frame= 8203 fps=540 q=-1.0 Lsize= 12417kB time=00:04:33.74 bitrate= 371.6kbits/s
video:10035kB audio:2150kB subtitle:0 global headers:0kB muxing overhead 1.901929%
[libx264 @ 0000000000358160] frame I:41 Avg QP:14.13 size: 18349
[libx264 @ 0000000000358160] frame P:8162 Avg QP:17.24 size: 1167
[libx264 @ 0000000000358160] mb I I16..4: 24.8% 0.0% 75.2%
[libx264 @ 0000000000358160] mb P I16..4: 0.4% 0.0% 0.3% P16..4: 29.1% 6.4% 3.2% 0.0% 0.0% skip:60.7%
[libx264 @ 0000000000358160] coded y,uvDC,uvAC intra: 66.1% 74.1% 53.1% inter: 15.3% 20.2% 4.0%
[libx264 @ 0000000000358160] i16 v,h,dc,p: 23% 21% 11% 45%
[libx264 @ 0000000000358160] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 25% 14% 6% 7% 7% 7% 6% 7%
[libx264 @ 0000000000358160] i8c dc,h,v,p: 43% 28% 19% 10%
[libx264 @ 0000000000358160] ref P L0: 78.4% 12.6% 4.9% 2.4% 1.7%
[libx264 @ 0000000000358160] kb/s:300.33The one problem with the incantation above is that on iPad's and iPhones and some Android tablets all you hear is the audio with no video. But the file listed above (contents of the ffprobe) does not have that problem, it WILL play on an iPad, iPhone, Android tablet. I researched causes for "audio, no video" and the recommendations were all over the deck. But, the file listed in the ffprobe DOES play, so if I can match those settings described by the ffprobe for all of the other videos, they should play consistently as well. My challenge is to match the ffprobe settings using ffmpeg and there doesn't seem to be a 1 to 1 match between what I see in ffprobe and the corresponding settings in ffmpeg (a nice utility would be to have ffprobe output the ffmpeg settings that could be used to create a file of similar format).
I walked through the ffprobe documentation but couldn't find anything that would produce a format that could be used as input to ffmpeg. Suggestions ?