
Recherche avancée
Autres articles (71)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
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 (...)
Sur d’autres sites (6117)
-
html5 video crashes in Chrome and Opera but works fine in Firefox
31 octobre 2012, par SharkTheDarkIt's 5:30AM and I'm stuck with this video problem.
I had it all working before, and now, it has problems...
I try to change encoding, but it's still not good... Worst part is that it works when it's runned from local file, but won't from server ( I add file types in htaccess )...Here is the ffmpeg encoding :
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libx264 -vpre hq -vpre ipod640 -acodec libfaac "upload/' .$newName. '.mp4"');
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libvpx -acodec libvorbis -f webm "upload/' .$newName. '.webm"');
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogv"');
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogg"');or :
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.mp4"');
exec('ffmpeg -i "' .$tmpName. '" -vcodec libvpx -acodec libvorbis -f webm -aq 100 "upload/' .$newName. '.webm"');
exec('ffmpeg -i "' .$tmpName. '" -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogv"');
exec('ffmpeg -i "' .$tmpName. '" -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogg"');or :
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.mp4"');
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.webm"');
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.ogv"');
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.ogg"');Nothing create good enough file to play in Chrome...
URL of file(s) :
http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.ogv
http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.ogg
http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.webm
http://urthots.com/homepage/upload/f41355af09218d660a5d78a4012a7177.mp4Video element :
<video poster="http://urthots.com/homepage/upload/images/xxx.jpg">
<source src="http://urthots.com/homepage/upload/xxx.mp4" type="video/mp4"></source>
<source src="http://urthots.com/homepage/upload/xxx.webm" type="video/webm"></source>
<source src="http://urthots.com/homepage/upload/xxx.ogv" type="video/ogg; codecs=theora,vorbis"></source>
<source src="http://urthots.com/homepage/upload/xxx.ogg" type="video/ogg; codecs=theora,vorbis"></source>
</video>What can cause this ?
I tried everything, encoding changing, HTML element changing, htaccess changing, I tried with videos from other sites, and they are working okay...
I have no idea what is problem...Can someone please help...
-
Trying to transcode video with FFMpeg Layer on Lambda
7 septembre 2020, par incovenantI am trying to convert
.ogv
files to.mp4
using anffmpeg
layer on AWS Lambda.




I followed a tutorial from the people at Serverless Framework to convert
.mp4
's toGIF
's and that worked out great. Using the same ffmpeg static build, ( ffmpeg-git-amd64-static.tar.xz ) I set out to convert.ogv
files to.mp4
files.


So far I have had success with uploading videos to an S3 Bucket, getting a Lambda to retrieve that video, do something to the video using the
ffmpeg
binary, and copy a new file to S3.




The Problem :



The videos that are created, will not play.



data point 1 : the resultant files from the function are far too small.



The input video file is 1.3MB and the output video is only 256.0KB



data point 2 : moov atom not found.



After copying the resultant video from S3 to my local machine, I try to play using
ffplay
and I receive this error :


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd613093400] moov atom not found
frank.mp4: Invalid data found when processing input




As far as I have been able to tell, the moov atom is suppose to contain important metadata about
.mp4
files.




Implementation :



I used the Serverless framework to set up the AWS infrastructure.



Here are a few different
ffmpeg
commands I have tried :


1st attempt :



// convert to mp4!
 spawnSync(
 "/opt/ffmpeg/ffmpeg",
 [
 "-i",
 `/tmp/${record.s3.object.key}`,
 "-vcodec",
 "libx264",
 "-acodec",
 "aac",
 `/tmp/${record.s3.object.key}.mp4`
 ],
 { stdio: "inherit" }
 );




2nd attempt :



// convert to mp4!
 spawnSync(
 "/opt/ffmpeg/ffmpeg",
 [
 "-i",
 `/tmp/${record.s3.object.key}`,
 `/tmp/${record.s3.object.key}.mp4`
 ],
 { stdio: "inherit" }
 );




3rd attempt :



I found this approach in a Stack Overflow question and the poster said that it worked for him.



// convert to mp4!
spawnSync(
 "/opt/ffmpeg/ffmpeg",
 [
 '-i',
 `/tmp/${record.s3.object.key}`,
 '-codec:v',
 'libx264',
 '-profile:v',
 'main',
 '-preset',
 'slow',
 '-b:v',
 '400k',
 '-maxrate',
 '400k',
 '-bufsize',
 '800k',
 '-threads',
 '0',
 '-b:a',
 '128k',
 `/tmp/${record.s3.object.key}.mp4`
 ],
 { stdio: "inherit" }
);




