Decode video with ffmpeg

Post Reply
edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Decode video with ffmpeg

Unread post by edison_gdem » Thu Jul 12, 2018 8:45 pm

I was reading in oficial website of ffmpeg: https://www.ffmpeg.org/ffmpeg.html. But I don´t find a exact comand for decode video. Someone that worked with ffmpeg know if i can decode video with ffmpeg.

User avatar
odroid
Site Admin
Posts: 29678
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Decode video with ffmpeg

Unread post by odroid » Thu Jul 12, 2018 9:35 pm

If you use official Ubuntu 18.04 image, "ffplay" command with a H.264 video file parameter will use the MFC for decoding and Mali GPU SDL2 for rendering.

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Thu Jul 12, 2018 9:46 pm

Okey but what comand is for decode video

User avatar
odroid
Site Admin
Posts: 29678
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Decode video with ffmpeg

Unread post by odroid » Thu Jul 12, 2018 9:48 pm

Code: Select all

ffplay big_buck_bunny_1080p_surround.avi

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Fri Jul 13, 2018 3:11 am

thanks

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Mon Jul 16, 2018 7:35 pm

There is some command that allows ffplay, tell the decoder where you want to send the result, preferably a text file. Thanks

User avatar
mad_ady
Posts: 5234
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Decode video with ffmpeg

Unread post by mad_ady » Mon Jul 16, 2018 8:48 pm

Ffplay only outputs to screen. What do you want to do with the decoded output? You'll likely need to use ffmpeg instead.

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Mon Jul 16, 2018 10:36 pm

I wanted to know if decoding, the decoder leaves me a file with the results obtained. Do you know if ffmpeg has any command for this?

User avatar
mad_ady
Posts: 5234
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Decode video with ffmpeg

Unread post by mad_ady » Mon Jul 16, 2018 10:44 pm

It depends in what format you want the decoded result. ffmpeg can write for example raw or images to a directory if needed. It can even output to ASCII ART :)
If you tell us your use case maybe we can help with examples.

User avatar
meveric
Posts: 9696
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: Decode video with ffmpeg

Unread post by meveric » Mon Jul 16, 2018 10:46 pm

Code: Select all

ffmpeg -i big_buck_bunny_1080p_surround.avi result.raw
(storing in RAW format)

basically: ffmpeg -i <input-file> <options> <output-file>

ffmpeg "guesses" the option if you don't give them.. for example ending on .flv it will create flash video format .raw raw format .mp4 mpeg4 video and so on.

always nice:

Code: Select all

ffmpeg -i big_buck_bunny_1080p_surround.avi bunny.gif
;)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
mad_ady
Posts: 5234
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Decode video with ffmpeg

Unread post by mad_ady » Mon Jul 16, 2018 11:06 pm

Didn't know it could do animated gifs :D

User avatar
meveric
Posts: 9696
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: Decode video with ffmpeg

Unread post by meveric » Mon Jul 16, 2018 11:09 pm

mad_ady wrote:Didn't know it could do animated gifs :D
it's huge, has no sounds, but hey, it works :D
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Thu Jul 19, 2018 11:52 pm

meveric wrote:

Code: Select all

ffmpeg -i big_buck_bunny_1080p_surround.avi result.raw
(storing in RAW format)

basically: ffmpeg -i <input-file> <options> <output-file>

ffmpeg "guesses" the option if you don't give them.. for example ending on .flv it will create flash video format .raw raw format .mp4 mpeg4 video and so on.

always nice:

Code: Select all

ffmpeg -i big_buck_bunny_1080p_surround.avi bunny.gif
;)
I can´t decode. This error show
Attachments
Captura28.JPG
Captura28.JPG (159.55 KiB) Viewed 498 times

User avatar
mad_ady
Posts: 5234
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Decode video with ffmpeg

Unread post by mad_ady » Fri Jul 20, 2018 12:01 am

Try

Code: Select all

ffmpeg -i file.mp4 -f raw file.raw
... and prepare to run out of disk space in a couple of seconds...

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Fri Jul 20, 2018 12:17 am

mad_ady wrote:Try

Code: Select all

ffmpeg -i file.mp4 -f raw file.raw
... and prepare to run out of disk space in a couple of seconds...
Attachments
Captura30.JPG
error
Captura30.JPG (147.95 KiB) Viewed 493 times

User avatar
mad_ady
Posts: 5234
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: Decode video with ffmpeg

Unread post by mad_ady » Fri Jul 20, 2018 12:51 am


User avatar
memeka
Posts: 4149
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Decode video with ffmpeg

Unread post by memeka » Fri Jul 20, 2018 1:08 am

it's -vcodec rawvideo output.yuv if you want to save the video, in a huge file.
if you just want to test, you can just decode, without output to file: -vcodec rawvideo -f null -

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Fri Jul 20, 2018 11:57 pm

If I do whatever, always have this problem:
"file_output : read-only file system"

User avatar
meveric
Posts: 9696
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: Decode video with ffmpeg

Unread post by meveric » Sat Jul 21, 2018 2:16 am

yeah I don't think your system is working correctly... root@(none) O_o
that means the system you're working on doesn't even have a name.
And read only file system means that either your filesystem is damaged or uses a really messed up setting.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

edison_gdem
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4
Contact:

Re: Decode video with ffmpeg

Unread post by edison_gdem » Mon Jul 23, 2018 6:50 am

I already managed to enter as an odroid user, but everything was deleted and I have to reinstall ffmpeg. The problem is that the command I used a few days ago does not work:
Attachments
Captura3.JPG
Captura3.JPG (23.03 KiB) Viewed 408 times

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest