The mplayer command can grab video when to insert usb-camera into usb slot.
mplayer -tv driver=v4l2:width=352:height=288:device=/dev/video0 tv://
The video grabed by usb-camera can be displayed on the screen,
how to output the grabbed vedio into a file with mplayer?
mplayer -tv driver=v4l2:width=352:height=288:device=/dev/video0 tv://home/test.mp4
The command can't grab video into /home/test.mp4.
Try the dumpstream option
https://www.mplayerhq.hu/DOCS/HTML/en/streaming.html
mplayer -tv driver=v4l2:width=352:height=288:device=/dev/video0 -dumpstream -dumpfile test.mp4 tv://
On my install I've sometimes had issues with mp4, so it may be worth trying a different file extension or two to see if it finds a better encoding.
Related
I am successfully u sing ffmpeg via powershell to compress video files, however I can't get the compression to occur in a single location, I only have success when I make separate inputs and outputs.
For example, this command will be successful:
ffmpeg -y -i \\path\$x -vf scale=1920:1080 \\diff_path\$x
this will not do anyhting or will corrupt the file:
ffmpeg -y -i \\path\$x -vf scale=1920:1080 \\path\$x
I think I understand why this doesn't work, but I'm having a hard time finding a solution. I want the script to address a file and compress it in it's current location, leaving only a single compressed video file.
Thanks all
Not possible. Not the answer you want, but FFmpeg is not able to perform in-place file editing, which means it has to make a new output file.
I would like a command like for FFMPEG that will create a file which contains only uncompressed audio frames/packets from a file.
Example:
ffmpeg -i in.mp3 --no-decompress out
Something like this would be fantastic.
I am trying to check if mplayer is playing an mp3 file. I currently use this line from python
strace -p " + str(mplayer.pid) + " 2>&1 | head -n 200 | grep 'read(3'
That is because I know that mplayer makes system calls when reading file from descriptor number 3. However, no matter how many lines I analyze, there is not a single reading operation.
I only know of one reliable way to determining whether MPlayer is playing something, and that is by running it as slave and reading its ASCII pipe continuously.
Watching text occurrences in that pipe of media data not found, Failed to open or STARTING PLAYBACK and whether the process has quit (it is done playing).
I am converting abc.flac file to abc.mp3 using ffmpeg command line tool. But when abc.mp3 is created all metadata information get clear like artist name , album name etc. all field get empty.
i am using this command
ffmpeg -i "abc.flac" -acodec mp3 -ab 256 "abc.mp3"
this give me abc.mp3 i also try -map_metadata tag but it is not working
Have you any idea about this
Thanks in advance.
Recently updated my Wireshark on a server, and lost the ability to use -R and -w from the CLI. Since I'm tracing SIP and RTP calls, I need to use -R and not -f.
I found out using -V is very useful (shows the packet tree on screen) and then I can redirect the output to a file. Unfortunately I'm not able to open that file through Wireshark to view properly (contains too muh text to easily scroll through).
I tried using -x t add the hex dump (removed -V), but still that is not openable through Wireshark when copying the text file to my PC.
Any ideas how I can trace using -R (with or without -V), copy the file to my PC and still be able to read it through Wireshark? I don't have issues to convert the file to a readable format.. Just need anything to view the files and share them :)
Thanks all,
//M