gustavogutierrez 0 Posted June 9, 2020 Share Posted June 9, 2020 (edited) Buenas tardes, He estado tratando de escribir un comando de ffmpeg para transcodificar los videos mp4 H264 que no son compatibles con TV LG ya que al tratar de reproducir algunas peliculas directamente me genera un error que el formato no es compatible con el TV y si habilito la transcodificación no me funciona debido a que tengo instalado Emby Server en una Raspberry PI 4 de 2GB de RAM entonces he decidido transcodificación a mano yo mismo los videos que no sean compatibles para que trasmitir directamente al TV tras muchos intentos me ha funcinado el siguiente comando: ffmpeg -i "Pelicula.mp4" -vf "scale=2*trunc(iw/2):-2,setsar=1" -profile:v main -pix_fmt yuv420p "Pelicula (2020).mp4" Pero tengo un problema y es que esta pelicula tiene varios canales de audio en Español, Ingles y al ejecutar el comando me deja solo el audio en ingles y pierdo el Español y necesito que me deje todos los canales de audio alguien me puede ayudar a identificar como debe quedar el comando para que deje todos los canales de audio y genere el archivo ya transcodificado Al ejecutar el comando: mediainfo "Pelicula.mp4" General Complete name : Pelicula.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 (mp42/isom/avc1) File size : 1.81 GiB Duration : 1 h 29 min Overall bit rate mode : Variable Overall bit rate : 2 912 kb/s Movie name : Pelicula Recorded date : 2020 Encoded date : UTC 2020-05-21 23:54:24 Tagged date : UTC 2020-05-22 00:21:25 Writing application : HandBrake rev5474 2014072299 Cover : Yes Comment : Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Main@L4 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 1 h 28 min Bit rate : 2 155 kb/s Width : 1 920 pixels Height : 960 pixels Display aspect ratio : 2.000 Frame rate mode : Variable Frame rate : 23.976 (24000/1001) FPS Minimum frame rate : 23.974 FPS Maximum frame rate : 23.981 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.049 Stream size : 1.34 GiB (74%) Writing library : x264 core 130 r2273 b3065e6 Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=24 / lookahead_threads=7 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=25000 / crf_max=0.0 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00 Encoded date : UTC 2020-05-21 23:54:24 Tagged date : UTC 2020-05-22 00:37:45 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio #1 ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : mp4a-40-2 Duration : 1 h 29 min Bit rate mode : Variable Bit rate : 248 kb/s Maximum bit rate : 363 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 158 MiB (9%) Title : Stereo Language : Latin Default : Yes Alternate group : 1 Encoded date : UTC 2020-05-21 23:54:24 Tagged date : UTC 2020-05-22 00:37:45 Audio #2 ID : 3 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : mp4a-40-2 Duration : 1 h 28 min Bit rate mode : Variable Bit rate : 512 kb/s Maximum bit rate : 767 kb/s Channel(s) : 6 channels Channel positions : Front: L C R, Side: L R, LFE Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 325 MiB (18%) Title : Stereo Language : English Default : No Alternate group : 1 Encoded date : UTC 2020-05-21 23:54:24 Tagged date : UTC 2020-05-22 00:37:45 Text #1 ID : 4 Format : Timed Text Muxing mode : sbtl Codec ID : tx3g Duration : 27 min 39 s Bit rate mode : Variable Bit rate : 1 b/s Stream size : 163 Bytes (0%) Language : Spanish Default : Yes Forced : No Alternate group : 2 Encoded date : UTC 2020-05-21 23:54:24 Tagged date : UTC 2020-05-22 00:37:45 Text #2 ID : 5 Format : Timed Text Muxing mode : sbtl Codec ID : tx3g Duration : 1 h 22 min Bit rate mode : Variable Bit rate : 39 b/s Stream size : 23.8 KiB (0%) Language : Spanish Default : No Forced : No Alternate group : 2 Encoded date : UTC 2020-05-21 23:54:24 Tagged date : UTC 2020-05-22 00:37:45 Text #3 ID : 6 Format : Timed Text Muxing mode : sbtl Codec ID : tx3g Duration : 1 h 22 min Bit rate mode : Variable Bit rate : 39 b/s Stream size : 23.8 KiB (0%) Language : English Default : No Forced : No Alternate group : 2 Encoded date : UTC 2020-05-21 23:54:24 Tagged date : UTC 2020-05-22 00:37:45 Me interesa sobre todo tener un comando genérico que me sirva para convertir cualquier archivo de video y que la raspberry no tenga que sufrir transcodificando y si es posible tambien tener un comando para poder identificar si el archivo de video necesite que lo transcodifique porque he visto que otros archivos H264 y H265 si se reproducen directamente en la TV LG LK5700PDC 49" FHD+ Edited June 9, 2020 by gustavogutierrez Link to comment Share on other sites More sharing options...
Luke 36876 Posted June 10, 2020 Share Posted June 10, 2020 Hi there, have you tried using the emby server convert media feature? Link to comment Share on other sites More sharing options...
jorg8 0 Posted June 10, 2020 Share Posted June 10, 2020 Hay muchas opciones a la hora de transcodificar, pero al menos para lo que preguntas acerca de no perder todos los canales de audio, usa la opción -map 0 Link to comment Share on other sites More sharing options...
gustavogutierrez 0 Posted June 10, 2020 Author Share Posted June 10, 2020 Hi there, have you tried using the emby server convert media feature? No, donde se encuentra esta opción Link to comment Share on other sites More sharing options...
gustavogutierrez 0 Posted June 10, 2020 Author Share Posted June 10, 2020 Hay muchas opciones a la hora de transcodificar, pero al menos para lo que preguntas acerca de no perder todos los canales de audio, usa la opción -map 0 Eso quiere decir que uso el comando de esta forma? solo le agrego -map 0 ffmpeg -i "Pelicula.mp4" -vf "scale = 2 * trunc (iw / 2): - 2, setsar = 1" -map 0 -perfil: v main -pix_fmt yuv420p "Pelicula (2020) .mp4" Link to comment Share on other sites More sharing options...
jorg8 0 Posted June 10, 2020 Share Posted June 10, 2020 Eso quiere decir que uso el comando de esta forma? solo le agrego -map 0 ffmpeg -i "Pelicula.mp4" -vf "scale = 2 * trunc (iw / 2): - 2, setsar = 1" -map 0 -perfil: v main -pix_fmt yuv420p "Pelicula (2020) .mp4" Si, prueba con eso, yo lo uso y sin problemas. En cuanto a saber cual tienes que transcodificar y cual no, puedes usar ffprobe e investigar que necesitas para filtrar Link to comment Share on other sites More sharing options...
jorg8 0 Posted June 10, 2020 Share Posted June 10, 2020 No, donde se encuentra esta opción Que yo sepa, en las opciones del vídeo puedes ver la opción: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now