
Recherche avancée
Autres articles (103)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (7368)
-
Convert a video with content type video/quicktime to video/mp4 using ffmpeg
25 juin 2021, par schubI have a strange problem. I start with a video file recored with an iPhone. The output is
video.mov
. I convert this to mp4 using ffmpeg :

ffmpeg -i video.mov -vcodec h264 -acodec aac video.mp4


If I use a tool like exiftool to show the metadata the output for
content-type
isvideo/mp4
all seems to be correct. But my backend, which receives the video, uses a library called Apache Tika to extract the content type and the result here is :video/quicktime
.

Scala code to retrieve the content type from the file :


// byteArray: Array[Byte]

val tika = new TikaConfig()
val metadata = new Metadata()
val contentType = tika.getDetector.detect(TikaInputStream.get(byteArray), metadata)



BTW : If I use a video editing program (DaVinci Resolve in my case) I can load the video, adjust settings and explicitly set the codec to mp4, export the video and then the resulting file works and Apache Tika extract the desired content-type. This is a workaround, but it does not scale and I like to automate this process via ffmpeg.


I'm stuck here. Can anyone give me a hint what I can do ?


Versions :


tika : 1.22

ffmpeg : 4.4

ffmpeg log :


$ffmpeg -i video.mov -vcodec h264 -acodec aac video.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 12.0.0 (clang-1200.0.32.29)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mov':
 Metadata:
 major_brand : qt
 minor_version : 0
 compatible_brands: qt
 creation_time : 2021-06-24T11:19:37.000000Z
 com.apple.quicktime.location.accuracy.horizontal: 65.000000
 com.apple.quicktime.location.ISO6709: +52.5554+013.3772+042.268/
 com.apple.quicktime.make: Apple
 com.apple.quicktime.model: iPhone 8
 com.apple.quicktime.software: 14.4.2
 com.apple.quicktime.creationdate: 2021-06-24T13:19:36+0200
 Duration: 00:00:09.83, start: 0.000000, bitrate: 7954 kb/s
 Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 1920x1080, 7810 kb/s, 30.01 fps, 30 tbr, 600 tbn, 600 tbc (default)
 Metadata:
 rotate : 90
 creation_time : 2021-06-24T11:19:37.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : HEVC
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 96 kb/s (default)
 Metadata:
 creation_time : 2021-06-24T11:19:37.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
 Metadata:
 creation_time : 2021-06-24T11:19:37.000000Z
 handler_name : Core Media Metadata
 Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
 Metadata:
 creation_time : 2021-06-24T11:19:37.000000Z
 handler_name : Core Media Metadata
 Stream #0:4(und): Data: none (mebx / 0x7862656D), 34 kb/s (default)
 Metadata:
 creation_time : 2021-06-24T11:19:37.000000Z
 handler_name : Core Media Metadata
Stream mapping:
 Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7fbe08009400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fbe08009400] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x7fbe08009400] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 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 'video.mp4':
 Metadata:
 major_brand : qt
 minor_version : 0
 compatible_brands: qt
 com.apple.quicktime.creationdate: 2021-06-24T13:19:36+0200
 com.apple.quicktime.location.accuracy.horizontal: 65.000000
 com.apple.quicktime.location.ISO6709: +52.5554+013.3772+042.268/
 com.apple.quicktime.make: Apple
 com.apple.quicktime.model: iPhone 8
 com.apple.quicktime.software: 14.4.2
 encoder : Lavf58.76.100
 Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1080x1920, q=2-31, 30 fps, 15360 tbn (default)
 Metadata:
 encoder : Lavc58.134.100 libx264
 creation_time : 2021-06-24T11:19:37.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 displaymatrix: rotation of -0.00 degrees
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)
 Metadata:
 creation_time : 2021-06-24T11:19:37.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 encoder : Lavc58.134.100 aac
