
Recherche avancée
Autres articles (32)
-
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (4234)
-
ffmpeg concatenation after using drawtext filter
12 août 2016, par Sven HoskensI’m fairly new to ffmpeg, but after a few days of searching on this issue, I’ve completely hit a brick wall. Any help would be appreciated.
My use case : Our client wants to upload videos for multiple regions. Each video will be the same format, 1920x1080, mp4. For each region, they want to add a different image at the end of the video, for a few seconds. This image contains their logo, some additional info, and a variable code. They will enter this code alongside the uploaded video. The image stays the same, so is already present on the server.
So basically, I have an input video, a video of an image, and a small code. I need to add this code to the video of the image (in a predefined position), and then I need to add the resulting video to the end of the input video. Once that is complete, I just need to output the video in 1920x1080 and in 1024x576.I have tried several things, but the concatenation step always fails with the manipulated video’s.
Attempt 1
In my first attempt, I used ffmpeg to create a video from an image, and add the text in the designated area.
ffmpeg -y -f lavfi -i image.png -r 30 -t 10 -pix_fmt yuv420p -map 0:v -vf drawtext="fontfile=HelveticaNeue.dfont: text='GLNS/TEST/1234b': fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=7: x=179: y=805" imageVideo.mp4
This command creates a .mp4 video of the correct size, with a duration of 10 seconds, and adds the text ’GLNS/TEST/1234b’ in the correct location.
Next, I use the following command to concatenate the two videos. Both have the same resolution and codec.
ffmpeg -f concat -safe 0 -i config.txt -vf scale=1920:1080 outputHD.mp4 -vf scale=1024:576 outputSD.mp4
config.txt contains following :
file my_input_file.mp4
file ImageVideo.mp4This concatenation works with regular videos. However, when I use it with ImageVideo.mp4 (the one created by the first command) I get this error log :
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f86dc924600] Auto-inserting h264_mp4toannexb bitstream filtereed=0.509x
[aac @ 0x7f86dc019e00] Number of bands (31) exceeds limit (5).
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x7f86dc019e00] Number of bands (27) exceeds limit (8).
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x7f86dd857200] Error splitting the input into NAL units.
[h264 @ 0x7f86dd829400] Invalid NAL unit size.
[h264 @ 0x7f86dd829400] Error splitting the input into NAL units.
[aac @ 0x7f86dc019e00] Number of bands (10) exceeds limit (1).
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x7f86dd816800] Invalid NAL unit size.
[h264 @ 0x7f86dd816800] Error splitting the input into NAL units.
[aac @ 0x7f86dc019e00] Number of bands (24) exceeds limit (1).
Error while decoding stream #0:1: Invalid data found when processing input
#this goes on for a few hundred linesThe resulting output is identical to the input video, but does not contain the desired image video at the end.
Attempt 2
Since the above attempt didn’t work, I tried concatenating a video I let our designer make of the image with Adobe After Effects. This video was also saved as a .mp4 with the H264 codec. If I concatenate the input video and this one, I get a correct result. However, as soon as I add the code in the designated area with this command :
ffmpeg -i new_image_video.mp4 -vf drawtext="fontfile=HelveticaNeue.dfont: text='GLNS/TEST/1234b': fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=7: x=179: y=805" -c:v libx264 imageVideo.mp4
I get this error :
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff94c800000] Auto-inserting h264_mp4toannexb bitstream filter97x
[h264 @ 0x7ff94b053800] top block unavailable for requested intra mode -1
[h264 @ 0x7ff94b053800] error while decoding MB 0 0, bytestream 49526
[h264 @ 0x7ff94b053e00] number of reference frames (1+3) exceeds max (3; probably corrupt input), discarding one
[h264 @ 0x7ff94b053e00] chroma_log2_weight_denom 28 is out of range
[h264 @ 0x7ff94b053e00] illegal long ref in memory management control operation 2
[h264 @ 0x7ff94b053e00] cabac_init_idc 32 overflow
[h264 @ 0x7ff94b053e00] decode_slice_header error
[h264 @ 0x7ff94b053e00] no frame!
[h264 @ 0x7ff94b053800] concealing 8160 DC, 8160 AC, 8160 MV errors in I frame
[h264 @ 0x7ff94b072a00] reference overflow 22 > 15 or 0 > 15
[h264 @ 0x7ff94b072a00] decode_slice_header error
[h264 @ 0x7ff94b072a00] no frame!
[h264 @ 0x7ff94b01a400] illegal modification_of_pic_nums_idc 20
[h264 @ 0x7ff94b01a400] decode_slice_header error
[h264 @ 0x7ff94b01a400] no frame!
[h264 @ 0x7ff94b01aa00] illegal modification_of_pic_nums_idc 20
[h264 @ 0x7ff94b01aa00] decode_slice_header error
[h264 @ 0x7ff94b01aa00] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7ff94b053800] deblocking_filter_idc 8 out of range
[h264 @ 0x7ff94b053800] decode_slice_header error
[h264 @ 0x7ff94b053800] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7ff94b053e00] illegal memory management control operation 8
[h264 @ 0x7ff94b053e00] co located POCs unavailable
[h264 @ 0x7ff94b053e00] error while decoding MB 2 0, bytestream -35
[h264 @ 0x7ff94b053e00] concealing 8160 DC, 8160 AC, 8160 MV errors in B frame
[h264 @ 0x7ff94b072a00] number of reference frames (1+3) exceeds max (3; probably corrupt input), discarding one
# this goes on for a while...
[h264 @ 0x7ff94b01a400] concealing 4962 DC, 4962 AC, 4962 MV errors in B frame
Error while decoding stream #0:0: Invalid data found when processing input
frame= 2553 fps= 17 q=-1.0 Lsize= 26995kB time=00:01:42.16 bitrate=2164.6kbits/s dup=0 drop=60 speed=0.697x
video:25258kB audio:1661kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.285236%
[libx264 @ 0x7ff94b810400] frame I:35 Avg QP:17.45 size: 55070
[libx264 @ 0x7ff94b810400] frame P:711 Avg QP:19.73 size: 18712
[libx264 @ 0x7ff94b810400] frame B:1807 Avg QP:21.53 size: 5884
[libx264 @ 0x7ff94b810400] consecutive B-frames: 3.4% 5.0% 4.9% 86.6%
[libx264 @ 0x7ff94b810400] mb I I16..4: 38.2% 49.3% 12.5%
[libx264 @ 0x7ff94b810400] mb P I16..4: 12.4% 14.0% 1.0% P16..4: 29.6% 4.8% 1.9% 0.0% 0.0% skip:36.2%
[libx264 @ 0x7ff94b810400] mb B I16..4: 1.5% 1.2% 0.1% B16..8: 27.3% 1.6% 0.1% direct: 1.8% skip:66.4% L0:45.8% L1:51.4% BI: 2.8%
[libx264 @ 0x7ff94b810400] 8x8 transform intra:49.5% inter:85.4%
[libx264 @ 0x7ff94b810400] coded y,uvDC,uvAC intra: 21.2% 22.3% 2.5% inter: 4.6% 7.0% 0.0%
[libx264 @ 0x7ff94b810400] i16 v,h,dc,p: 23% 26% 10% 41%
[libx264 @ 0x7ff94b810400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 19% 35% 3% 3% 3% 3% 3% 2%
[libx264 @ 0x7ff94b810400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 20% 16% 5% 7% 6% 5% 5% 4%
[libx264 @ 0x7ff94b810400] i8c dc,h,v,p: 67% 16% 15% 2%
[libx264 @ 0x7ff94b810400] Weighted P-Frames: Y:7.3% UV:4.2%
[libx264 @ 0x7ff94b810400] ref P L0: 66.3% 8.7% 17.9% 7.0% 0.1%
[libx264 @ 0x7ff94b810400] ref B L0: 88.2% 10.1% 1.7%
[libx264 @ 0x7ff94b810400] ref B L1: 94.9% 5.1%
[libx264 @ 0x7ff94b810400] kb/s:2026.12
[aac @ 0x7ff94b072400] Qavg: 635.626The resulting output is identical to the input video, but does not contain the desired image video at the end.
One thing I have noticed : When I inspect the video files on mac (Get info) they always contain these lines at ’More info’ :
Dimensions: 1920 x 1080
Codecs: H.264, AAC
Color profile: HD(1-1-1)
Duration: 01:42
Audio channels: 2
Last opened: Today 11:02However, the video’s which pass through the drawtext filter have this :
Dimensions: 1920 x 1080
Codecs: AAC, H.264
Duration: 00:10
Audio channels: 2
Last opened: Today 11:07As you can see, there is no color profile entry, and the codecs have switched places. I assume this is related to my issue, but I can’t seem to find a fix for it.
PS : The application will run in a php environment (Symfony). I noticed the concat command wasn’t available in the Symfony bundle for ffmpeg, so I’m using the regular terminal commands. I’ll execute these using php.
EDIT
Attempt 3On advise of a coworker, I tried converting the video to .avi and reconverting to .mp4, in the hopes this would lose any corrupted or extra info included by the drawtext filter. This spits out a completely different error.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f812413da00] Auto-inserting h264_mp4toannexb bitstream filtereed=0.516x
[concat @ 0x7f8124009a00] DTS 1569260 < 2551000 out of order
[h264 @ 0x7f8124846800] left block unavailable for requested intra4x4 mode -1
[h264 @ 0x7f8124846800] error while decoding MB 0 0, bytestream 47919
[h264 @ 0x7f8124846800] concealing 8160 DC, 8160 AC, 8160 MV errors in I frame
[aac @ 0x7f8125809a00] Queue input is backward in time
[aac @ 0x7f8125815a00] Queue input is backward in time
[h264 @ 0x7f8124846e00] number of reference frames (1+3) exceeds max (3; probably corrupt input), discarding one
[h264 @ 0x7f8124846e00] chroma_log2_weight_denom 26 is out of range
[h264 @ 0x7f8124846e00] deblocking_filter_idc 32 out of range
[h264 @ 0x7f8124846e00] decode_slice_header error
[h264 @ 0x7f8124846e00] no frame!
[mp4 @ 0x7f8124802200] Non-monotonous DTS in output stream 0:1; previous: 4902912, current: 4505491; changing to 4902913. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7f8125813000] Non-monotonous DTS in output stream 1:1; previous: 4902912, current: 4505491; changing to 4902913. This may result in incorrect timestamps in the output file.
[h264 @ 0x7f8124803400] reference overflow 20 > 15 or 0 > 15
[h264 @ 0x7f8124803400] decode_slice_header error
[h264 @ 0x7f8124803400] no frame!
[mp4 @ 0x7f8124802200] Non-monotonous DTS in output stream 0:1; previous: 4902913, current: 4506515; changing to 4902914. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7f8125813000] Non-monotonous DTS in output stream 1:1; previous: 4902913, current: 4506515; changing to 4902914. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7f8124802200] Non-monotonous DTS in output stream 0:1; previous: 4902914, current: 4507539; changing to 4902915. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7f8125813000] Non-monotonous DTS in output stream 1:1; previous: 4902914, current: 4507539; changing to 4902915. This may result in incorrect timestamps in the output file.
# Again, this continues for quite a while. -
Linphone OSx msx264 encryption VGA takes 97% CPU, why ?
11 septembre 2013, par Maxim ShoustinI have problem and today don't know how to fix it or even from where to start.
I have Linphone application that uses msx264 plugin.
All stuff I run on OSx and my ffmpeg version installed from
port
, I didn't using selfupdate for portbash-3.2# port installed ffmpeg-devel
The following ports are currently installed:
ffmpeg-devel @20130205_0+gpl2
ffmpeg-devel @20130328_0 (active)
ffmpeg-devel @20130328_0+gpl2So I compiled and build msx264, no errors.
Now I try to send video over CIP resolution VGA (640x480) and get huge delay 8-9 seconds, even self-view I see in big delay.
when I configure CIF (352x288), all seems fine.
It's really strange that self-view camera has delay 4-5 sec.
So from logs during the session I found that msx264 plugin takes 97% CPU
On PC (windows 7) the same code runs fine, even HD I don't see any problems.
What is the problem should be ?
warning: Video MSTicker: We are late of 32146 miliseconds.
message: Filter MSRtpRecv is not scheduled; nothing to do.
message: ===========================================================
message: AUDIO SESSION'S RTP STATISTICS
message: -----------------------------------------------------------
message: sent 2344 packets
message: 403168 bytes
message: received 2038 packets
message: 350536 bytes
message: incoming delivered to the app 325080 bytes
message: lost 0 packets
message: received too late 123 packets
message: bad formatted 0 packets
message: discarded (queue overflow) 17 packets
message: ===========================================================
message: ms_filter_unlink: MSAuRead:0x7fb5a34955b0,0-->MSResample:0x7fb5aa917820,0
message: ms_filter_unlink: MSResample:0x7fb5aa917820,0-->MSSpeexEC:0x7fb5a34f6d20,1
message: ms_filter_unlink: MSSpeexEC:0x7fb5a34f6d20,1-->MSVolume:0x7fb5a3493450,0
message: ms_filter_unlink: MSVolume:0x7fb5a3493450,0-->MSTee:0x7fb5a3498e40,0
message: ms_filter_unlink: MSTee:0x7fb5a3498e40,0-->MSUlawEnc:0x7fb5a3499410,0
message: ms_filter_unlink: MSUlawEnc:0x7fb5a3499410,0-->MSRtpSend:0x7fb5aa910ba0,0
message: ms_filter_unlink: MSRtpRecv:0x7fb5a3400170,0-->MSUlawDec:0x7fb5a34933c0,0
message: ms_filter_unlink: MSUlawDec:0x7fb5a34933c0,0-->MSGenericPLC:0x7fb5aa91b040,0
message: ms_filter_unlink: MSGenericPLC:0x7fb5aa91b040,0-->MSDtmfGen:0x7fb5a6585f00,0
message: ms_filter_unlink: MSDtmfGen:0x7fb5a6585f00,0-->MSVolume:0x7fb5aa917790,0
message: ms_filter_unlink: MSVolume:0x7fb5aa917790,0-->MSTee:0x7fb5aa914fc0,0
message: ms_filter_unlink: MSTee:0x7fb5aa914fc0,0-->MSEqualizer:0x7fb5a3498f50,0
message: ms_filter_unlink: MSEqualizer:0x7fb5a3498f50,0-->MSSpeexEC:0x7fb5a34f6d20,0
message: ms_filter_unlink: MSSpeexEC:0x7fb5a34f6d20,0-->MSResample:0x7fb5aa9178b0,0
message: ms_filter_unlink: MSResample:0x7fb5aa9178b0,0-->MSAuWrite:0x7fb5a3499380,0
message: ms_filter_unlink: MSTee:0x7fb5a3498e40,1-->MSAudioMixer:0x7fb5aa914df0,0
message: ms_filter_unlink: MSTee:0x7fb5aa914fc0,1-->MSAudioMixer:0x7fb5aa914df0,1
message: ms_filter_unlink: MSAudioMixer:0x7fb5aa914df0,0-->MSFileRec:0x7fb5aa911020,0
message: Audio MSTicker thread exiting
message: ===========================================================
message: FILTER USAGE STATISTICS
message: Name Count Time/tick (ms) CPU Usage
message: -----------------------------------------------------------
message: MSX264Enc 321 138.147 97.1677
message: MSResample 8076 0.0550274 0.97085
message: MSSpeexEC 4302 0.0873765 0.821276
message: MSH264Dec 291 0.880267 0.561463
message: MSRtpSend 6174 0.012353 0.166623
message: MSRtpRecv 6174 0.0115132 0.155295
message: MSOSXGLDisplay 375 0.0376117 0.0308912
message: MSAudioMixer 4695 0.00249638 0.0256072
message: MSV4m 1480 0.00740446 0.0239537
message: MSUlawEnc 4038 0.0019542 0.0172411
message: MSTee 6540 0.000698976 0.00998688
message: MSAuRead 4695 0.00095017 0.0097466
message: MSUlawDec 1890 0.00205553 0.00849059
message: MSVolume 5928 0.000633159 0.00820007
message: MSFileRec 4695 0.000722743 0.00741371
message: MSDtmfGen 4695 0.0005 0.00512887
message: MSGenericPLC 4695 0.000429514 0.00440585
message: MSAuWrite 4038 0.000364199 0.00321319
message: MSEqualizer 1890 0.000250661 0.00103538
message: MSSizeConv 322 0.00104334 0.000736128
message: MSJpegWriter 290 0.000694158 0.00044124
message: MSPixConv 322 0.000405573 0.000286151
message: MSFilePlayer 0 0 0
message: MSVoidSink 0 0 0
message: ===========================================================
warning: Video MSTicker: We are late of 32256 miliseconds.
message: v4m video device closed.
message: Filter MSRtpRecv is not scheduled; nothing to do.
message: ===========================================================
message: VIDEO SESSION'S RTP STATISTICS
message: -----------------------------------------------------------
message: sent 1311 packets
message: 1517528 bytes
message: received 1783 packets
message: 1049010 bytes
message: incoming delivered to the app 986868 bytes
message: lost 0 packets
message: received too late 0 packets
message: bad formatted 0 packets
message: discarded (queue overflow) 0 packets
message: ===========================================================In addition the application shows me delay status, from logs :
message:: Dialog [0x7fb5a7634940]: now updated by transaction [0x7fb5aa9685d0].
warning: Video MSTicker: We are late of 20415 miliseconds.
warning: Video MSTicker: We are late of 20564 miliseconds.
message:: A SPS is being sent.
message:: A PPS is being sent.
warning: Video MSTicker: We are late of 20609 miliseconds.
warning: Video MSTicker: We are late of 20636 miliseconds.
warning: Video MSTicker: We are late of 20694 miliseconds.
warning: Video MSTicker: We are late of 20784 miliseconds.
warning: Video MSTicker: We are late of 20894 miliseconds.
warning: Video MSTicker: We are late of 21016 miliseconds.
warning: echo canceller: we are accumulating too much reference signal, need to throw out 1216 samples
message:: audio_stream_iterate(): local statistics available
Local's current jitter buffer size:77.440002 ms
message:: bandwidth usage: audio=[d=80.1,u=80.1] video=[d=305.3,u=441.8] kbit/sec
message:: Thread processing load: audio=2.135499 video=1268.186768
warning: Video MSTicker: We are late of 21134 miliseconds.
warning: Video MSTicker: We are late of 21256 miliseconds.
warning: Video MSTicker: We are late of 21382 miliseconds.
warning: Video MSTicker: We are late of 21506 miliseconds.
warning: Video MSTicker: We are late of 21638 miliseconds.
warning: Video MSTicker: We are late of 21781 miliseconds.
warning: Video MSTicker: We are late of 21921 miliseconds.
message:: bandwidth usage: audio=[d=81.6,u=80.0] video=[d=271.9,u=185.5] kbit/sec
message:: Thread processing load: audio=1.971647 video=1342.125000
warning: Video MSTicker: We are late of 22068 miliseconds.
message:: audio_stream_iterate(): remote statistics available
remote's interarrival jitter=68
remote's lost packets percentage since last report=0.390625
round trip time=0.258850 seconds
warning: Video MSTicker: We are late of 22216 miliseconds.Please, help me to find the problem.
Thanks,
this is a msx264 git repository :
git clone git://git.linphone.org/msx264.git
-
Encoding videos for use with Adobe Live Streaming
10 mai 2016, par FiddleMeRaggedI have an original video coded at 20Mbps, 1920x1080, 30fps and want to convert it down to be 640x480 30fps at a range of (3 different) bitrates for use by Adobe Live Streaming.
Should I use ffmpeg to resize and encode at the 3 bitrates then use f4fpackager to create the f4m f4f and f4x files or just use ffmpeg to reduce the resolution and then f4fpackager to encode the relevant bitrates ?
I’ve had several tries so far, but when encoded the videos seem to play at a much larger bitrate than they’ve been encoded at. For example, if I set up the OSMF to play from my webserver, I’d be expecting my best encoded video to play at 1,500kbps but it’s way above that.
Has anyone had any experience of encoding for use like this ?
I’m using the following options to f4fpackager
--bitrate=1428 --segment-duration 30 --fragment-duration 2