
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (15)
-
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" (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (3987)
-
flutter-ffmpeg error on mixing audio and picture - Unable to find a suitable output format for 'ffmpeg
18 juillet 2021, par tylyoI'm trying to mix an audio and a picture in order to have a video with the same length of the Audio and as content an image sequence of the source picture.


I tried using the flutter-ffmpeg plugin with the command :


ffmpeg command: ffmpeg -loop 1 -i '/data/user/0/com.attiliopatania.apshare/cache/file_picker/20210402_112326.jpg' -i '/data/user/0/com.attiliopatania.apshare/cache/file_picker/Voice001.m4a' -c:v mpeg4 -tune stillimage -c:a copy -shortest /data/user/0/com.attiliopatania.apshare/app_flutter/out.mp4



some context :


I did the same test with ffmpeg on my pc and it worked as expected. I liked it.


I did some test and I tried to write a file on the same path where the out file should be and It worked as expected : file created


Running the same command through flutter plugin I experienced an error I'm reporting below


...
I/flutter (14564): Finished splitting the commandline.
I/flutter (14564): Opening an input file: /data/user/0/com.attiliopatania.apshare/cache/file_picker/Voice001.m4a.
I/flutter (14564): [NULL @ 0x731deba400] Opening '/data/user/0/com.attiliopatania.apshare/cache/file_picker/Voice001.m4a' for reading
I/flutter (14564): [file @ 0x72f6059a40] Setting default whitelist 'file,crypto,data'
I/flutter (14564): [mov,mp4,m4a,3gp,3g2,mj2 @ 0x731deba400] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
I/flutter (14564): [mov,mp4,m4a,3gp,3g2,mj2 @ 0x731deba400] ISO: File Type Major Brand: 3gp4
I/flutter (14564): [mov,mp4,m4a,3gp,3g2,mj2 @ 0x731deba400] Unknown dref type 0x206c7275 size 12
I/flutter (14564): [mov,mp4,m4a,3gp,3g2,mj2 @ 0x731deba400] Before avformat_find_stream_info() pos: 112552 bytes read:65747 seeks:1 nb_streams:1
I/flutter (14564): [mov,mp4,m4a,3gp,3g2,mj2 @ 0x731deba400] All info found
I/flutter (14564): [mov,mp4,m4a,3gp,3g2,mj2 @ 0x731deba400] After avformat_find_stream_info() pos: 403 bytes read:98515 seeks:2 frames:1
I/flutter (14564): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.attiliopatania.apshare/cache/file_picker/Voice001.m4a':
I/flutter (14564): Metadata:
I/flutter (14564): major_brand :
I/flutter (14564): 3gp4
I/flutter (14564):
I/flutter (14564): minor_version :
I/flutter (14564): 0
I/flutter (14564):
I/flutter (14564): compatible_brands:
I/flutter (14564): isom3gp4
I/flutter (14564):
I/flutter (14564): creation_time :
I/flutter (14564): 2021-03-06T16:02:37.000000Z
I/flutter (14564):
I/flutter (14564): com.android.version:
I/flutter (14564): 10
I/flutter (14564):
I/flutter (14564): Duration:
I/flutter (14564): 00:00:04.97
I/flutter (14564): , start:
I/flutter (14564): 0.000000
I/flutter (14564): , bitrate:
I/flutter (14564): 181 kb/s
I/flutter (14564):
I/flutter (14564): Stream #1:0
I/flutter (14564): (eng)
I/flutter (14564): , 1, 1/44100
I/flutter (14564): : Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s
I/flutter (14564): (default)
I/flutter (14564):
I/flutter (14564): ffmpeg out 1
I/flutter (14564): Metadata:
I/flutter (14564): creation_time :
I/flutter (14564): 2021-03-06T16:02:37.000000Z
I/flutter (14564):
I/flutter (14564): handler_name :
I/flutter (14564): SoundHandle
I/flutter (14564):
I/flutter (14564): Successfully opened the file.
I/flutter (14564): Parsing a group of options: output url ffmpeg.
I/flutter (14564): Successfully parsed a group of options.
I/flutter (14564): Opening an output file: ffmpeg.
I/flutter (14564): [NULL @ 0x7306b86c00] Unable to find a suitable output format for 'ffmpeg'
I/flutter (14564): ffmpeg: Invalid argument



-
ffmpeg creating mpeg-dash chunk files too slowly resulting in 404 errors
17 juillet 2021, par DannyI have a hardware encoder feeding FFmpeg to create a MPEG-DASH Low Latency stream. It works well for a while, but after letting FFmpeg run for a while and reloading the page there are many 404 errors.


When that happens, the
dash.js
player tries to fetch the segment file on the "live edge" but the file has not been created yet by FFmpeg. For example, after running for 20-30 minutes and loading the web page player, debug code in the web server shows :

2021-07-16 16:46:30.64 : GET REQUEST : /data/ott/chunk-stream0-00702.m4s
2021-07-16 16:46:30.67 : NOT FOUND. Latest files on filesystem:
 chunk-stream0-00699.m4s.tmp
 chunk-stream0-00698.m4s
 chunk-stream0-00697.m4s
 chunk-stream0-00696.m4s
 ...



So you can see the browser requested chunk 702 but the latest on the server is (part of) 699. With 2 second chunks, that is 3-5 seconds of content not yet available.


To analyze, I modified FFmpeg's
dashenc.c
to add a timestamp every time a file is opened which displays like :

[dash @ 0x9b17c0] 21:48:52.935 1626443332.935 : dashenc_io_open() - opened /data/ott/chunk-stream0-00060.m4s.tmp



And loaded the timestamps into Excel.


Despite a segment duration of 2.000 seconds, the average time between file opens is 2.011 seconds. Over two hours this accumulated to a 45 second difference between the calculated live edge and the latest file on the server.


The HW encoder is set to 25 fps and a GOP size of 5. I've confirmed both by analyzing the H.264 NALUs output by the HW encoder.


My Question : Is this a bug in FFmpeg or can I avoid this problem by adjusting the settings of either the HW encoder and/or FFmpeg options ?


REFERENCE


FFmpeg: Version 4.4 
Centos 8 
Apache 2.4.37



FFmpeg command line (pipe is fed by process reading HW encoder)


ffmpeg -re -loglevel verbose -an -f h264 -i pipe:17 -c:v copy \
-f dash -dash_segment_type mp4 -b:v 1000000 -seg_duration 2.000000 \
-frag_type duration -frag_duration 0.200000 -target_latency 1 \
-window_size 10 -extra_window_size 5 -remove_at_exit 1 -streaming 1 \
-ldash 1 -use_template 1 -use_timeline 0 -write_prft 1 -avioflags direct \
-fflags +nobuffer+flush_packets -format_options movflags=+cmaf \
-utc_timing_url /web/be/time.php /data/ott/master.mpd



Modified
dash_io_open()
from dashenc.c

static int 
dashenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename, AVDictionary **options)
{
 DASHContext *c = s->priv_data;
 int http_base_proto = filename ? ff_is_http_proto(filename) : 0;
 int err = AVERROR_MUXER_NOT_FOUND;
 if (!*pb || !http_base_proto || !c->http_persistent)
 {
 err = s->io_open(s, pb, filename, AVIO_FLAG_WRITE, options);

 // My Debug
 {
 char buf[20], milli[60];
 struct timeb tp;

 ftime(&tp); // sec + ms
 struct tm *tmInfo = localtime(&tp.time);

 // 2020-05-15 21:15:12.123
 strftime(buf, sizeof(buf), "%H:%M:%S", tmInfo);
 snprintf(milli, 59, "%s.%03d %d.%03d ", buf, tp.millitm, tp.time, tp.millitm);

 av_log(s, AV_LOG_INFO, "%s : dashenc_io_open() - opened %s\n", milli, filename);
 }
 }
 return err;
}



-
Issue with audio codec in ffmpeg
13 juillet 2021, par bloodstarTo my little knowledge i believe this is an audio codec issue however since im not really familiar with ffmpeg, anything could be wrong.


W:\PICTURES\\Manual Files>ffmpeg -i "C7984.mp4" -c copy -map 0 -segment_time 00:06:00 -f segment -reset_timestamps 1 C7984%03d.mp4

ffmpeg version 2021-07-11-git-79ebdbb9b9-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.3.0 (Rev2, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 57. 0.100 / 57. 0.100
 libavcodec 59. 3.101 / 59. 3.101
 libavformat 59. 4.100 / 59. 4.100
 libavdevice 59. 0.100 / 59. 0.100
 libavfilter 8. 0.103 / 8. 0.103
 libswscale 6. 0.100 / 6. 0.100
 libswresample 4. 0.100 / 4. 0.100
 libpostproc 56. 0.100 / 56. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001f2b61fe100] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001f2b61fe100] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C7984.mp4':
 Metadata:
 major_brand : XAVC
 minor_version : 16785407
 compatible_brands: XAVCmp42iso2
 creation_time : 2021-07-09T18:30:52.000000Z
 Duration: 00:07:07.93, start: 0.000000, bitrate: 207012 kb/s
 Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(pc), 3840x2160 [SAR 1:1 DAR 16:9], 200015 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
 Metadata:
 creation_time : 2021-07-09T18:30:52.000000Z
 handler_name : Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, s16, 1536 kb/s (default)
 Metadata:
 creation_time : 2021-07-09T18:30:52.000000Z
 handler_name : Sound Media Handler
 vendor_id : [0][0][0][0]
 Stream #0:2(und): Data: none (rtmd / 0x646D7472), 5401 kb/s (default)
 Metadata:
 creation_time : 2021-07-09T18:30:52.000000Z
 handler_name : Timed Metadata Media Handler
 timecode : 23:59:04:56
[segment @ 000001f2b6729440] Opening 'C7984000.mp4' for writing
[mp4 @ 000001f2b4627ec0] Could not find tag for codec pcm_s16be in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 --
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
 Stream #0:2 -> #0:2 (copy)
 Last message repeated 1 times



Should the code be changed to convert the audio to flac prior to convert the clip ? thanks