Each one of these works swell on my local machine.



If the ffmpeg binary that I am using was not a popular one, ( I have seen it on multiple sites dealing in connection with transcoding on Lambda ), my guess would be that it is an issue with the layer... Perhaps.



Any insight would be greatly appreciated. Thank you.


-
Use SDL2 play yuv file but actually no display [closed]
14 juin 2024, par guan xiI use ffmpeg to demux and decode the media file, and then use SDL2 to play the raw data, everything is ok. no error no warning, but SDL2 windows does not dispaly video content.
All i know is frame dts is ordered in SDL2 play queue and data is good.


void VideoPlay::play_video() {
 while (is_running_) {
 refresh_loop_wait_event(&event_);

 switch (event_.type) {
 case SDL_KEYDOWN:
 if (event_.key.keysym.sym == SDLK_q) {
 LOG_INFO("Q quit");
 is_running_ = false;
 frame_queue_->abort();
 }
 break;
 case SDL_QUIT:
 LOG_INFO("SDL_QUIT");
 is_running_ = false;
 frame_queue_->abort();
 break;

 default:
 break;
 }
 }
}

void VideoPlay::refresh_loop_wait_event(SDL_Event *event) {
 SDL_PumpEvents();

 while (
 !SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) {
 video_refresh();
 SDL_PumpEvents();
 }
}

void VideoPlay::video_refresh() {
 int ret = 0;
 frame_queue_->pop(frame_);
 if (!frame_) {
 LOG_ERROR("frame_queue_ pop failed.");
 is_running_ = false;
 frame_queue_->abort();
 return;
 }

 rect_.x = 0;
 rect_.y = 0;
 rect_.w = video_width_;
 rect_.h = video_height_;

 ret = SDL_UpdateYUVTexture(
 texture_, &rect_, frame_->data[0], frame_->linesize[0], frame_->data[1],
 frame_->linesize[1], frame_->data[2], frame_->linesize[2]);

 LOG_DEBUG("frame pts: %ld, tot size: %d, Y size: %d, U size: %d, V size: %d",
 frame_->pts, video_width_ * video_height_, frame_->linesize[0],
 frame_->linesize[1], frame_->linesize[2]);
 if (ret != 0) {
 LOG_ERROR("SDL_UpdateYUVTexture failed. %s", SDL_GetError());
 is_running_ = false;
 frame_queue_->abort();
 return;
 }
 ret = SDL_RenderClear(renderer_);
 if (ret != 0) {
 LOG_ERROR("SDL_RenderClear failed. %s", SDL_GetError());
 is_running_ = false;
 frame_queue_->abort();
 return;
 }
 ret = SDL_RenderCopy(renderer_, texture_, nullptr, &rect_);
 if (ret != 0) {
 LOG_ERROR("SDL_RenderCopy failed. %s", SDL_GetError());
 is_running_ = false;
 frame_queue_->abort();
 return;
 }
 SDL_RenderPresent(renderer_);
 SDL_Delay(10);
 av_frame_free(&frame_);
 frame_ = nullptr;
}



log file out put


~/A_CODES/ffmpeg_official/cmake-build-debug ᐅ cat sdlplay.log
[info] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/core/sp_demux.cpp:50 init] audio idx 1 video idx 0
[info] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/core/sp_decode.cpp:39 init] codec: h264
[info] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/core/sp_decode.cpp:68 init] yuv fmt: yuv420p
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x1100
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x1100
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x200
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x200
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x200
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x200
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x200
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x300
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x300
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x301
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:100 play_video] event 0x200
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 67, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 133, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 200, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 267, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 333, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 400, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 467, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 533, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 600, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 667, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 733, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 800, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 867, tot size: 82944, Y size: 384, U size: 192, V size: 192
[debug] [2024-06-14 15:39:33] [/home/xiguan/A_CODES/ffmpeg_official/SDLPlayer/sdl/video_play.cpp:151 video_refresh] frame pts: 933, tot size: 82944, Y size: 384, U size: 192, V size: 192



I try to handle SDL2 events correctly as ffplay but no use.
I also gdb to search anything error but nothing happen too.