
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (76)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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 ;
-
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 (10368)
-
Why DASH video fragments are not reproducible nor readable with ffmpeg ?
21 mai 2020, par salgarjiI'm streaming live video using DASH through FFmpeg. Everything's OK, fragments are generated, and the mpd file, but I wanted to have reproducible independent fragments. Video players won't open those fragments. I guess it's because they are mpd file dependant. My question would be : can those fragments be generated in a way that they are reproducible ? I don't know if it has something to do to the frames I P B or just the way dash cuts video information, in a way that it only saves 'timeline' on the mpd...



My purpose is not only being able to reproduce them sepparately, but I need to insert information in a metadata tag of the video, and ffmpeg won't let me read those live streaming generated fragments.



FFmpeg input information command will behave like this :



input :



ffmpeg -i /path/video0-0-1.mp4




output :



ffmpeg version N-97777-g3b5a36c56d Copyright (c) 2000-2020 the FFmpeg developers
 built with Apple clang version 11.0.3 (clang-1103.0.32.59)
 configuration: --enable-gpl --enable-libx264
 libavutil 56. 45.100 / 56. 45.100
 libavcodec 58. 84.100 / 58. 84.100
 libavformat 58. 43.100 / 58. 43.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 81.100 / 7. 81.100
 libswscale 5. 6.101 / 5. 6.101
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] could not find corresponding track id 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] could not find corresponding trex (id 1)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] could not find corresponding track id 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] trun track id unknown, no tfhd was found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb324009400] error reading header
/path/video0-0-1.mp4: Invalid data found when processing input




I execute this FFmpeg code using fluent-ffmpeg over JS to generate the fragments :



var ffmpeg = require('fluent-ffmpeg');

var grabacion = new ffmpeg();

grabacion.addInput('0')
.inputOptions(['-y -nostdin', '-f avfoundation', '-video_size 1280x720', '-pix_fmt nv12', '-framerate 30'])
.outputOptions(['-vcodec libx264', '-keyint_min 0', '-g 100', '-map 0:v', '-b:v 1000k', '-f dash',
 '-use_template 1', '-use_timeline 0', '-init_seg_name video0-$RepresentationID$-$Number$.mp4',
 '-media_seg_name video0-$RepresentationID$-$Number$.mp4', '-remove_at_exit 0', '-window_size 20', '-seg_duration 4'])
.output('/path/path/path/video.mpd')
.run();




So, the final purpose would be to be able to insert a tag like this :



ffmpeg -i video0-0-0.mp4 -movflags use_metadata_tags -metadata sample_tag=whateveryouwanttoadd video0-0-0-tagged.mp4




Is there any way to do it ? Thank you in advance !


-
FFMPEG Add thumbnail to video [duplicate]
18 mai 2020, par james-normanadd a thumbnail to my video file. I have the code that I have compiled with the help of other people from StackOverflow and I have one bit left to finish it off and that is to add a line of code to add video thumbnail.



you will see some weird text in command like targggget these are words that get replaced by the software so ignore it.

app.path\ffmpeg gets replaced with file-path/ffmpeg

targgggett\targ3et.mp4 file-path/xx.mp4

targgggett\targetimgee - output is example C :\Users\username\Desktop\vidz\New folder\images\demo.png


"app.path\ffmpeg" -y -i "targgggett\targ3et.mp4" -loop 1 -framerate 30000/1001 -t 5 -i "targgggett\targetimgee" -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.0,pan=stereo|c0code>



i want to add a video thumbnail using targgggett\targetimgee and set video thumbnail only



"app.path\ffmpeg" -y -i "targgggett\targ3et.mp4" -loop 1 -framerate 30000/1001 -t 5 -i "targgggett\targetimgee" -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.0,pan=stereo|c0code>



i get error



ffmpeg version git-2020-04-13-59e3a9
a Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200328
 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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-li
bspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 
 56. 42.102 / 56. 42.102
 libavcodec 58. 78.102 / 58. 78.102
 libavformat 58. 42.100 / 58. 42.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 77.101 / 7. 77.101
 libswscale 5. 6.101 / 5. 6.101
 libswresample 
 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\user\Desktop\vidz\New folder\55.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42

 creation_time : 2020-03-26T08:17:13.000000Z
 Duration: 00:04:29.12, start: 0.000000, bitrate: 1402 kb/s
 Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 1270 kb/s, 29.97 fps, 29.97 tbr,
 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 2020-03-26T08:17:13.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 03/26/2020.
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, 
stereo, fltp, 127 kb/s (default)
 Metadata:
 creation_time : 2020-03-26T08:17:13.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 03/26/2020.
Input #1, image2, from 'C:\Users\user\Desktop\vidz\New folder\\ima
ges\20191002_132728.jpg':
 Duration: 00:00:00.03, start: 0.000000, bitrate: 1223868 kb/s
 Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 4032x3024, 29.97 tbr, 29.97 tbn, 29.97 tbc
Input #2, lavfi, from 'anullsrc=channel
_layout=stereo:sample_rate=44100':
 Duration: N/A, start: 0.000000, bitrate: 705 kb/s
 Stream #2:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Option b:v (video bitrate (please use -b:v)) cannot be applied to input url C:\Users\user\Desktop\vidz\
New folder\\images\20191002_132728.jpg -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for input file C:\Users\user\Desktop\vidz\New folder\\images\20191002_
132728.jpg.
Error opening input files: Invalid argument



-
The SSIM values calculated using FFMPEG are not what I expected
18 mai 2020, par fd-alexerI'm trying to encode an m2ts (MPEG-2 Transport Stream) file to mp4 (H.264) and get the ssim value.

I did get some SSIM values, but the results were contrary to my expectations.


Are there wrong command options for ffmpeg ?



Encoding and SSIM calculation commands



# encode
$ ffmpeg -hide_banner -fflags +discardcorrupt -i input.m2ts \
 -c:v libx264 -crf <crf> -preset:v medium \
 -c:a copy -bsf:a aac_adtstoasc \
 output_ff_crf-<crf>.mp4

# calculate ssim
$ ffmpeg -hide_banner -i <a> -i <b> \
 -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]ssim" \
 -f null -
</b></a></crf></crf>



The results of the SSIM



(a) A=input.m2ts, B=input.m2ts, ssim=0.973266
(b) A=input.m2ts, B=output_ff_crf-0.mp4, ssim=0.813347
(c) A=input.m2ts, B=output_ff_crf-30.mp4, ssim=0.819897
(d) A=output_ff_crf-0.mp4, B=output_ff_crf-0.mp4, ssim=1.000000
(e) A=output_ff_crf-0.mp4, B=output_ff_crf-30.mp4, ssim=0.972911




- 

- (d)(e) : These are what I expected.
- (a) : The files are the same, but ssim≠1.
- (b)(c) : SSIMs with CRF=0 and CRF=30 have almost the same value, although the image quality is different.









In the case of HandBrakeCLI



To determine if there was a problem with input.m2ts, I ran HandBrakeCLI with almost the same parameters as ffmpeg.



# encode
HandBrakeCLI --verbose --format av_mp4 --encoder x264 --quality <crf> --x264-preset medium \
 --aencoder copy \
 --input input.m2ts --output output_hb_crf-<crf>.mp4

# calculate ssim (same as ffmpeg)
$ ffmpeg -hide_banner -i <a> -i <b> \
 -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]ssim" \
 -f null -
</b></a></crf></crf>



(b') A=input.m2ts, B=output_hb_crf-0.mp4, ssim=0.999999
(c') A=input.m2ts, B=output_hb_crf-30.mp4, ssim=0.972886
(d') A=output_hb_crf-0.mp4, B=output_hb_crf-0.mp4, ssim=1.000000
(e') A=output_hb_crf-0.mp4, B=output_hb_crf-30.mp4, ssim=0.972886




It's all as I expected. (although A is not ssim=1.0) 
Therefore, I don't see a problem with input.m2ts.



Informations about video files and tools



Results of the ffprobe



input.m2ts



[mpeg2video @ 0x5655577c1680] Invalid frame dimensions 0x0.
 Last message repeated 1 times
[mpegts @ 0x5655577bd080] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0x5655577bd080] PES packet size mismatch
Input #0, mpegts, from 'input.m2ts':
 Duration: 00:30:02.68, start: 39593.392600, bitrate: 19019 kb/s
 Program 211
 Stream #0:0[0x140]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
 Stream #0:1[0x141]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 255 kb/s
 Stream #0:2[0x138]: Data: bin_data ([6][0][0][0] / 0x0006)
Unsupported codec with id 100359 for input stream 2




output_ff_crf-0.mp4



Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output_ff_crf-0.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf57.83.100
 Duration: 00:30:02.67, start: 0.000000, bitrate: 109301 kb/s
 Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 109040 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 252 kb/s (default)
 Metadata:
 handler_name : SoundHandler




output_hb_crf-0.mp4



Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output_hb_crf-0.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : 2020-05-17T06:22:06.000000Z
 encoder : HandBrake 1.1.0 2018042400
 Duration: 00:30:02.22, start: 0.000000, bitrate: 109661 kb/s
 Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 109405 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc (default)
 Metadata:
 creation_time : 2020-05-17T06:22:06.000000Z
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 252 kb/s (default)
 Metadata:
 creation_time : 2020-05-17T06:22:06.000000Z
 handler_name : Stereo




Tools



version



- 

- ffmpeg : 3.4.6-0ubuntu0.18.04.1
- HandBrakeCLI : 1.1.0







ldd



$ ldd /usr/bin/ffmpeg
...
libx264.so.152 => /usr/lib/x86_64-linux-gnu/libx264.so.152 (0x00007efbf1f33000)
...

$ ldd /usr/bin/HandBrakeCLI
...
libx264.so.152 => /usr/lib/x86_64-linux-gnu/libx264.so.152 (0x00007efbfb38f000)
...




ffmpeg and HandBrakeCLI are using the same libx264.