Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to trim the beginning of a video with ffmpeg without transcoding the whole stream ?
29 mai 2018, par Gabriel DiegoTo remove the first 10 seconds of a video without any transcoding I can use the following command:
ffmpeg -i input.webm -vcodec copy -acodec copy -ss 10 output.webm
The problem is that if the key frames are located at 8 seconds then at 12 seconds, the video will start from the 8th second. If I do the following I will get the correct timing, but the whole stream will be transcoded:
ffmpeg -i input.webm -ss 10 output.webm
Is there any way (using avcodec of ffmpeg) to transcode only the part from the 10th to the 12th second then copy the rest of the stream?
-
avconv can not overwrite files ?
28 mai 2018, par VerodeI want to reduce the size of video files. I want to do it this way:
$thuc = exec("avconv -y -i $vfile -map 0 -c:v libx264 -crf 22 -c:a copy $vfile"); if ($video_width > 800) { $thuc = exec("avconv -y -i $vfile -filter:v scale=\"750:trunc(ow/a/2)*2\" -c:a copy $vfile"); }
It doesn't work if input and output file names are the same. The file stays untouched. Does it mean that avconv can not override existing files and I have to choose a different name for output file and then delete the original file? I have read that -y option does overwriting but in reality it does not overwrite.
-
How to configure ffmpeg for streaming videos from Red5 into Youtube using youtube-v3-api ?
28 mai 2018, par Alfonso ValdesYou'll see my problem is next:
Currently I'm working to configure youtube-v3-api for live streaming of .flv videos on my Youtube channel using Red 5 service as stated on next link https://www.red5pro.com/docs/server/ffmpegstreaming.html, this is using next commands for streaming on Linux:
ffmpeg -i rtmp://127.0.0.1:1935/live/streamname live=1 timeout=2 -vcodec libx264 -s 640x480 -vb 500k -acodec libfdk_aac -ab 128k -f flv rtmp://a.rtmp.youtube.com/live2/{Stream name/key} ffmpeg -rtsp_transport tcp -i rtsp://127.0.0.1:8554/live/streamname -acodec copy -vcodec copy -f flv rtmp://a.rtmp.youtube.com/live2/{Stream name/key}
On this, neither RMTP nor RTSP protocols are working for streaming. Also, I have tried several codecs for audio and video configuring different sizes for each one of them, but none of those have worked.
The root streaming videos are generated by an IOS/Android app still on development phase.
The problem comes when no video is displayed on Youtube screen, regardless the video is being sent by Red5 (I confirmed this on my Red5 dedicated server on AWS) and received correctly by Youtube (confirmed by validating on Console), so I have come into a dead end on which I hope you could help me get through.
Any idea of what could be a possible solution?
Thank you.
-
Send output of FFMPEG per UDP in Unity
28 mai 2018, par potu1304I am using https://github.com/keijiro/FFmpegOut to get videos from the unity engine. Now I have to take the compressed FFMPEG output buffer, fragment it, and put it into UDP packets. Then a receiver should receive the data and reassemble the original FFMPEG buffer. Now I am wondering how I can achieve this? How can I access the FFmpeg pipeline to access its buffer and then fragment it? I have no clue how to access the buffer. I treid to modify the FFmpegPipe.cs but here I am not sure what the buffer could be.
I would be very thankful for some help and clearance :)
Best regards!
-
yocto, how to build ffmpeg dev packages
28 mai 2018, par AlekI got a yocto built for imx board. I can build ffmpeg package, but need also to populate headers and libraries in my SDK. Building using
bitbake core-image-minimal -c populate_sdk
does not add ffmpeg headers to SDK image.Didn't have any problems with prervious libraires like modbus, etc.
How to build ffmpeg development packages?
Thanks in advance.