frame= 295 fps= 18 q=-1.0 Lsize= 9980kB time=00:00:09.82 bitrate=8323.6kbits/s speed=0.614x
video:9884kB audio:85kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.103401%
[libx264 @ 0x7fbe08009400] frame I:6 Avg QP:21.84 size: 50301
[libx264 @ 0x7fbe08009400] frame P:217 Avg QP:24.23 size: 35435
[libx264 @ 0x7fbe08009400] frame B:72 Avg QP:24.97 size: 29582
[libx264 @ 0x7fbe08009400] consecutive B-frames: 66.8% 0.7% 4.1% 28.5%
[libx264 @ 0x7fbe08009400] mb I I16..4: 6.7% 88.9% 4.4%
[libx264 @ 0x7fbe08009400] mb P I16..4: 4.2% 32.9% 0.5% P16..4: 49.6% 5.0% 2.3% 0.0% 0.0% skip: 5.5%
[libx264 @ 0x7fbe08009400] mb B I16..4: 0.9% 6.9% 0.0% B16..8: 51.8% 7.7% 0.8% direct:12.2% skip:19.6% L0:50.1% L1:46.9% BI: 3.0%
[libx264 @ 0x7fbe08009400] 8x8 transform intra:87.7% inter:88.8%
[libx264 @ 0x7fbe08009400] coded y,uvDC,uvAC intra: 59.2% 41.2% 0.9% inter: 38.3% 57.3% 0.0%
[libx264 @ 0x7fbe08009400] i16 v,h,dc,p: 15% 23% 8% 53%
[libx264 @ 0x7fbe08009400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 14% 29% 7% 8% 7% 7% 6% 6%
[libx264 @ 0x7fbe08009400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 18% 18% 9% 11% 7% 7% 4% 3%
[libx264 @ 0x7fbe08009400] i8c dc,h,v,p: 60% 20% 18% 1%
[libx264 @ 0x7fbe08009400] Weighted P-Frames: Y:3.2% UV:2.3%
[libx264 @ 0x7fbe08009400] ref P L0: 54.2% 10.7% 22.2% 12.5% 0.4%
[libx264 @ 0x7fbe08009400] ref B L0: 75.5% 19.6% 4.9%
[libx264 @ 0x7fbe08009400] ref B L1: 88.7% 11.3%
[libx264 @ 0x7fbe08009400] kb/s:8234.01
[aac @ 0x7fbe0802e000] Qavg: 446.889



-
Muxing in audio to gstreamer RTMP stream kills both video and Audio
1er avril 2015, par AdamI need some genius help here - I’m trying to set up a live stream for my upcoming wedding... and I have it ALMOST working - audio seems to be the problem.
This is my setup
- Raspberry Pi Model B+
- Logitech C920 (with onboard h264 encoding that I am utilising)
- on-camera (C920) microphone
- USB wifi to iPhone 4G connection
- gstreamer1.0
- Amazon EC2 Wowza RTMP server
I have it all set up, but as soon as I mux in the audio, the streams wont play by any player.
What Works :
- my gstreamer pipeline WITHOUT the audio muxed in
- Wowza receives a consistent stream, no failures
- The various Flash players / iOS / Android and VLC all play back the videoWhat doesnt :
- enabling audio in the mux (using the pipeline below)
- BUT gstreamer doesnt complain
- BUT Wowza receives a consistent stream, no failures
- The various flash players fail to play both Audio and Video. some just display the first video frame
- VLC plays 1 video frame, and about 100ms of audio, then stopsIdeally I’d like the muxed audio/video FLV stored on the SD card too in case the network goes down - but if the ’tee’ needs to be sacrificed to make it work, so be it.
This is my current FAILING pipeline - I assume there’s something really stupid in it because I know practically nothing about gstreamer.... The first frame loads in all the players (except iOS.. which never shows anything)
# set camera resolution to 720p, and the data format to H264 (alternatives are YUV and JPG)
v4l2-ctl --device=/dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=1
# set the frame rate
v4l2-ctl --device=/dev/video0 --set-parm=10
gst-launch-1.0 -v -e uvch264src initial-bitrate=300000 average-bitrate=300000 device=/dev/video0 name=src auto-start=true src.vidsrc \
! queue \
! video/x-h264,width=1280,height=720,framerate=10/1 \
! h264parse \
! flvmux streamable=true name=mux \
! queue \
! tee name=t \
! queue \
! filesink location=/home/pi/wedding.flv t. \
! queue \
! rtmpsink location='rtmp://wowzaserver/live/wedding live=1' >>/home/pi/wedding.log 2>&1Some of the things I can’t really afford to change at this late stage are the encapsulation (FLV) and wowza RTMP because I’ve built everything around that...
Please Help !! Thanks !
UPDATE
Given that I am also saving the FLV file, I have found that if I use ffmpeg to send that FLV file (using audio copy, video copy) to the RTMP server, everything works (but obviously its not live) ! So I am now starting to believe this is a problem with the way Gstreamer encapsulates RTMP - and by putting ffmpeg in the middle it fixes it... but it’s not live of course.
Is it possible to pipe my output to ffmpeg and using ffmpeg’s RTMP ? -
FFMpeg - Segment audio to chunks
8 mars 2015, par fr3shI have tried this example in order to segment a given video file using ffmpeg into an m3u8 file and smaller chunks (.ts files). This actually worked great. Is it possible to do practically the same thing with audio input ?
This was my most promising approach so far (capturing live audio on Windows OS) :ffmpeg -f dshow -i audio="<name of="of" input="input" device="device">" -acodec libmp3lame -ab 64000 | segmenter - 10 stream stream.m3u8 http:///stream/stream/ 5 1
</name>But this returns this error :
At least one output file must be specified.
Could not open input file, make sure it is an mpegts file: -1I really would not know how to convert the live audio stream to an mpegts file.
Could anyone please give me a hint ?Thanks a lot