Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
get video resolution from ffpmeg [duplicate]
22 mai 2018, par MertTheGreatThis question already has an answer here:
I try to get resolution of a video file, and hope this code would help thanks to arionik from GitHub
from subprocess import Popen, PIPE def getWH(pathvideofile): in_pipe = Popen(["ffmpeg", "-i", "\"%s\"" % (pathvideofile)], stderr=PIPE) lines = in_pipe.stderr.readlines() for line in lines: rx = re.compile('.+Video.+, (\d{2,4})x(\d{2,4}).+') m = rx.match(line) if m is not None: w = int(m.group(1)) h = int(m.group(2)) return w, h
But get this error code:
m = rx.match(line) TypeError: cannot use a string pattern on a bytes-like object
What it could be?
Thank you,
-
ffmpeg drawtext filter with zoom in effect
21 mai 2018, par testaccount wizorbitI am using draw text filter to display text on video.i need to add zoom in and zoom out filter on text. is there any command for zoom in and zoom out the text on video.
-
How do you use ffmpeg to change video saturation over time ?
21 mai 2018, par Di Xiaoffmpeg -i out.mp4 -vf eq=brightness=0.1:saturation=0.5*t:1:0.5*t -c:a copy output.mp4
Use the parameter
t
, but it doesn't work. -
Using ffmpeg to transcode/transmux HLS to RTMP for nginx simulcast not working
21 mai 2018, par ZachI want to take an HLS stream and transcode it to RTMP and simulcast it with the nginx RTMP module.
It's not working, however (I have it placed in the application section of the RTMP module).
exec ffmpeg -i -re http://
.m3u8 -acodec aac -vcodec libx264 -f flv rtmp://localhost/live/test; When I try to view my RTMP stream in VLC, it is not loading. I have tried several variations of that ffmpeg directive, none have worked. Any advice? If you need to see more of my config file, I can provide that, but this server has been working previously perfectly when sending video over via a Teradek encoder. This new wrinkle is just not working.
EDIT: Just had a thought. It’d probably help to have the codec information of the incoming HLS stream. Here it is:
- Video Codec: H264 - MPEG-4 AVC
- Resolution: 640x360
- Frame rate: 24
- Decoded format: Planar 4:2:0 YUV
- Audio Codec: MPEG AAC Audio (mp4a)
- Channels: Stereo
- Sample rate:48000Hz
-
Converting an HLS (m3u8) to MP4 [on hold]
21 mai 2018, par orcamanCan anyone advise on how to construct an
MP4
file from anHLS
stream (the reverse of what you usually want)? Say I have the m3u8 - is there a straightforward way of getting a singleMP4
usingFFMPEG
or some other tool?