Extract rotation flag

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Extract rotation flag

Andrey Goreev
Hello,

If I use:

mediainfo input.mp4 | grep Rotation

I get:

Rotation: 90

I am wondering if there is a way to extract the rotation flag ONLY
using ffmpeg/ffprobe.

I tried: ffprobe -i input.mp4 | grep Rotation

as well as "rotat", "rotation", "rotate", "%rotat%" but I get the full
output all the time (with the stamp, libraries, bitrate, etc.)

Please advise.

Best regards,
AG
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Extract rotation flag

Gyan Doshi

On 1/8/2018 9:49 PM, Andrey Goreev wrote:
>
> I am wondering if there is a way to extract the rotation flag ONLY
> using ffmpeg/ffprobe.

Try

     ffprobe video.mp4 -show_entries side_data=rotation -select_streams
v -read_intervals %+#1 -of compact=p=0 -v 0


Regards,
Gyan
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Extract rotation flag

Andrey Goreev
Thanks. That works. This one also worked:
ffprobe -show_streams input.mp4 2>/dev/null | grep rotate
which gives me:
TAG:rotate=90
Just need to get rid of "TAG:rotate=" now to get a clean "90"

Best regards,

On Mon, Jan 8, 2018 at 9:28 AM, Gyan Doshi <[hidden email]> wrote:

>
> On 1/8/2018 9:49 PM, Andrey Goreev wrote:
>
>>
>> I am wondering if there is a way to extract the rotation flag ONLY
>> using ffmpeg/ffprobe.
>>
>
> Try
>
>     ffprobe video.mp4 -show_entries side_data=rotation -select_streams v
> -read_intervals %+#1 -of compact=p=0 -v 0
>
>
> Regards,
> Gyan
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Extract rotation flag

Andrey Goreev
ffprobe -show_streams input.mp4 2>/dev/null | grep rotate | cut -c 12-14
gave me the clean output:
90

Best regards,

On Mon, Jan 8, 2018 at 9:33 AM, Andrey Goreev <[hidden email]> wrote:

> Thanks. That works. This one also worked:
> ffprobe -show_streams input.mp4 2>/dev/null | grep rotate
> which gives me:
> TAG:rotate=90
> Just need to get rid of "TAG:rotate=" now to get a clean "90"
>
> Best regards,
>
> On Mon, Jan 8, 2018 at 9:28 AM, Gyan Doshi <[hidden email]> wrote:
>
>>
>> On 1/8/2018 9:49 PM, Andrey Goreev wrote:
>>
>>>
>>> I am wondering if there is a way to extract the rotation flag ONLY
>>> using ffmpeg/ffprobe.
>>>
>>
>> Try
>>
>>     ffprobe video.mp4 -show_entries side_data=rotation -select_streams v
>> -read_intervals %+#1 -of compact=p=0 -v 0
>>
>>
>> Regards,
>> Gyan
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Extract rotation flag

Gyan Doshi
In reply to this post by Andrey Goreev
On 1/8/2018 10:03 PM, Andrey Goreev wrote:

> Just need to get rid of "TAG:rotate=" now to get a clean "90"

Change -of in my command to

     -of compact=p=0:nk=1

to get just the value.


Regards,
Gyan
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Extract rotation flag

Andrey Goreev
Thank you, that works too!

Best regards,

On Mon, Jan 8, 2018 at 9:37 AM, Gyan Doshi <[hidden email]> wrote:

> On 1/8/2018 10:03 PM, Andrey Goreev wrote:
>
> Just need to get rid of "TAG:rotate=" now to get a clean "90"
>>
>
> Change -of in my command to
>
>     -of compact=p=0:nk=1
>
> to get just the value.
>
>
> Regards,
> Gyan
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".