Guest User

Untitled

a guest
Oct 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. ## Use ffmpeg to stream video from a dahua 4300s to a file or files
  2. You can use ffmpeg to directly pull frames off of a dahua 4300s at full resolution. May be a good
  3. alternative to pricey dvrs which likely cannot record at full resolution, may not work with
  4. the camera, or are prohibitevly expensive
  5.  
  6. ### Simple Stream to file
  7. Simple stream to file. Full resolution
  8.  
  9. ffmpeg -loglevel debug -rtsp_transport tcp -i "rtsp://admin:admin@198.175.207.61:554/live" \
  10. -c copy -map 0 foo.mp4
  11.  
  12. ### Break streamed file into time segments
  13. ffmpeg can save file in arbitrary segments at fixed intervals. In this example, we save a new file at
  14. 10 second intervals, but the value for `segment_time` can be any positive integer
  15.  
  16. ffmpeg -rtsp_transport tcp -i "rtsp://admin:admin@198.175.207.61:554/live" \
  17. -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 \
  18. -c copy -map 0 test%d.mp4
  19.  
  20. ### Timestamped output
  21. Output files can be timestamped as well.
  22.  
  23. ffmpeg -rtsp_transport tcp -i "rtsp://admin:admin@198.175.207.135:554/live" \
  24. -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 \
  25. -strftime 1 -c copy -map 0 -strftime 1 "output-%Y%m%d-%H%M%S.mp4"
  26.  
  27. ### Select stream to read from.
  28. A different url is used to select the substream. Set `subtype` to 0 for main hi-res stream, or
  29. 1 for low res substream. Channel looks to always be set to 1
  30.  
  31. ffmpeg -rtsp_transport tcp -i "rtsp://admin:admin@198.175.207.135:554/cam/realmonitor?channel=1&subtype=1" \
  32. -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 \
  33. -strftime 1 -c copy -map 0 test-%Y%m%d-%H%M%S.mp4
Add Comment
Please, Sign In to add comment