
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (64)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (7695)
-
FFMPEG and -crf on Android
12 juin 2014, par mister-viperyesterday I managed to build a newer Version of FFMPEG for Android. I directly created a binary which allows me to invoke commands per commandline. I builded the Version using NDK r9d and the 4.8 linux_x86_x64 toolchain.
After including everything in my Application my goal was to execute the command for which I did the whole effort.
My goal is to run :
ffmpeg -i example.mp4 -r 30 -vcodec libx264 -crf 0 output.mp4
Running this command on the command line via python works absolutly fine. However, running this command on Android does not work.
1) I get the error that I have to add
-strict experimental
After reading FFMPEG docu I found out, that this is due to the libx264. However, I do not understand why I have not to add this comment in the Python version.
2) After adding the parameter above, I was able to convert the video. However, the result was horrible. The transcoded images were just some noisy blinking green stuff. Thus, I looked for the problem. The problem is the parameter :
-crf 0
Due to this parameter, the result was so horrible. However, if I change the parameter to
-crf 1
everything is working as expected. BUT : I really want a lossless encoding here. That was the reason for choosing -crf 0. Moreover, this parameter works fine in my python version.
Can anybody explain to me :
1) What are I’m doing wrong ?
2) How can I use -crf 0 on Android ?Best regards,
André//Edit :
Requested Logoutput :06-12 19:23:04.841: I/System.out(8983): Starting process
06-12 19:23:04.871: D/dalvikvm(8983): GC_FOR_ALLOC freed 294K, 4% free 9260K/9592K, paused 17ms, total 18ms
06-12 19:23:04.871: I/System.out(8983): ffmpeg version N-63698-g22d1b24 Copyright (c) 2000-2014 the FFmpeg developers
06-12 19:23:04.871: I/System.out(8983): built on Jun 11 2014 13:17:16 with gcc 4.8 (GCC)
06-12 19:23:04.871: I/System.out(8983): configuration: --target-os=linux --cross-prefix=arm-linux-androideabi- --arch=arm --cpu=armv7-a --sysroot=/home/andre/Desktop/android-ndk-r9d/platforms/android-9/arch-arm --disable-avdevice --disable-decoder=h264_vdpau --enable-libx264 --enable-gpl --prefix=build/armeabi-v7a-neon --extra-cflags='-I../x264 -DANDROID -I${ANDROID_NDK_ROOT_PATH}/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp -mfpu=neon' --extra-ldflags='-L../x264 -Wl,--fix-cortex-a8 -L../android-libs -Wl,-rpath-link,../android-libs' --extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
06-12 19:23:04.871: I/System.out(8983): libavutil 52. 89.100 / 52. 89.100
06-12 19:23:04.871: I/System.out(8983): libavcodec 55. 66.100 / 55. 66.100
06-12 19:23:04.871: I/System.out(8983): libavformat 55. 42.100 / 55. 42.100
06-12 19:23:04.871: I/System.out(8983): libavfilter 4. 5.100 / 4. 5.100
06-12 19:23:04.871: I/System.out(8983): libswscale 2. 6.100 / 2. 6.100
06-12 19:23:04.871: I/System.out(8983): libswresample 0. 19.100 / 0. 19.100
06-12 19:23:04.881: I/System.out(8983): libpostproc 52. 3.100 / 52. 3.100
06-12 19:23:04.971: I/System.out(8983): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/screen_recording.mp4':
06-12 19:23:04.971: I/System.out(8983): Metadata:
06-12 19:23:04.971: I/System.out(8983): major_brand : isom
06-12 19:23:04.971: I/System.out(8983): minor_version : 0
06-12 19:23:04.971: I/System.out(8983): compatible_brands: isomiso2avc1
06-12 19:23:04.971: I/System.out(8983): creation_time : 2014-06-12 11:52:00
06-12 19:23:04.971: I/System.out(8983): Duration: 00:00:09.39, start: 0.000000, bitrate: 597 kb/s
06-12 19:23:04.971: I/System.out(8983): Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 720x1280, 593 kb/s, SAR 65536:65536 DAR 9:16, 34.07 fps, 90k tbr, 90k tbn, 180k tbc (default)
06-12 19:23:04.971: I/System.out(8983): Metadata:
06-12 19:23:04.971: I/System.out(8983): creation_time : 2014-06-12 11:51:56
06-12 19:23:04.971: I/System.out(8983): [libx264 @ 0x171c930] using SAR=1/1
06-12 19:23:04.981: I/System.out(8983): [libx264 @ 0x171c930] using cpu capabilities: ARMv6 NEON
06-12 19:23:04.991: I/System.out(8983): [libx264 @ 0x171c930] profile High 4:4:4 Predictive, level 3.1, 4:2:0 8-bit
06-12 19:23:04.991: I/System.out(8983): [libx264 @ 0x171c930] 64 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 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=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
06-12 19:23:04.991: I/System.out(8983): Output #0, mp4, to '/storage/emulated/0/screen_recording_out.mp4':
06-12 19:23:05.001: I/System.out(8983): Metadata:
06-12 19:23:05.001: I/System.out(8983): major_brand : isom
06-12 19:23:05.001: I/System.out(8983): minor_version : 0
06-12 19:23:05.001: I/System.out(8983): compatible_brands: isomiso2avc1
06-12 19:23:05.001: I/System.out(8983): encoder : Lavf55.42.100
06-12 19:23:05.001: I/System.out(8983): Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x1280 [SAR 65536:65536 DAR 9:16], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
06-12 19:23:05.001: I/System.out(8983): Metadata:
06-12 19:23:05.001: I/System.out(8983): creation_time : 2014-06-12 11:51:56
06-12 19:23:05.001: I/System.out(8983): encoder : Lavc55.66.100 libx264
06-12 19:23:05.001: I/System.out(8983): Stream mapping:
06-12 19:23:05.001: I/System.out(8983): Stream #0:0 -> #0:0 (h264 -> libx264)
06-12 19:23:05.001: I/System.out(8983): Press [q] to stop, [?] for help
06-12 19:23:05.662: I/System.out(8983): frame= 14 fps=0.0 q=0.0 size= 51kB time=00:00:00.23 bitrate=1789.0kbits/s dup=0 drop=7
06-12 19:23:06.022: I/System.out(8983): frame= 20 fps= 20 q=0.0 size= 127kB time=00:00:00.43 bitrate=2395.1kbits/s dup=0 drop=14
06-12 19:23:06.602: I/System.out(8983): frame= 25 fps= 16 q=0.0 size= 195kB time=00:00:00.60 bitrate=2659.2kbits/s dup=0 drop=16
06-12 19:23:07.103: I/System.out(8983): frame= 30 fps= 14 q=0.0 size= 262kB time=00:00:00.76 bitrate=2803.4kbits/s dup=0 drop=21
06-12 19:23:07.674: I/System.out(8983): frame= 50 fps= 19 q=0.0 size= 276kB time=00:00:01.43 bitrate=1575.9kbits/s dup=0 drop=35
06-12 19:23:08.174: I/System.out(8983): frame= 70 fps= 22 q=0.0 size= 277kB time=00:00:02.10 bitrate=1079.1kbits/s dup=0 drop=35
06-12 19:23:08.725: I/System.out(8983): frame= 90 fps= 24 q=0.0 size= 278kB time=00:00:02.76 bitrate= 821.8kbits/s dup=0 drop=35
06-12 19:23:09.245: I/System.out(8983): frame= 109 fps= 26 q=0.0 size= 291kB time=00:00:03.40 bitrate= 700.3kbits/s dup=0 drop=42
06-12 19:23:09.746: I/System.out(8983): frame= 125 fps= 27 q=0.0 size= 299kB time=00:00:03.93 bitrate= 622.1kbits/s dup=0 drop=43
06-12 19:23:10.236: I/System.out(8983): frame= 144 fps= 28 q=0.0 size= 300kB time=00:00:04.56 bitrate= 537.4kbits/s dup=0 drop=44
06-12 19:23:11.117: I/System.out(8983): frame= 160 fps= 28 q=0.0 size= 337kB time=00:00:05.10 bitrate= 542.1kbits/s dup=0 drop=55
06-12 19:23:11.277: I/System.out(8983): frame= 162 fps= 26 q=0.0 size= 378kB time=00:00:05.16 bitrate= 598.6kbits/s dup=0 drop=58
06-12 19:23:11.828: I/System.out(8983): frame= 178 fps= 26 q=0.0 size= 428kB time=00:00:05.70 bitrate= 614.6kbits/s dup=0 drop=59
06-12 19:23:12.318: I/System.out(8983): frame= 198 fps= 27 q=0.0 size= 429kB time=00:00:06.36 bitrate= 551.6kbits/s dup=0 drop=68
06-12 19:23:12.829: I/System.out(8983): frame= 214 fps= 27 q=0.0 size= 431kB time=00:00:06.90 bitrate= 511.6kbits/s dup=0 drop=69
06-12 19:23:13.339: I/System.out(8983): frame= 233 fps= 28 q=0.0 size= 432kB time=00:00:07.53 bitrate= 469.6kbits/s dup=0 drop=70
06-12 19:23:14.690: I/System.out(8983): frame= 262 fps= 27 q=-1.0 Lsize= 457kB time=00:00:08.73 bitrate= 428.4kbits/s dup=18 drop=76
06-12 19:23:14.690: I/System.out(8983): video:455kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.401494%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] frame I:2 Avg QP: 0.00 size: 11390
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] frame P:260 Avg QP: 0.00 size: 1702
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] mb I I16..4: 97.5% 0.2% 2.3%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] mb P I16..4: 5.9% 0.3% 0.1% P16..4: 0.9% 0.1% 0.0% 0.0% 0.0% skip:92.8%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] 8x8 transform intra:3.6% inter:31.8%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] coded y,uvDC,uvAC intra: 17.3% 9.6% 9.2% inter: 0.4% 0.3% 0.3%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] i16 v,h,dc,p: 69% 30% 1% 0%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 49% 29% 0% 0% 0% 0% 0% 0%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 31% 14% 1% 2% 2% 2% 1% 1%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] i8c dc,h,v,p: 80% 16% 3% 0%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] Weighted P-Frames: Y:5.4% UV:4.6%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] ref P L0: 74.9% 4.1% 19.6% 1.3% 0.0%
06-12 19:23:14.710: I/System.out(8983): [libx264 @ 0x171c930] kb/s:426.18
06-12 19:23:14.740: I/System.out(8983): Finished
06-12 19:23:14.740: I/System.out(8983): Finished Process -
Correct command to transmit audio to ip camera using ffmpeg ?
4 novembre 2016, par the_naiveSo I found some hints in this discussion on the correct command to transmit audio to Axis IP camera through using ffmpeg in windows, but still I have not managed to successfully transmit audio to the camera.
The command I’m using is the following :
ffmpeg -v debug -y -re -f dshow -i "audio=Microphone (2- High Definition Audio Device)" -c:a pcm_mulaw -ac 1 -ar 16000 -b:a 128k -f flv http://oper
ator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi -multiple_requests 1 -reconnect_at_eof 1 -reconnect_streamed 1 -content_type "audio/basic" -reportThe ouput I get following this command is the following :
ffmpeg started on 2016-11-04 at 17:32:13
Report written to "ffmpeg-20161104-173213.log"
Command line:
ffmpeg -v debug -y -re -f dshow -i "audio=Microphone (2- High Definition Audio Device)" -c:a pcm_mulaw -ac 1 -ar 16000 -b:a 128k -f flv http://operator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi -content_type audio/basic -multiple_requests 1 -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -report
ffmpeg version N-82225-gb4e9252 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 35.100 / 55. 35.100
libavcodec 57. 66.101 / 57. 66.101
libavformat 57. 57.100 / 57. 57.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 66.100 / 6. 66.100
libswscale 4. 3.100 / 4. 3.100
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
Reading option '-i' ... matched as input file with argument 'audio=Microphone (2- High Definition Audio Device)'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_mulaw'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '1'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '16000'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '128k'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'flv'.
Reading option 'http://operator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi' ... matched as output file.
Reading option '-content_type' ... matched as AVOption 'content_type' with argument 'audio/basic'.
Reading option '-multiple_requests' ... matched as AVOption 'multiple_requests' with argument '1'.
Reading option '-reconnect' ... matched as AVOption 'reconnect' with argument '1'.
Reading option '-reconnect_at_eof' ... matched as AVOption 'reconnect_at_eof' with argument '1'.
Reading option '-reconnect_streamed' ... matched as AVOption 'reconnect_streamed' with argument '1'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Trailing options were found on the commandline.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file audio=Microphone (2- High Definition Audio Device).
Applying option re (read input at native frame rate) with argument 1.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: audio=Microphone (2- High Definition Audio Device).
[dshow @ 00000000000279e0] Selecting pin Capture on audio only
dshow passing through packet of type audio size 88200 timestamp 310221040000 orig timestamp 310221040000 graph timestamp 310226130000 diff 5090000 Microphone (2- High Definition Audio Device)
[dshow @ 00000000000279e0] All info found
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=Microphone (2- High Definition Audio Device)':
Duration: N/A, start: 31022.104000, bitrate: 1411 kb/s
Stream #0:0, 1, 1/10000000: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: output file http://operator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi.
Applying option c:a (codec name) with argument pcm_mulaw.
Applying option ac (set number of audio channels) with argument 1.
Applying option ar (set audio sampling rate (in Hz)) with argument 16000.
Applying option b:a (video bitrate (please use -b:v)) with argument 128k.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: http://operator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi.
[http @ 0000000001c94040] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[http @ 0000000001c94040] request: POST /axis-cgi/audio/transmit.cgi HTTP/1.1
Transfer-Encoding: chunked
User-Agent: Lavf/57.57.100
Accept: */*
Expect: 100-continue
Connection: close
Host: 10.10.210.2
Icy-MetaData: 1
[http @ 0000000001c94040] request: POST /axis-cgi/audio/transmit.cgi HTTP/1.1
Transfer-Encoding: chunked
User-Agent: Lavf/57.57.100
Accept: */*
Connection: close
Host: 10.10.210.2
Icy-MetaData: 1
Authorization: Digest username="operator", realm="AXIS_ACCC8E027F47", nonce="0EcsO3xABQA=ab5efc4740a6c625ecf6a6729d0d67d2b62b615a", uri="/axis-cgi/audio/transmit.cgi", response="4bd3a627b20d6bcaba9e2f595ef6cd2a", algorithm="MD5", qop="auth", cnonce="6a579dd6664b57eb", nc=00000001
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0000000001c9f6e0] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 0:0 @ 0000000001c9f6e0] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 0:0 @ 0000000001c9f6e0] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 0:0 @ 0000000001c9f6e0] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0000000001c9f6e0] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 0000000001c9fa20] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:0 @ 0000000001c9fa20] Setting 'sample_rates' to value '16000'
[audio format for output stream 0:0 @ 0000000001c9fa20] Setting 'channel_layouts' to value '0x4'
[audio format for output stream 0:0 @ 0000000001c9fa20] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0'
[AVFilterGraph @ 000000000002ab20] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0000000001ca4060] [SWR @ 0000000001ca4a80] Using s16p internally between filters
[auto-inserted resampler 0 @ 0000000001ca4060] [SWR @ 0000000001ca4a80] Matrix coefficients:
[auto-inserted resampler 0 @ 0000000001ca4060] [SWR @ 0000000001ca4a80] FC: FL:0.500000 FR:0.500000
[auto-inserted resampler 0 @ 0000000001ca4060] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:1 chl:mono fmt:s16 r:16000Hz
Output #0, flv, to 'http://operator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi':
Metadata:
encoder : Lavf57.57.100
Stream #0:0, 0, 1/1000: Audio: pcm_mulaw ([8][0][0][0] / 0x0008), 16000 Hz, mono, s16, 128 kb/s
Metadata:
encoder : Lavc57.66.101 pcm_mulaw
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_mulaw (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
av_interleaved_write_frame(): Unknown error
No more output streams to write to, finishing.
Error writing trailer of http://operator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi: Error number -10053 occurredsize= 8kB time=00:00:00.49 bitrate= 131.2kbits/s speed=79.6x
video:0kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.492485%
Input file #0 (audio=Microphone (2- High Definition Audio Device)):
Input stream #0:0 (audio): 1 packets read (88200 bytes); 1 frames decoded (22050 samples);
Total: 1 packets (88200 bytes) demuxed
Output file #0 (http://operator:operator@10.10.210.2/axis-cgi/audio/transmit.cgi):
Output stream #0:0 (audio): 1 frames encoded (7984 samples); 1 packets muxed (7984 bytes);
Total: 1 packets (7984 bytes) muxed
1 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0000000001c9e4c0] Statistics: 0 seeks, 2 writeouts
dshow passing through packet of type audio size 12152 timestamp 310226130000 orig timestamp 310226130000 graph timestamp 310226820000 diff 690000 Microphone (2- High Definition Audio Device)
Conversion failed!For some reason, despite setting
multiple_requests
,reconnect_eof
,reconnect_streamed
all to true, connection becomes closed.Could you please tell me what I’m doing wrong ?
-
ffmpeg HLS creation and segmentation results in "cannot decode" on iPad
5 mai 2014, par jt_dylanI have the following code that plays on Mac Safari :
<video controls="controls" width="480" height="270">
<source src="http://d1ckv7o9k6o3x9.cloudfront.net/d54cfa01-eff2-4e86-946e-dc8b2ee4a7e8/media/ hls/MVI_5927.m3u8">
</source></video>The url can be cut/pasted into the browser and works also but neither this code nor the url works in Windows Safari or iPad. Specifically on iPad I receive a cannot decode error. On Mac I have Quicktime installed so I tried that on Windows with no luck. The link that can be play on Mac is below.
http://d1ckv7o9k6o3x9.cloudfront.net/d54cfa01-eff2-4e86-946e-dc8b2ee4a7e8/media/hls/MVI_5927.m3u8
Browser Versions of software :
Mac Safari : Version 7.0.3 (9537.75.14) (works)
Windows Safari : Version 5.1.7 (7534.7.2) (doesn’t work - blank screen)
iPad Safari : ios Version 7.1.1 (doesn’t work - cannot decode)Here is how I’m creating my mp4 (lgpl)
I’m creating an mp4 with this command :
ffmpeg -i input.mov c:v mpeg4 q:v 1 test.mp4I’m creating the hls using ffmpeg lpgl with this command :
ffmpegcmd -re -y -i test.mp4 -map 0 -f segment -segment_list test.m3u8 -segment_list_flags +live -segment_time 1 -segment_list_type m3u8 test%05d.ts 2>&1
Now this works in Mac Safari with Quicktime installed but results in "cannot decode" if I try the url from ipad Safari.
I then tried with libx264 to create the mp4 as h.264 with aac and then copy to mpeg2 container as follows :
ffmpeg -i test.mov -c:v libx264 -c:a libfdk_aac -preset slower -b:a 240k test.slower.mp4
ffmpeg -i test.slower.mp4 -vcodec copy -f mpegts -bsf h264_mp4toannexb test.slower.ts
ffmpeg -re -y -i test.slower.ts -map 0 -f segment -segment_list test.slower.m3u8 -segment_list_flags +live -segment_time 1 -segment_list_type m3u8 test.slower.%05d.tsThis still produces the same results. Any idea what is wrong here ?
Any help is much appreciated.
Regards,
jt_dylanOutput from libx264 commands below :
ffmpeg -i test.mov -c:v libx264 -c:a libfdk_aac -preset slower -b:a 240k test.slower.mp4
ffmpeg version git-2014-05-04-aeeb3d4 Copyright (c) 2000-2014 the FFmpeg developers
built on May 4 2014 17:01:19 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/home/ec2-user/ffmpeg_build --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --bindir=/home/ec2-user/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 52. 81.100 / 52. 81.100
libavcodec 55. 60.103 / 55. 60.103
libavformat 55. 37.102 / 55. 37.102
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tst/MVI_1716.MOV':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt CAEP
creation_time : 2012-07-21 05:17:44
Duration: 00:00:20.06, start: 0.000000, bitrate: 34471 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 1920x1080, 33663 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 48k tbc (default)
Metadata:
creation_time : 2012-07-21 05:17:44
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s (default)
Metadata:
creation_time : 2012-07-21 05:17:44
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x39ae9e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x39ae9e0] profile High, level 5.0
[libx264 @ 0x39ae9e0] 264 - core 142 r2 ac76440 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=8 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=9 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 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=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=60 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, mp4, to 'tstconv/MVI_1716.slower.mp4':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt CAEP
encoder : Lavf55.37.102
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p, 1920x1080, q=-1--1, 24k tbn, 23.98 tbc (default)
Metadata:
creation_time : 2012-07-21 05:17:44
Stream #0:1(eng): Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 48000 Hz, mono, s16, 240 kb/s (default)
Metadata:
creation_time : 2012-07-21 05:17:44
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (pcm_s16le -> libfdk_aac)
Press [q] to stop, [?] for help
frame= 481 fps=1.5 q=-1.0 Lsize= 18428kB time=00:00:20.07 bitrate=7519.9kbits/s
video:17827kB audio:589kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.060811%
[libx264 @ 0x39ae9e0] frame I:3 Avg QP:23.31 size:113718
[libx264 @ 0x39ae9e0] frame P:135 Avg QP:25.06 size: 56912
[libx264 @ 0x39ae9e0] frame B:343 Avg QP:27.13 size: 29825
[libx264 @ 0x39ae9e0] consecutive B-frames: 1.2% 4.2% 20.6% 74.0%
[libx264 @ 0x39ae9e0] mb I I16..4: 20.0% 53.3% 26.6%
[libx264 @ 0x39ae9e0] mb P I16..4: 9.7% 22.8% 5.4% P16..4: 41.0% 8.6% 5.4% 0.1% 0.0% skip: 7.0%
[libx264 @ 0x39ae9e0] mb B I16..4: 3.3% 7.2% 2.0% B16..8: 40.7% 9.8% 1.7% direct: 6.3% skip:29.0% L0:49.6% L1:44.7% BI: 5.7%
[libx264 @ 0x39ae9e0] 8x8 transform intra:58.9% inter:70.2%
[libx264 @ 0x39ae9e0] direct mvs spatial:99.4% temporal:0.6%
[libx264 @ 0x39ae9e0] coded y,uvDC,uvAC intra: 58.6% 46.9% 7.3% inter: 23.9% 20.2% 0.2%
[libx264 @ 0x39ae9e0] i16 v,h,dc,p: 10% 64% 14% 12%
[libx264 @ 0x39ae9e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 7% 50% 10% 3% 4% 3% 8% 4% 12%
[libx264 @ 0x39ae9e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 4% 64% 5% 2% 3% 2% 6% 2% 10%
[libx264 @ 0x39ae9e0] i8c dc,h,v,p: 35% 53% 9% 3%
[libx264 @ 0x39ae9e0] Weighted P-Frames: Y:11.1% UV:4.4%
[libx264 @ 0x39ae9e0] ref P L0: 47.8% 12.2% 15.8% 6.8% 5.7% 4.2% 4.3% 2.6% 0.6% 0.0%
[libx264 @ 0x39ae9e0] ref B L0: 76.8% 10.5% 5.1% 2.9% 2.2% 1.5% 0.9%
[libx264 @ 0x39ae9e0] ref B L1: 94.6% 5.4%
[libx264 @ 0x39ae9e0] kb/s:7279.24
ffmpeg -i test.slower.mp4 -vcodec copy -f mpegts -bsf h264_mp4toannexb test.slower.ts
ffmpeg version git-2014-05-04-aeeb3d4 Copyright (c) 2000-2014 the FFmpeg developers
built on May 4 2014 17:01:19 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/home/ec2-user/ffmpeg_build --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --bindir=/home/ec2-user/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 52. 81.100 / 52. 81.100
libavcodec 55. 60.103 / 55. 60.103
libavformat 55. 37.102 / 55. 37.102
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tstconv/MVI_1716.slower.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.37.102
Duration: 00:00:20.11, start: 0.042667, bitrate: 7508 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080, 7279 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 240 kb/s (default)
Metadata:
handler_name : SoundHandler
[swscaler @ 0x367c0c0] deprecated pixel format used, make sure you did set range correctly
Output #0, segment, to 'MVI_1716.slower.%05d.ts':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.37.102
Stream #0:0(eng): Video: mpeg2video, yuv420p, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 23.98 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: mp2, 48000 Hz, mono, s16, 384 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Stream #0:1 -> #0:1 (aac -> mp2)
Press [q] to stop, [?] for help
frame= 482 fps= 24 q=31.0 Lsize=N/A time=00:00:20.12 bitrate=N/A dup=1 drop=0
video:8293kB audio:944kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 195032183209984.000000%
ffmpeg version git-2014-05-04-aeeb3d4 Copyright (c) 2000-2014 the FFmpeg developers
built on May 4 2014 17:01:19 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/home/ec2-user/ffmpeg_build --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --bindir=/home/ec2-user/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 52. 81.100 / 52. 81.100
libavcodec 55. 60.103 / 55. 60.103
libavformat 55. 37.102 / 55. 37.102
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tstconv/MVI_1716.slower.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.37.102
Duration: 00:00:20.11, start: 0.042667, bitrate: 7508 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080, 7279 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 240 kb/s (default)
Metadata:
handler_name : SoundHandler
File 'tstconv/MVI_1716.slower.ts' already exists. Overwrite ? [y/N] y
Output #0, mpegts, to 'tstconv/MVI_1716.slower.ts':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.37.102
Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuvj420p, 1920x1080, q=2-31, 7279 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: mp2, 48000 Hz, mono, s16, 384 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac -> mp2)
Press [q] to stop, [?] for help
frame= 481 fps=0.0 q=-1.0 Lsize= 20334kB time=00:00:20.12 bitrate=8276.6kbits/s
video:17827kB audio:944kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.325850%
ffmpeg -re -y -i test.slower.ts -map 0 -f segment -segment_list test.slower.m3u8 -segment_list_flags +live -segment_time 1 -segment_list_type m3u8 test.slower.%05d.ts
ffmpeg version git-2014-05-04-aeeb3d4 Copyright (c) 2000-2014 the FFmpeg developers
built on May 4 2014 17:01:19 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/home/ec2-user/ffmpeg_build --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags=-L/home/ec2-user/ffmpeg_build/lib --bindir=/home/ec2-user/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 52. 81.100 / 52. 81.100
libavcodec 55. 60.103 / 55. 60.103
libavformat 55. 37.102 / 55. 37.102
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpegts, from 'tstconv/MVI_1716.slower.ts':
Duration: 00:00:20.11, start: 1.430733, bitrate: 8282 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc), 1920x1080, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 373 kb/s
[swscaler @ 0x1fe9ae0] deprecated pixel format used, make sure you did set range correctly
Output #0, segment, to 'MVI_1716.slower.%05d.ts':
Metadata:
encoder : Lavf55.37.102
Stream #0:0: Video: mpeg2video, yuv420p, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
Stream #0:1(eng): Audio: mp2, 48000 Hz, mono, s16, 384 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Stream #0:1 -> #0:1 (mp2 -> mp2)