0

I have been trying to record my phone screen (Nexus 5) through command prompt. I have also downloaded the SDK. For some unknown reason I am unable to open or play the file saved using this script:

$adb shell /sdcard/video.mp4
  • 1
    What you call a "script" here actually is an ADB command that cannot work: adb shell just invokes a shell, without further parameters an interactive one. All you pass to it should be run on the device. But you didn't pass a command, but just a file name. So what shall be achieved here? Copying the file to your computer to play it there, or have the video played on the device? – Izzy Jun 3 '14 at 22:00
  • Thank you Izzy, I always thought that the screen was getting recorded. Is it possible that you give me more insight on how do I record a screen? i tried apps like src screen recorders, but they also gave me an .mp4 file that could not play anywhere. – happyme Jun 4 '14 at 15:15
  • Where (and how) did you try to play the resulting file? Maybe there's something wrong on that end. For the recording part, you might wish to check our other screencast questions ("screencast" is the keyword for this, as is "screenshot" for the "still picture"). I've just fixed the tags on your question this way, too. – Izzy Jun 4 '14 at 16:27
  • 1
    Thank you for the corrections. I used another app called "screencast", gave me a file that ran all black. Thanks for the link let me see if I can work with this help. – happyme Jun 4 '14 at 21:12
0

You can exec this command from the pc

$ adb shell screenrecord /sdcard/video.mp4

Need Android 4.4 (which you should have).

DevBytes: Android 4.4 - Recording App Videos: http://youtu.be/ETzRxxOK_bs

  • Why does my recording never play? I have used the same adb commands to get a screen video. I get an mp4 file too. But it never plays in any player. – happyme Jun 5 '14 at 15:16
  • Are you sure you are using the correct command to record? In your original Q you said your using the command $adb shell /sdcard/video.mp4 but you need to add in the word 'screenrecord' after the word shell. – Jonny Wright Jun 5 '14 at 15:55
  • Yes I did, I did everything religiously! Even when I try and play it on windows media player it gives me the following message, "Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file." – happyme Jun 5 '14 at 16:05
  • Do I need SDK for all of this?? – happyme Jun 5 '14 at 16:06
  • 1
    Have you tried playing it in another media player, such as VLC? I had some issues when trying to record directly from the device where it would create a 3.3kb file and not play, however running the command from Windows works fine for me. – Jonny Wright Jun 9 '14 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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