I am trying to filter, resize and encode a video on my VPS (remote server computer, one can log in) because it is 4x faster than home machine. My command like looks like:
I encode video as mjpeg, because every frame is a keyframe, so on home machine I can easily seek through the video and select certain parts, recording frame ranges, etc.Code:ffmpeg -fflags +genpts -i myvideo.avi -an -c:v mjpeg -q:v 6 -vf "scale=2*ceil(iw/4):2*ceil(ih/4),lutyuv=y=gammaval(1/1.65)" -f avi tcp://101.101.101.101:1080?listen
Video frame rate at server side: 29.97 fps, 29.97 tbr, 29.97 tbn, 29.98 tbc
on client side at home machine I did:
Video frame rate at client side: 25 tbr, 50 tbn, 50 tbcCode:ffmpeg -fflags +genpts -i http://101.101.101.101:1080 -c copy my-converted-video.avi
My problem is when I open my-converted-video.avi at client side, its every second frame is marked as "D", which means "deleted" in VirtualDubMod. What should I do to get a normal video without deleted frames?
+ Reply to Thread
Results 1 to 7 of 7
-
-
try adding the fps before and/or after the { -c copy } of the video.
-r 29.970
or
-framerate 29.970
also, may be beneficial to add the following, same condition as above.
-rtbufsize 100MB # can vary value param, ie, 072000k, 10000k, ... etc
and possibly
-vsync 1 -
I would change container - avi may be not best streaming container - consider use something tailored for streaming or robust by definition (mpeg-ts is quite robust as data are usually in small packets), specify additionally frame payload size to prevent them from fragmentation - for Ethernet it is usually 1316 bytes (7*188bytes).
For example:
Code:-f mpegts udp://232.0.3.3:5000?pkt_size=1316
-
Thx, and how can I activate "intra h264"? Does it mean that every frame is a keyframe and no B-frames are present?
-
Last edited by jagabo; 11th Dec 2016 at 23:03.
-
Thx, using "-r 25" before and after "-i <input url>" together with "-vsync 1" worked, I just always have to check for the current fps at server side, but not a big problem.
Interestingly, it turned out if I use codec mpeg2video either in matroska container/stream or mpegts, then there is no need for "-r 25" and "-vsync 1". Client side saved video is perfect.
h264 and --keyint are not good for me, because I want to open the saved file at client side by VirtualDubMod + Wine, and it doesn't support that codec as far as I know. Doesn't exist similar "keyint" option for the mpeg4 or libxvid codec?Last edited by konstantinusz; 15th Dec 2016 at 19:44.
-
Just install a VFW h.264 decoder like ffdshow or x264vfw. But h.264 video and the AVI container (really the VFW AVI reader/splitter) don't get along well. I wouldn't recommend using it.
Of course. In the Xvid codec it's called Maximum I-frame interval. I believe it's "-g 1" in ffmpeg.
Similar Threads
-
How to properly convert any long GOP files to i-frame intermediate (mjpeg)?
By Clever Sleazoid in forum Video ConversionReplies: 18Last Post: 15th Oct 2015, 01:58 -
How to post a youtube video and have it get it deleted?
By smiledi in forum Video Streaming DownloadingReplies: 1Last Post: 26th Oct 2014, 01:00 -
MPEG2 I frame vs MJPEG
By marcorocchini in forum Newbie / General discussionsReplies: 19Last Post: 9th Jun 2013, 15:57 -
MeGUI: Encoded video has only ONE frame with this particular sample
By mmatz in forum Video ConversionReplies: 1Last Post: 26th Jun 2012, 19:12 -
Instable frame rate in h264-encoded avi files at 18 fps?
By streamsaver in forum Newbie / General discussionsReplies: 13Last Post: 29th May 2012, 04:46