video

ffmpeg : md5 of m3u8 playlists generated from same input video with different segment durations (after applying video filter) don't match

不想你离开。 提交于 2020-06-27 06:15:16
问题 Here are a few commands I am using to convert and transize a video in mp4 format to a m3u8 playlist. For a given input video (mp4 format), generate multiple video only segments with segment duration 30s ffmpeg -loglevel error -i input.mp4 -dn -sn -an -c:v copy -bsf:v h264_mp4toannexb -copyts -start_at_zero -f segment -segment_time 30 30%03d.mp4 -dn -sn -vn -c:a copy audio.aac Apply video filter (in this case scaling) on each segment and convert it to a m3u8 format ls 30*.mp4 | parallel

Play mp4 in chromium with puppeteer, windows

帅比萌擦擦* 提交于 2020-06-26 06:41:53
问题 I'm developing with puppeteer in node on windows 10. The problem is that when I open a site playing an mp4 file the browser says me that it is not supported. I found this package: chromium-codecs-ffmpeg-nonfree; but it is for linux! How can I play .mp4 in Chromium with puppeteer on windows? 回答1: The Puppeteer Documentation has an answer for this: Q: What features does Puppeteer not support? You may find that Puppeteer does not behave as expected when controlling pages that incorporate audio

How To Resize a Video Clip in Python

拈花ヽ惹草 提交于 2020-06-24 11:38:25
问题 I want to resize a video clip in python 2.7. For example we give "movie.mp4" with 1080p quality The result should be "movie.mp4" with 360p quality I Think that there should be solutions with Moviepy. If you know a solution with it. I would be grateful if you answer me. 回答1: Here is how you resize a movie with moviepy: see the mpviepy doc here import moviepy.editor as mp clip = mp.VideoFileClip("movie.mp4") clip_resized = clip.resize(height=360) # make the height 360px ( According to moviePy

Creating a video from a single image for a specific duration in ffmpeg

送分小仙女□ 提交于 2020-06-23 21:18:34
问题 How do I generate a movie using ffmpeg using a single image (image1.png) for a duration of 15 seconds with a specific resolution so when I play the video, the image will appear on screen for 15 seconds. 回答1: ffmpeg -loop 1 -i image.png -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=320:240 out.mp4 The -t 15 makes it 15 seconds long. The -vf scale=320:240 sets the width/height. Make sure to use an actual ffmpeg version e.g. http://johnvansickle.com/ffmpeg/ 来源: https://stackoverflow.com

Creating a video from a single image for a specific duration in ffmpeg

纵然是瞬间 提交于 2020-06-23 21:14:11
问题 How do I generate a movie using ffmpeg using a single image (image1.png) for a duration of 15 seconds with a specific resolution so when I play the video, the image will appear on screen for 15 seconds. 回答1: ffmpeg -loop 1 -i image.png -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=320:240 out.mp4 The -t 15 makes it 15 seconds long. The -vf scale=320:240 sets the width/height. Make sure to use an actual ffmpeg version e.g. http://johnvansickle.com/ffmpeg/ 来源: https://stackoverflow.com

Video player by Python tkinter, When I pause video, I cannot re-play

本秂侑毒 提交于 2020-06-23 09:28:08
问题 I am creating GUI to play video files. The problem is that when I pause video, Play button cannot re-play that video, and I have to select video file again. Note: Since I want to show video in the same tkinter window, I don't use OpenCV imshow command. Instead, I am using "window.after" method. Following is my code: I try to use "self.pause" variable to control pause status. When I click Pause button, this Boolean variable becomes True. However, I couldn't find suitable place to make it False

How to convert an ffmpeg texture to Open GL texture without copying to CPU memory

早过忘川 提交于 2020-06-22 03:27:25
问题 This ffmpeg example demonstrates how to do hardware decoding: https://github.com/FFmpeg/FFmpeg/blob/release/4.2/doc/examples/hw_decode.c At line 109 it does this: /* retrieve data from GPU to CPU */ if ((ret = av_hwframe_transfer_data(sw_frame, frame, 0)) < 0) { I want to avoid this because it takes time. Therefore, I need a way to reuse that decoded video, which is in GPU memory, to redo color conversion. How to transform the decoded texture in GPU memory to texture in Open GL without

FFmpeg ignoring output pixel format

对着背影说爱祢 提交于 2020-06-17 15:57:47
问题 I am using ffmpeg 4.2.2 on an Ubuntu 20.04 machine to clone the video stream of a USB webcam so that multiple applications can use the same feed. To achieve this, I simply clone to a v4l2 loop back device: ffmpeg -f v4l2 -i /dev/video0 -codec copy -f v4l2 /dev/video1 So far, this works reasonably well. I am able to successfully access /dev/video1 which presents the same feed as /dev/video0 . Note: To make this work you need to ensure that the v4l2loopback device kernel module is enabled:

kivy putting video inside a Canvas?

混江龙づ霸主 提交于 2020-06-17 15:23:45
问题 i want to put a video inside a canvas. i'm using images inside them just fine but when i use videos it triggers some errors Unknown <mp4> type, no loader found. i do not know where is the probleme. this is my code for the image : with self.canvas: self.bg = Rectangle(source='mahrez.jpg', pos=self.pos, size=self.size) but instead of the image i want to use a video 回答1: You can do what you want by using kivy.core.video and using that to set the texture of the Rectangle : from kivy.core.video

Safari html5 video fullscreen size

白昼怎懂夜的黑 提交于 2020-06-15 04:34:08
问题 On OSX Safari, HTML5 video tag when clicking on fullscreen. How can I force the video to cover the full screen instead of showing a small (maybe the original) size with a black background? 回答1: Ok, found it. Need some CSS when a max-height is set. Answer: video:-webkit-full-screen { width: 100%; height: 100%; max-height: 100%; } 回答2: As @Jack say we need to use the CSS -webkit-full-screen I think you wanna have you're own customized controller right? In that case, we need to put the control