I am working with a raw h264 stream, this is a live stream coming from a device, however when the device is streaming a menu page that is static, it doesn’t send out a frame. I am feeding the stream back into a v4l2 loop back instance and then consuming this on a webpage via getUserMedia. The issue I have is that ffmpeg does not send frames to v4l2 when the hardware device is not sending frames. I have tried to set the output of ffmpeg to cfr and 60fps. However this doesn’t make it send out duplicates of the last frame. Is there anyway to achieve this?
Thanks in advance
Related
I have 2 rtmp, one of them for audio playback and one for streaming video. I mix all of them using ffmpeg, but I want to change the delay between audio and video while running ffmpeg. How can I do that?
I have a h264 video stream wrapped as pes packets, while playing on my embedded hardware, the screen blurred.
So I want to verify the accuracy using ffmpeg command, but how, is anyone can help? that will be very appreciated.
We have a DirectShow application where we capture video input from USB, multiplex with audio from a WAV file (backing music), overlay audio and video effects, compress and write to an MP4 file.
Originally we were using an audio input source (microphone) and mixing our backing music and sound effects over the top but the decision was made to not capture live audio, and so I thought it would make more sense to use the backing music WAV file itself as the audio source.
Here is the filter graph we have:
backing.wav is a simple WAV file (stored locally), and was added to the graph using IFilterGraph::AddSourceFilter.
The problem is that when the graph is run, no audio samples are delivered from the WAV file. The video part of the graph runs as normal, but it's as if the audio part of the graph simply isn't running.
If I stop the graph in GraphEdit, add the Default DirectSound Device audio renderer and hook that up in place of the AAC Encoder filter and then run the graph again, the audio plays as you would expect.
Additionally, if backing.wav is replaced with an audio capture source like a microphone, audio data flows through as normal.
Does anyone have any ideas why the above graph, using a WAV file as the audio source, would fail to produce any audio samples?
I suppose the title is incorrectly identifying/summarizing the problem. There is nothing to tell for the fact that audio is not produced. It is likely that it is produced equally well with DirectSound Renderer and with AAC Encoder, specifically the data is reaching output pin of Mixing Transform Filter (is this your filter? You should be able to trace its flow and see media samples passing though).
With the information given, I would say it's likely that custom AAC encoder somehow does not like the feed and somehow either drops data or switches to erroneous state. You should be able to debug this further by inserting a Sample Grabber (or alike) filter¹ before the AAC encoder and tracing the media samples. Also comparing them to data from another source. The encoder might be sensitive to small details like media sample duration or discontinuity flag on the first sample streamed.
¹ With GraphStudioNext (GraphEdit makes no longer sense compared to) you can use internal Analyzer Filter and review media sample flow interactively using filter property page.
I am streaming from my android phone's camera to my computer using RTP. I am using VLC to receive the stream. I am also using a hand written .sdp file to view the stream in VLC. When I was doing this over RTSP I could uses the command line -> vlc "rtsp://224.1.1.1:8086" --network-caching=0 to remove the 1000ms caching that would remove the delay. So now I am using -> myTest.sdp --network-caching=0 but it seems to have no affect. I have tried increasing it to 10 seconds, still no affect. It also seems that if I lower the quality of the video it will have more of a delay. What do I need to do to remove any kind of caching / buffering and always just show the latest frame as it comes in?
I couldn't make VLC to have a delay less than 1 ms. So switching to ffplay with this parameters solved the problem:
ffplay.exe rtsp://224.1.1.1:8086 -fflags nobuffer -flags low_delay -avioflags direct -fflags discardcorrupt
I have an NC541 IP camera, which supposedly does have an MJPEG stream, as in the manual it says "The video is compressed by MJPEG", but I can not find a way of how to get that stream from the camera. Seems that it wants to work only with the build-in program, while I need the way mjpeg stream instead.
Any ideas? Thanks!
I don't have this camera, but on many you can simply right click on the video window in your browser, select properties, and it will tell you the URL of the raw stream. If this is a multi codec camera you may or may not get the mjpeg stream depending on which one is chosen for the camera's home page. This often works for me.