Two-Pass encoding on Android

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Two-Pass encoding on Android

Majid Shirazi
According to the documentation for using Two-Pass method we have to run
ffmpeg twice like this:

ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null && \
ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k output.mp4

But When I use these codes I get this error:

Unable to find a suitable output format for '&&'

And Android doesn't recognize "&& \" as an argument for ffmpeg or ffmpeg
doesn't recognize such a thing on Android!

So, could you tell me please how I should use 2-Pass encoding on Android
app?
_______________________________________________
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: Two-Pass encoding on Android

Carl Eugen Hoyos-2
2018-12-22 8:22 GMT+01:00, Majid Shirazi <[hidden email]>:
> According to the documentation for using Two-Pass method we have to run
> ffmpeg twice like this:
>
> ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null && \
> ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k
> output.mp4

What's wrong with (remove linebreak after ";"):
$ ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null ;
ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k output.mp4
?

Carl Eugen
_______________________________________________
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: Two-Pass encoding on Android

Majid Shirazi
this is what happen if I remove "&& \":

*    [libx264 @ 0xf0c07c00] using SAR=3825/3824*
*    [libx264 @ 0xf0c07c00] using cpu capabilities: ARMv6 NEON*
*    [libx264 @ 0xf0c07c00] ratecontrol_init: can't open stats file*
*    Error initializing output stream 0:0 -- Error while opening encoder
for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate,
width or height*
*    [aac @ 0xf0c08680] Qavg: 3723.349*
*    [aac @ 0xf0c08680] 2 frames left in the queue on closing*
*    Conversion failed!*

On Sat, Dec 22, 2018 at 3:42 PM Carl Eugen Hoyos <[hidden email]> wrote:

> 2018-12-22 8:22 GMT+01:00, Majid Shirazi <[hidden email]>:
> > According to the documentation for using Two-Pass method we have to run
> > ffmpeg twice like this:
> >
> > ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null
> && \
> > ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k
> > output.mp4
>
> What's wrong with (remove linebreak after ";"):
> $ ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null ;
> ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k
> output.mp4
> ?
>
> Carl Eugen
> _______________________________________________
> 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: Two-Pass encoding on Android

Carl Eugen Hoyos-2
2018-12-22 16:29 GMT+01:00, Majid Shirazi <[hidden email]>:
> this is what happen if I remove "&& \":
>
> *    [libx264 @ 0xf0c07c00] using SAR=3825/3824*
> *    [libx264 @ 0xf0c07c00] using cpu capabilities: ARMv6 NEON*

> *    [libx264 @ 0xf0c07c00] ratecontrol_init: can't open stats file*

Complete, uncut console output missing / I would assume you don't
have write access to the directory where you started the ffmpeg
executable.

Carl Eugen
_______________________________________________
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".