29

This question already has an answer here:

I am a vlogger and after getting HTC Desire HD, found out its camera was all I ever needed. However, I usually have to see myself while recording video, to control my facial expressions, and with a rear-facing camera it's just not possible.

I know ADB allows for screenshots, but is there a way to stream the screen output to my PC's display? Not necessarily at 20+ fps, just a couple frames per second will do.

marked as duplicate by Firelord Feb 12 at 2:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6

Try the Android Screencast app.

See the XDA thread for more details.

  • Looks nice and answers the question I put in my thread's title... But ironically, displays the black bar instead of camera output. I guess it's like print-screening Windows Media Player: you end up with everything except the video itself :( – Kirill G Mar 29 '11 at 17:59
  • 1
    I'm not sure why you got that problem, but even if it worked appropriately it only gives you a 4-5 fps refresh rate, which is far from "Live". – Matt Mar 29 '11 at 18:55
  • 5
    I doubt you will be able to pipe output from your phone's camera to another device. Have you tried a more hardware based approach, like setting up a mirror? :) – Chahk Mar 29 '11 at 21:01
13

screenrecord

screenrecord is an internal Android executable that dumps screen to a file, and ffplay from ffmpeg happens to be able to play an H.264 encoded stream from stdin:

sudo apt-get install ffmpeg    
adb shell screenrecord --output-format=h264 - | ffplay -

There is some latency, but the image quality is great.

You might have to make the screen move a bit before you see anything.

See also: Use adb screenrecord command to mirror Android screen to PC via USB

Tested on Ubuntu 16.04, Android 5.1.1 and Ubuntu 18.04, Android 7.0.

  • 1
    The video starts faster with smaller probesize. I got good results with ffplay -framerate 60 -probesize 32 -sync video - the "-framerate 60" removes the delay effect and "-sync video" drops the frames instead of fast forwading them. – arbuz Jan 24 '18 at 0:30
  • 1
    Exactly what I was looking for! I didn't want to install an app just to grab a screenshot when security policies were restricting it. For the record, it worked for me on Ubuntu 18.04 with Android 7.0. – b_laoshi Jan 2 at 1:54
  • @b_laoshi great, added the new working versions report to the answer. – Ciro Santilli 新疆改造中心 六四事件 法轮功 Jan 2 at 8:57
1

Some Android phones have TV Out capabilities, usually through USB or HDMI, but sometimes through the 3.5 audio jack. I don't think HTC Desire has any TV-Out capability though.

-1

Airdroid is all you need. Simple and easy to use. You're able to see your camera out put live but for some reason not able to record it. Your pc and android phone must be on the same WiFi network.

  • Airdroid works over WiFi AFAIK. OP wanted a solution for ADB (via USB). He also wanted to see the device screen live, i.e. with no or just marginal delay. If not added recently, Airdroid doesn't support that IMHO. – Izzy Sep 17 '14 at 10:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.