Decode video with ffmpeg

Moderators: mdrjr, odroid

Decode video with ffmpeg

Unread postby 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.
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4

Re: Decode video with ffmpeg

Unread postby 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.
User avatar
odroid
Site Admin
 
Posts: 28303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Decode video with ffmpeg

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

Okey but what comand is for decode video
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4

Re: Decode video with ffmpeg

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

Code: Select all
ffplay big_buck_bunny_1080p_surround.avi
User avatar
odroid
Site Admin
 
Posts: 28303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Decode video with ffmpeg

Unread postby 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

Re: Decode video with ffmpeg

Unread postby 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
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4

Re: Decode video with ffmpeg

Unread postby 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.
User avatar
mad_ady
 
Posts: 4038
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Decode video with ffmpeg

Unread postby 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?
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4

Re: Decode video with ffmpeg

Unread postby 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
mad_ady
 
Posts: 4038
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Decode video with ffmpeg

Unread postby 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
meveric
 
Posts: 8900
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

Re: Decode video with ffmpeg

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

Didn't know it could do animated gifs :D
User avatar
mad_ady
 
Posts: 4038
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Decode video with ffmpeg

Unread postby 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.
User avatar
meveric
 
Posts: 8900
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

Re: Decode video with ffmpeg

Unread postby 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 108 times
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4

Re: Decode video with ffmpeg

Unread postby 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...
User avatar
mad_ady
 
Posts: 4038
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Decode video with ffmpeg

Unread postby 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 103 times
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4

Re: Decode video with ffmpeg

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

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

Re: Decode video with ffmpeg

Unread postby 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 -
User avatar
memeka
 
Posts: 3964
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Decode video with ffmpeg

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

If I do whatever, always have this problem:
"file_output : read-only file system"
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4

Re: Decode video with ffmpeg

Unread postby 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.
User avatar
meveric
 
Posts: 8900
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

Re: Decode video with ffmpeg

Unread postby 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 18 times
edison_gdem
 
Posts: 113
Joined: Thu Mar 22, 2018 6:45 pm
languages_spoken: english and spanish
ODROIDs: ODROID-XU4


Return to General Chat

Who is online

Users browsing this forum: No registered users and 1 guest