Recherche avancée

Médias (91)

Autres articles (69)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le 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, (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (4720)

  • Ffmpeg inaccurate cutting with ts and m3u8 files despite resamping audio filter

    31 juillet 2020, par Lemon Sky

    I need to accurately seek and cut a video. Some online sources say put -ss in front or after the source. The result is the same for me. In the examples below, the start time is accurate but the duration is not accurate.

    


    ffmpeg -y -ss 00:00:05 -t 00:00:05 -i output.ts 5s.wav
ffprobe 5s.wav

Duration: 00:00:04.74

ffmpeg -y -i output.ts -ss 00:00:05 -t 00:00:05 5s.wav
ffprobe 5s.wav

Duration: 00:00:04.74


    


    Sometimes the starting point is not accurate but the duration is. This is clearly audible by cutting the ts file and cutting an uncompressed wav file, and listening to both.

    


    ffmpeg -y -i output.ts -ss 00:00:15 -t 00:00:05 5s.wav

ffmpeg -y -i output.wav -ss 00:00:15 -t 00:00:05 5s-reference.wav


    


    What fixes the starting time is if I use an m3u8 file that contains the byte offset for every keyframe AND I put the -ss option in front of the source file (if I put it after the source, the start time is inaccurate but the duration is accurate) :

    


    ffmpeg -y -ss 00:00:15 -t 00:00:05 -i output.m3u8 5s.wav


    


    This fixes the start time but the duration is at the location that I would get had I used no m3u8 file (duration is just 4.47s).

    


    It seems different timestamps are involved, and sometimes one or the other gets used.

    


    The ts file was generated by capturing a UDP stream and storing it with ffmpeg and -codec:v copy.

    


    Is ffmpeg broken, or the ts file ? How do I work around this issue or fix the ts file ? What I realize is that the video starts later than the audio, probably because the video does not start with a keyframe. Can I get ffmpeg to start the -codec:v copy after the first keyframe ? What I also notice is that using ffprobe reports "start : 1.400000". Can I force it to start at 0 ?

    


    Any hints would be appreciated.

    


    I tried both ffmpeg 4.3.1 and ffmpeg git-2020-07-24-21442a8.

    


    The output.* files were generated as follows. The statement "af aresample=async=1" should fill missing audio according to Duration of source video and subtracted audio are different. Adding this statement makes no difference in terms of accuracy or duration. The question is not a duplicate.

    


    ffmpeg -i udp://example:port ^
-af aresample=async=1 ^
-codec:v copy ^
-codec:a aac -ac 2 -ar 44100 -b:a 160k ^
-hls_time 4 -hls_flags single_file -hls_list_size 0 -hls_segment_filename output.ts -hls_segment_type mpegts output.m3u8 ^
-codec:a pcm_s16le -bitexact -ar 11025 -ac 1 output.wav


    


  • Ffmpeg inaccurate cut duration with ts [duplicate]

    30 juillet 2020, par Lemon Sky

    I need to accurately seek and cut a video. Some online sources say put -ss in front or after the source. The result is the same for me. In the examples below, the start time is accurate but the duration is not accurate.

    


    ffmpeg -y -ss 00:00:05 -t 00:00:05 -i http://tyberis.com/output.ts 5s.wav
ffprobe 5s.wav

Duration: 00:00:04.74

ffmpeg -y -i http://tyberis.com/output.ts -ss 00:00:05 -t 00:00:05 5s.wav
ffprobe 5s.wav

Duration: 00:00:04.74


    


    Sometimes the starting point is not accurate but the duration is. This is clearly audible by cutting the ts file and cutting an uncompressed wav file, and listening to both.

    


    ffmpeg -y -i http://tyberis.com/output.ts -ss 00:00:15 -t 00:00:05 5s.wav

ffmpeg -y -i http://tyberis.com/output.wav -ss 00:00:15 -t 00:00:05 5s-reference.wav


    


    What fixes the starting time is if I use an m3u8 file that contains the byte offset for every keyframe AND I put the -ss option in front of the source file (if I put it after the source, the start time is inaccurate but the duration is accurate) :

    


    ffmpeg -y -ss 00:00:15 -t 00:00:05 -i http://tyberis.com/output.m3u8 5s.wav


    


    This fixes the start time but the duration is at the location that I would get had I used no m3u8 file (duration is just 4.47s).

    


    It seems different timestamps are involved, and sometimes one or the other gets used.

    


    The ts file was generated by capturing a UDP stream and storing it with ffmpeg and -codec:v copy.

    


    Is ffmpeg broken, or the ts file ? How do I work around this issue or fix the ts file ? What I realize is that the video starts later than the audio, probably because the video does not start with a keyframe. Can I get ffmpeg to start the -codec:v copy after the first keyframe ? What I also notice is that using ffprobe reports "start : 1.400000". Can I force it to start at 0 ?

    


    Any hints would be appreciated.

    


    I tried both ffmpeg 4.3.1 and ffmpeg git-2020-07-24-21442a8.

    


  • ffmpeg : LIVE HLS Playback getting delayed over time

    31 juillet 2020, par Krishnakumar

    We are converting UDP Input to Live HLS output and pushing the chunks to a webdav server. Initial playback works fine, But the playback was delayed by almost an hour, when we checked after 15 hours. Not sure this is caused due to network as we use internet to push the chunks. Below is the ffmpeg command used.

    


    ffmpeg -i udp://230.1.1.15:10000?fifo_size=10000000&overrun_nonfatal=1 -filter_complex [i:0xd49]yadif,setdar=256/144[v0];[i:0xd49]yadif,setdar=512/288[v1];[i:0xd49]yadif,setdar=640/360[v2];[i:0xd49]yadif,setdar=1280/720[v3] -f hls -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:0 libfdk_aac -b:a:0 48000 -ar:0 48000 -map [v0] -b:v:0 100000 -maxrate:v:0 100000 -minrate:v:0 100000 -bufsize:v:0 200000 -s:v:0 256x144 -r:0 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:0 libx264 -profile:v:0 baseline -level:v:0 3.0 -preset:v:0 fast -nal-hrd cbr -g 50 -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:1 libfdk_aac -b:a:1 48000 -ar:1 48000 -map [v1] -b:v:1 200000 -maxrate:v:1 200000 -minrate:v:1 200000 -bufsize:v:1 400000 -s:v:1 512x288 -r:1 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:1 libx264 -profile:v:1 baseline -level:v:1 3.0 -preset:v:1 fast -nal-hrd cbr -g 50 -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:2 libfdk_aac -b:a:2 64000 -ar:2 48000 -map [v2] -b:v:2 700000 -maxrate:v:2 700000 -minrate:v:2 700000 -bufsize:v:2 1400000 -s:v:2 640x360 -r:2 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:2 libx264 -profile:v:2 baseline -level:v:2 3.0 -preset:v:2 fast -nal-hrd cbr -g 50 -map i:0xd4a -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -c:a:3 libfdk_aac -b:a:3 64000 -ar:3 48000 -map [v3] -b:v:3 1000000 -maxrate:v:3 1000000 -minrate:v:3 1000000 -bufsize:v:3 2000000 -s:v:3 1280x720 -r:3 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:3 libx264 -profile:v:3 high -level:v:3 4.0 -preset:v:3 fast -nal-hrd cbr -g 50 -var_stream_map a:0,v:0,name:148k a:1,v:1,name:248k a:2,v:2,name:764k a:3,v:3,name:1064k -master_pl_name master.m3u8 -hls_list_size 3 -hls_time 6 -hls_segment_filename https://usr:pass@example.com:8043/httppush/media_%v_%03d.ts -hls_flags delete_segments+independent_segments+discont_start https://usr:pass@example.com:8043/httppush/playlist_%v.m3u8


    


    FFMPEG V4.3

    


    ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs=-lpthread --extra-libs=-lm --bindir=/root/bin --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100


    


    With Split Filter :

    


    ffmpeg -i "udp://230.1.1.15:10000?fifo_size=10000000&overrun_nonfatal=1" -filter_complex "[i:0xd49]yadif[v];[v]split=4[1out1][1out2][1out3][1out4];[1out1]setdar=256/144[v0];[1out2]setdar=512/288[v1];[1out3]setdar=640/360[v2];[1out4]setdar=1280/720[v3];[i:0xd4a]aresample=async=1:min_hard_comp=0.100000:first_pts=0[a];[a]asplit=4[a0][a1][a2][a3]" -f hls -map [a0] -c:a:0 libfdk_aac -b:a:0 48000 -ar:0 48000 -map [v0] -b:v:0 100000 -maxrate:v:0 100000 -minrate:v:0 100000 -bufsize:v:0 200000 -s:v:0 256x144 -r:0 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:0 libx264 -profile:v:0 baseline -level:v:0 3.0 -preset:v:0 fast -nal-hrd cbr -g 50 -map [a1] -c:a:1 libfdk_aac -b:a:1 48000 -ar:1 48000 -map [v1] -b:v:1 200000 -maxrate:v:1 200000 -minrate:v:1 200000 -bufsize:v:1 400000 -s:v:1 512x288 -r:1 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:1 libx264 -profile:v:1 baseline -level:v:1 3.0 -preset:v:1 fast -nal-hrd cbr -g 50 -map [a2] -c:a:2 libfdk_aac -b:a:2 64000 -ar:2 48000 -map [v2] -b:v:2 700000 -maxrate:v:2 700000 -minrate:v:2 700000 -bufsize:v:2 1400000 -s:v:2 640x360 -r:2 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:2 libx264 -profile:v:2 baseline -level:v:2 3.0 -preset:v:2 fast -nal-hrd cbr -g 50 -map [a3] -c:a:3 libfdk_aac -b:a:3 64000 -ar:3 48000 -map [v3] -b:v:3 1000000 -maxrate:v:3 1000000 -minrate:v:3 1000000 -bufsize:v:3 2000000 -s:v:3 1280x720 -r:3 25 -sc_threshold 0 -pix_fmt yuv420p -flags +global_header+cgop -c:v:3 libx264 -profile:v:3 high -level:v:3 4.0 -preset:v:3 fast -nal-hrd cbr -g 50 -var_stream_map "a:0,v:0,name:148k a:1,v:1,name:248k a:2,v:2,name:764k a:3,v:3,name:1064k" -master_pl_name master.m3u8 -hls_list_size 3 -hls_time 6 -hls_segment_filename https://usr:pass@example.com:8043/httppush/media_%v_%03d.ts -hls_flags delete_segments+independent_segments+discont_start https://usr:pass@example.com:8043/httppush/playlist_%v.m3u8