
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (27)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (4851)
-
Convert mp4/mov/... to mp4 with fluent-ffmpeg
13 octobre 2023, par Sam LeursI have a lambda function which reads a video from s3, converts it with fluent-ffmpeg and streams the video back to (another bucket in) s3.


This is the code so far :


ffmpeg()
 .input(readstream.Body)
 .format('mp4')
 .addOutputOption("-preset veryfast")
 .addOutputOption("-movflags frag_keyframe+empty_moov")
 .addOutputOption("-crf 28")
 .output(writestream, { end: true })
 .on('error', (err, stdout, stderr) => {
 console.log(err);
 console.log('Stdout: %o', stdout);
 console.log('Stderr: %o', stderr);
 })
 .run();



With an input mp4 file, this code works, but with a mov-file it fails. I get the following error :


Error: ffmpeg exited with code 1: Error demuxing input file 0: Invalid data found when processing input
pipe:0: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!

 at ChildProcess.<anonymous> (/opt/nodejs/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
 at ChildProcess.emit (node:events:514:28)
 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2023-10-13T20:10:01.978Z 32c55766-476f-41e9-873a-038341f5630a INFO Stdout: ''
2023-10-13T20:10:01.978Z 32c55766-476f-41e9-873a-038341f5630a INFO Stderr: 'ffmpeg version 6.0-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2023 the FFmpeg developers\n' +
 ' built with gcc 8 (Debian 8.3.0-6)\n' +
 ' configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n' +
 ' libavutil 58. 2.100 / 58. 2.100\n' +
 ' libavcodec 60. 3.100 / 60. 3.100\n' +
 ' libavformat 60. 3.100 / 60. 3.100\n' +
 ' libavdevice 60. 1.100 / 60. 1.100\n' +
 ' libavfilter 9. 3.100 / 9. 3.100\n' +
 ' libswscale 7. 1.100 / 7. 1.100\n' +
 ' libswresample 4. 10.100 / 4. 10.100\n' +
 ' libpostproc 57. 1.100 / 57. 1.100\n' +
 '[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5f71b00] stream 0, offset 0x24: partial file\n' +
 '[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5f71b00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080, 447 kb/s): unspecified pixel format\n' +
 "Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options\n" +
 "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':\n" +
 ' Metadata:\n' +
 ' major_brand : qt \n' +
 ' minor_version : 512\n' +
 ' compatible_brands: qt \n' +
 ' encoder : Lavf57.19.100\n' +
 ' Duration: 00:00:30.53, start: 0.000000, bitrate: N/A\n' +
 ' Stream #0:0[0x1](eng): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 447 kb/s, 30 fps, 30 tbr, 15360 tbn (default)\n' +
 ' Metadata:\n' +
 ' handler_name : VideoHandler\n' +
 ' vendor_id : FFMP\n' +
 ' encoder : Lavc57.16.101 libx264\n' +
 ' Stream #0:1[0x2](eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 139 kb/s (default)\n' +
 ' Metadata:\n' +
 ' handler_name : SoundHandler\n' +
 ' vendor_id : [0][0][0][0]\n' +
 'Stream mapping:\n' +
 ' Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))\n' +
 ' Stream #0:1 -> #0:1 (aac (native) -> aac (native))\n' +
 '[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5f71b00] stream 0, offset 0x24: partial file\n' +
 'Error demuxing input file 0: Invalid data found when processing input\n' +
 'pipe:0: Invalid data found when processing input\n' +
 'Cannot determine format of input stream 0:0 after EOF\n' +
 'Error marking filters as finished\n' +
 'Conversion failed!\n'
</anonymous>


Is it possible to convert multiple filetypes with one fluent-ffmpeg chain. If not, can someone help me to make a chain for mov ?


-
MP4 file starts from a non-key frame [closed]
1er octobre 2023, par userDtrmI have used the following ffprobe command to analyse a .mp4 file.




ffprobe -i <input /> -show_frames - select_streams v:0 -print_format flat &> save_to_file.text




It produces the following output.




 ffprobe version 5.1.3 Copyright (c) 2007-2022 the FFmpeg developers
 built with gcc 13 (GCC)
 configuration : —prefix=/home/thanuja/ffmpeg_build —pkg-config-flags=—static —extra-cflags=-I/home/thanuja/ffmpeg_build/include —extra-ldflags=-L/home/thanuja/ffmpeg_build/lib —extra-libs=-lpthread —extra-libs=-lm —bindir=/home/thanuja/bin —enable-gpl —enable-libfdk_aac —enable-libfreetype —enable-libmp3lame —enable-libopus —enable-libvpx —enable-libx264 —enable-libx265 —enable-nonfree —enable-openssl —enable-demuxer=spdif —enable-decoder=dolby_e —enable-decoder=ac3 —enable-decoder=eac3 —enable-indev=alsa —enable-outdev=alsa —enable-shared
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FTV267StoS.mp4' :
 Metadata :
 major_brand : mp42
 minor_version : 1
 compatible_brands : isommp41mp42
 creation_time : 2023-04-02T23:52:12.000000Z
 Duration : 00:04:47.84, start : 0.000000, bitrate : 7374 kb/s
 Stream #0:0[0x1](und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 7198 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default)
 Metadata :
 creation_time : 2023-04-02T23:52:12.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
 Metadata :
 creation_time : 2023-04-02T23:52:12.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 frames.frame.0.media_type="video"
 frames.frame.0.stream_index=0
 frames.frame.0.key_frame=0
 frames.frame.0.pts=34536
 frames.frame.0.pts_time="0.383733"
 frames.frame.0.pkt_dts=34536
 frames.frame.0.pkt_dts_time="0.383733"
 frames.frame.0.best_effort_timestamp=34536
 frames.frame.0.best_effort_timestamp_time="0.383733"
 frames.frame.0.pkt_duration=1501
 frames.frame.0.pkt_duration_time="0.016678"
 frames.frame.0.pkt_pos="1834827"
 frames.frame.0.pkt_size="14917"
 frames.frame.0.width=1920
 frames.frame.0.height=1080
 frames.frame.0.pix_fmt="yuv420p"
 frames.frame.0.sample_aspect_ratio="1:1"
 frames.frame.0.pict_type="P"
 frames.frame.0.coded_picture_number=120
 frames.frame.0.display_picture_number=0
 frames.frame.0.interlaced_frame=0
 frames.frame.0.top_field_first=0
 frames.frame.0.repeat_pict=0
 frames.frame.0.color_range="tv"
 frames.frame.0.color_space="bt709"
 frames.frame.0.color_primaries="unknown"
 frames.frame.0.color_transfer="bt709"
 frames.frame.0.chroma_location="left"
 frames.frame.0.tags.timecode="20:18:26:50"
 frames.frame.0.side_data_list.side_data.0.side_data_type="H.26[45] User Data Unregistered SEI message"
 frames.frame.0.side_data_list.side_data.1.side_data_type="H.26[45] User Data Unregistered SEI message"
 frames.frame.0.side_data_list.side_data.2.side_data_type="SMPTE 12-1 timecode"
 frames.frame.0.side_data_list.side_data.2.timecodes.timecode.0.value="20:18:26:50"
 frames.frame.1.media_type="video"
 frames.frame.1.stream_index=0
 frames.frame.1.key_frame=0
 frames.frame.1.pts=36036
 frames.frame.1.pts_time="0.400400"
 frames.frame.1.pkt_dts=36036
 frames.frame.1.pkt_dts_time="0.400400"
 frames.frame.1.best_effort_timestamp=36036
 frames.frame.1.best_effort_timestamp_time="0.400400"
 frames.frame.1.pkt_duration=1501
 frames.frame.1.pkt_duration_time="0.016678"
 frames.frame.1.pkt_pos="1857434"
 frames.frame.1.pkt_size="14472"
 frames.frame.1.width=1920
 frames.frame.1.height=1080
 frames.frame.1.pix_fmt="yuv420p"
 frames.frame.1.sample_aspect_ratio="1:1"
 frames.frame.1.pict_type="P"




As seen in this output, the 1st frame appears to be a P frame. I'm curious as to how will the decoder decode this frame without a preceding I frame (key frame) ? The P frame will not have enough information to reconstruct the image from its residual data without the key frame.


-
What would be the correct way to use Exec or Transcode ffmpeg in SRS version of Windows 5.0.128
29 janvier 2023, par diegosn79i was doing tests in different ways, and i can't use the Exec or Transcode option, i highlight that I have copied the ffmpeg.exe in the objs folder.
These are the codes I tried, and I attach the log errors.


exec {

enabled on;

publish ./objs/ffmpeg.exe -rtbufsize 10M -i rtmp://10.1.9.240/live/encoder -vf scale=1080:720 -c:v libx264 -profile:v high -level 4.2 -preset fast -b:v 1500k -c:a aac -ac 2 -b:a 96k -f flv -y rtmp://10.1.9.240:1935/live/encoderlow/;

}



LOGS


[2023-01-04 10:05:46.410][WARN][1309][01568ctu][11] EXEC : Ignore error, code=3028(FFmpegFork)(Failed to fork FFmpeg trancoder process) :
process start : vfork process failed, cli=./objs/ffmpeg.exe -rtbufsize 10M -i rtmp ://10.1.9.240/live/encoder -vf scale=1080:720 -c:v libx264 -profile:v high -level 4.2 -preset fast -b:v 1500k -c:a aac -ac 2 -b:a 96k -f flv -y rtmp ://10.1.9.240:1935/live/encoderlow/
thread [1309][01568ctu] : do_cycle() [./src/app/srs_app_ng_exec.cpp:108][errno=11]
thread [1309][01568ctu] : start() [./src/app/srs_app_process.cpp:197][errno=11]


transcode


enabled on;

 ffmpeg ./objs/ffmpeg.exe;

 engine ff {

 enabled on;

 vfilter {

 }

 vcodec libx264;

 vthreads 4;

 vprofile high;

 vpreset fast;

 vbitrate 1500k;

 vparams {

 }

 acodec libfdk_aac;

 aparams {

 }

 output rtmp://127.0.0.1:[port]/[app]/[stream]_[engine]?vhost=[vhost];

 }

}



LOGS


[2023-01-04 11:04:45.295][WARN][1489][34r32764][11] Encoder : Ignore error, code=3028(FFmpegFork)(Failed to fork FFmpeg trancoder process) : ffmpeg start : vfork process failed, cli=./objs/ffmpeg.exe -f flv -i rtmp ://127.0.0.1:1935/live ?vhost=defaultVhost/encoder -vcodec libx264 -b:v 1500000 -threads 4 -profile:v high -preset fast -acodec libfdk_aac -f flv -y rtmp ://127.0.0.1:1935/live/encoder_ff ?vhost=defaultVhost 1 > ./objs/ffmpeg-encoder-defaultVhost-live-encoder-ff.log 2 > ./objs/ffmpeg-encoder-defaultVhost-live-encoder-ff.log
thread [1489][34r32764] : do_cycle() [./src/app/srs_app_encoder.cpp:117][errno=11]
thread [1489][34r32764] : start() [./src/app/srs_app_process.cpp:197][errno=11]