
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (18)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
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" (...) -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs.
Sur d’autres sites (4178)
-
how to solve ffmpeg video merging complain about parameters mismatching
22 septembre 2019, par mohammad rostami siahgeliI’m trying to concatenate an intro video to a main video. Here’s my command :
ffmpeg -i C:\Temp\intro.mp4 -i C:\Temp\main.mp4 -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" C:\Temp\output.mp4
When I run this command in cmd, I get the following error :
ffmpeg version N-95004-g2f87c9f646 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20190918
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 58.101 / 58. 58.101
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.102 / 7. 58.102
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\intro.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2019-09-21T09:23:34.000000Z
Duration: 00:00:07.32, start: 0.000000, bitrate: 706 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 960x540, 323 kb/s, 15 fps, 15 tbr, 30k tbn, 30 tbc (default)
Metadata:
creation_time : 2019-09-21T09:23:34.000000Z
handler_name : ?Mainconcept Video Media Handler
encoder : AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2019-09-21T09:23:34.000000Z
handler_name : #Mainconcept MP4 Sound Media Handler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\main.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:08.78, start: 0.000000, bitrate: 499 kb/s
Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x640 [SAR 1:1 DAR 1:1], 430 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 (h264) -> concat:in0:v0
Stream #0:1 (aac) -> concat:in0:a0
Stream #1:0 (h264) -> concat:in1:v0
Stream #1:1 (aac) -> concat:in1:a0
concat:out:v0 -> Stream #0:0 (libx264)
concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[Parsed_concat_0 @ 0000018168eedec0] Input link in0:v0 parameters (size 640x640, SAR 1:1) do not match the corresponding output link in0:v0 parameters (960x540, SAR 1:1)
[Parsed_concat_0 @ 0000018168eedec0] Failed to configure output pad on Parsed_concat_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
Conversion failed!I’m not a video ninja. I know parameters are different, but I have no idea after hours of search on how to solve this. A lot of online video services concatenate these two videos and give me a reasonable result. They have a GUI though. I need to do it in code, so that I can automate it.
How can I solve these errors ?
Update : This is the second error :
ffmpeg version N-95004-g2f87c9f646 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20190918
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 58.101 / 58. 58.101
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.102 / 7. 58.102
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\intro.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2019-09-21T09:23:34.000000Z
Duration: 00:00:07.32, start: 0.000000, bitrate: 706 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 960x540, 323 kb/s, 15 fps, 15 tbr, 30k tbn, 30 tbc (default)
Metadata:
creation_time : 2019-09-21T09:23:34.000000Z
handler_name : ?Mainconcept Video Media Handler
encoder : AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2019-09-21T09:23:34.000000Z
handler_name : #Mainconcept MP4 Sound Media Handler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\main.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:08.78, start: 0.000000, bitrate: 499 kb/s
Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x640 [SAR 1:1 DAR 1:1], 430 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
File 'C:\Temp\output.mp4' already exists. Overwrite ? [y/N] Y
Stream mapping:
Stream #0:0 (h264) -> scale
Stream #0:1 (aac) -> concat:in0:a0
Stream #1:0 (h264) -> concat:in1:v0
Stream #1:1 (aac) -> concat:in1:a0
concat:out:v0 -> Stream #0:0 (libx264)
concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[mp4 @ 000002f17869d7c0] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 000002f178acfec0] using SAR=1/1
[libx264 @ 000002f178acfec0] MB rate (1600000000) > level limit (16711680)
[libx264 @ 000002f178acfec0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000002f178acfec0] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 000002f178acfec0] 264 - core 158 r2984 3759fcb - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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
More than 1000 frames duplicated
Too many packets buffered for output stream 0:0.
[libx264 @ 000002f178acfec0] frame I:1 Avg QP:16.45 size: 4679
[libx264 @ 000002f178acfec0] frame P:32 Avg QP:14.16 size: 33
[libx264 @ 000002f178acfec0] frame B:96 Avg QP:17.67 size: 30
[libx264 @ 000002f178acfec0] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 000002f178acfec0] mb I I16..4: 58.1% 34.8% 7.1%
[libx264 @ 000002f178acfec0] mb P I16..4: 0.1% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:99.9%
[libx264 @ 000002f178acfec0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.8% 0.0% 0.0% direct: 0.0% skip:99.2% L0: 0.0% L1:100.0% BI: 0.0%
[libx264 @ 000002f178acfec0] 8x8 transform intra:33.8%
[libx264 @ 000002f178acfec0] coded y,uvDC,uvAC intra: 4.6% 8.2% 7.3% inter: 0.0% 0.0% 0.0%
[libx264 @ 000002f178acfec0] i16 v,h,dc,p: 74% 22% 5% 0%
[libx264 @ 000002f178acfec0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 1% 16% 83% 0% 0% 0% 0% 0% 0%
[libx264 @ 000002f178acfec0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 17% 26% 7% 5% 5% 5% 6% 5%
[libx264 @ 000002f178acfec0] i8c dc,h,v,p: 93% 3% 3% 1%
[libx264 @ 000002f178acfec0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000002f178acfec0] ref P L0: 62.5% 37.5%
[libx264 @ 000002f178acfec0] ref B L1: 99.8% 0.2%
[libx264 @ 000002f178acfec0] kb/s:535069.75
Conversion failed! -
FFMPEG to create an MPEG-DASH stream with VP8
16 septembre 2019, par Kenny WordenI’m trying to use FFMPEG to stream a live video feed from my webcam
/dev/video0
. Following scattered tutorials and scarce documentation (is this a known problem for the encoding community ?) I arrived at the following bash script :#!/bin/bash
ffmpeg \
-y \
-f v4l2 \
-i /dev/video0 \
-s 640x480 \
-input_format mjpeg \
-r 24 \
-map 0:0 \
-pix_fmt yuv420p \
-codec:v libvpx \
-s 640x480 \
-threads 4 \
-b:v 50k \
-tile-columns 4 \
-frame-parallel 1 \
-keyint_min 24 -g 24 \
-f webm_chunk \
-header "stream.hdr" \
-chunk_start_index 1 \
stream_%d.chk &
sleep 2
ffmpeg \
-f webm_dash_manifest -live 1 \
-i stream.hdr \
-c copy \
-map 0 \
-f webm_dash_manifest -live 1 \
-adaptation_sets "id=0,streams=0" \
-chunk_start_index 1 \
-chunk_duration_ms 1000 \
-time_shift_buffer_depth 30000 \
-minimum_update_period 60000 \
stream_manifest.mpdWhen I run this script, my webcam light turns on, the
stream.hdr
andstream_manifest.mpd
files are written, and chunks start to be created (i.e.stream_1.chk
,stream_2.chk
, etc...). However, FFMPEG throws the following error :Could not write header for output file #0 (incorrect codec parameters
?) : Invalid data found when processing inputI will explain what I think I am doing with this script, and hopefully this will expose any errors in my thinking.
First, we invoke FFMPEG to use Video for Linux 2 (v4l2) to read from my webcam (
/dev/video0
) of a resolution 640x480. The input format ismjpeg
with a framerate of 24fps.I then declare that FFMPEG should "map" (copy) the video stream output by v4l2 to a file. I specify the pixel format (YUV420P) and use libvpx (VP8 encoding) to encode the video stream. I set the size to be 640x480, use 4 threads, set the bitrate to be 50kbps, do some magic with tile-columns and frame-parallel options, and set the I-frames to be 24 frames apart.
I then create a
stream.hdr
file. The starting index is 1. This command continues to run infinitely until I kill it, grabbing new video from my webcam and outputting it into chunks.I then sleep for 2 seconds to give the previous command time to generate a header file.
And that’s really it. The next invocation of FFMPEG simply creates the MPEG-DASH manifest file given the header generated in the previous step.
So what’s going on ? Why can I not view the video in a web browser (I’m using Dash.js) ? I serve the manifest, header, and chunks on a Node.js server so that trivial issue is not the problem.
Edit : Here is my full console output.
ffmpeg version 3.0.7-0ubuntu0.16.10.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[video4linux2,v4l2 @ 0x55847e244ea0] The driver changed the time per frame from 1/24 to 1/30
[mjpeg @ 0x55847e245c00] Changing bps to 8
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 64305.102081, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Codec AVOption frame-parallel (Enable frame parallel decodability features) specified for output file #0 (stream_%d.chk) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption tile-columns (Number of tile columns to use, log2) specified for output file #0 (stream_%d.chk) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[swscaler @ 0x55847e24b720] deprecated pixel format used, make sure you did set range correctly
[libvpx @ 0x55847e248a20] v1.5.0
Output #0, webm_chunk, to 'stream_%d.chk':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: vp8 (libvpx), yuv420p, 640x480, q=-1--1, 50 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc57.24.102 libvpx
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
frame= 21 fps=0.0 q=0.0 size=N/A time=00:00:00.70 bitrate=N/A dup=5 drop=frame= 36 fps= 35 q=0.0 size=N/A time=00:00:01.20 bitrate=N/A dup=5 drop=frame= 51 fps= 33 q=0.0 size=N/A time=00:00:01.70 bitrate=N/A dup=5 drop=ffmpeg version 3.0.7-0ubuntu0.16.10.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, webm_dash_manifest, from 'stream.hdr':
Metadata:
encoder : Lavf57.25.100
Duration: N/A, bitrate: N/A
Stream #0:0: Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Metadata:
webm_dash_manifest_file_name: stream.hdr
webm_dash_manifest_track_number: 1
Output #0, webm_dash_manifest, to 'stream_manifest.mpd':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: vp8, yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Metadata:
webm_dash_manifest_file_name: stream.hdr
webm_dash_manifest_track_number: 1
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
frame= 67 fps= 33 q=0.0 size
frame= 82 fps= 32 q=0.0 size=N/A time=00:00:02.73 bitrate=N/A dup=5 drop=
frame= 97 fps= 32 q=0.0 size=N/A time=00:00:03.23 bitrate=N/A dup=5 drop=
frame= 112 fps= 32 q=0.0 size=N/A time=00:00:03.73 bitrate=N/A dup=5 ... -
FFMPEG, Creating an MPEG-DASH stream with existing inputs
10 septembre 2019, par kitenseiI am trying to generating a
DASH .mpd
file from multiple inputs (2 videos, 1 audio) without any success..What I’d like to do it’s simple getting the streams and create an mpd file without any re encoding since I’ve already my sources ready.
The output seems to work in rxplayer, but I do get a lot of errors (see log below).
Here are my 3 sources (taken from http://dash-mse-test.appspot.com/media.html) :
➜ test-dash $ ffprobe -hide_banner ../test-sources/car/car-20120827-89.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-89.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2012-08-24T03:04:15.000000Z
Duration: 00:03:01.39, start: 0.000000, bitrate: 4202 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 171 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2012-08-24T03:04:15.000000Z
handler_name : VideoHandler
➜ test-dash $ ffprobe -hide_banner ../test-sources/car/car-20120827-88.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-88.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2012-08-27T01:01:28.000000Z
Duration: 00:03:01.43, start: 0.000000, bitrate: 2076 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 81 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2012-08-27T01:01:28.000000Z
handler_name : VideoHandler
➜ test-dash $ ffprobe -hide_banner ../test-sources/car/car-20120827-8b.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-8b.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2012-08-27T01:19:23.000000Z
Duration: 00:03:01.63, start: 0.000000, bitrate: 31 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 1 kb/s (default)
Metadata:
creation_time : 2012-08-27T01:19:23.000000Z
handler_name : SoundHandlerAnd here how I am "muxing" them together with an .mpd manifest :
ffmpeg \
-re \
-i ../test-sources/car/car-20120827-88.mp4 \
-i ../test-sources/car/car-20120827-89.mp4 \
-i ../test-sources/car/car-20120827-8d.mp4 \
-map 0:0 \
-map 1:0 \
-map 2:0 \
-c copy \
-bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \
-b_strategy 0 -use_timeline 1 -use_template 1 \
-adaptation_sets "id=0,streams=v id=1,streams=a" \
-f dash out.mpdThe generated
mpd
file :<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT3M1.3S" minbuffertime="PT10.0S">
<programinformation>
</programinformation>
<period start="PT0.0S">
<adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true" lang="und">
<representation mimetype="video/mp4" codecs="avc1.4d401f" bandwidth="81397" width="1280" height="720" framerate="45000/1877">
<segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
<segmenttimeline>
<s t="0" d="120128"></s>
<s d="120120" r="34"></s>
<s d="29023"></s>
</segmenttimeline>
</segmenttemplate>
</representation>
<representation mimetype="video/mp4" codecs="avc1.640028" bandwidth="171953" width="1920" height="1080" framerate="45000/1877">
<segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
<segmenttimeline>
<s t="0" d="121129"></s>
<s d="239239"></s>
<s d="120120" r="32"></s>
<s d="29023"></s>
</segmenttimeline>
</segmenttemplate>
</representation>
</adaptationset>
<adaptationset contenttype="audio" segmentalignment="true" bitstreamswitching="true" lang="und">
<representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="13976" audiosamplingrate="44100">
<audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
<segmenttemplate timescale="44100" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
<segmenttimeline>
<s t="0" d="219136"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184" r="1"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184" r="1"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184" r="1"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="221184"></s>
<s d="220160"></s>
<s d="63488"></s>
</segmenttimeline>
</segmenttemplate>
</representation>
</adaptationset>
</period>
</mpd>But I get a lot of errors :
➜ test-dash git:(0.1) ✗ ffmpeg \
-re \
-i ../test-sources/car/car-20120827-88.mp4 \
-i ../test-sources/car/car-20120827-89.mp4 \
-i ../test-sources/car/car-20120827-8d.mp4 \
-map 0:0 \
-map 1:0 \
-map 2:0 \
-c copy \
-bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \
-b_strategy 0 -use_timeline 1 -use_template 1 \
-adaptation_sets "id=0,streams=v id=1,streams=a" \
-f dash out.mpd
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-88.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2012-08-27T01:01:28.000000Z
Duration: 00:03:01.43, start: 0.000000, bitrate: 2076 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 81 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2012-08-27T01:01:28.000000Z
handler_name : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-89.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2012-08-24T03:04:15.000000Z
Duration: 00:03:01.39, start: 0.000000, bitrate: 4202 kb/s
Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 171 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2012-08-24T03:04:15.000000Z
handler_name : VideoHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-8d.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2012-08-27T00:59:44.000000Z
Duration: 00:03:01.58, start: 0.000000, bitrate: 255 kb/s
Stream #2:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 13 kb/s (default)
Metadata:
creation_time : 2012-08-27T00:59:44.000000Z
handler_name : SoundHandler
[dash @ 0x55b464bb1240] Opening 'init-stream0.m4s' for writing
[dash @ 0x55b464bb1240] Opening 'init-stream1.m4s' for writing
[dash @ 0x55b464bb1240] Opening 'init-stream2.m4s' for writing
Output #0, dash, to 'out.mpd':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
encoder : Lavf58.29.100
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=2-31, 81 kb/s, 23.97 fps, 23.97 tbr, 24k tbn, 23.98 tbc (default)
Metadata:
creation_time : 2012-08-27T01:01:28.000000Z
handler_name : VideoHandler
Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 171 kb/s, 23.97 fps, 23.97 tbr, 24k tbn, 23.98 tbc (default)
Metadata:
creation_time : 2012-08-24T03:04:15.000000Z
handler_name : VideoHandler
Stream #0:2(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 13 kb/s (default)
Metadata:
creation_time : 2012-08-27T00:59:44.000000Z
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (copy)
Stream #2:0 -> #0:2 (copy)
Press [q] to stop, [?] for help
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00001.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00001.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00001.m4s.tmp' for writing
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 119119 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00002.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Non-monotonous DTS in output stream 0:1; previous: 119127, current: 119119; changing to 119128. This may result in incorrect timestamps in the output file.
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -1000 / timestamp: 119128 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00002.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00002.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 120120 is out of range for mov/mp4 format
[mp4 @ 0x55b464c425c0] pts has no value
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 239239 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00003.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00003.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing74 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 359359 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00004.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 359359 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00003.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00004.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing81 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 479479 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00005.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 479479 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00004.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00005.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing86 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 599599 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00006.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 599599 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00005.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00006.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing95 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 719719 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00007.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 719719 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00006.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00007.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing53 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 839839 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00008.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 839839 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00007.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00008.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing59 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 959959 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00009.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 959959 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00008.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00009.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing66 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 1080079 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00010.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 1080079 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00009.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00010.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing73 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 1200199 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00011.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 1200199 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00010.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00011.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing82 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 1320319 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00012.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 1320319 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00011.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00012.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing90 bitrate=N/A speed= 1x
...
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 3962959 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00033.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00034.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing06 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 4083079 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00035.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 4083079 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00034.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00035.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing10 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 4203199 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00036.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 4203199 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00035.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00036.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing67 bitrate=N/A speed= 1x
[mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 4323319 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream0-00037.m4s.tmp' for writing
[mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 4323319 is out of range for mov/mp4 format
[dash @ 0x55b464bb1240] Opening 'chunk-stream1-00036.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'chunk-stream2-00037.m4s.tmp' for writing
[dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing18 bitrate=N/A speed= 1x
frame= 4350 fps= 24 q=-1.0 Lq=-1.0 size=N/A time=00:03:01.55 bitrate=N/A speed= 1x
video:138926kB audio:5621kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown